Index
A
- a2dissite command / Activating the new Apache configuration
- a2ensite command
- active method / Creating data during test set up
- admin customization
- about / Customizing the admin add and change survey pages
- custom survey form, developing / Developing a custom survey form
- admin, configuring / Configuring admin to use the custom form
- testing / Testing the admin customization
- answer field / Defining a question form for voting
- answer_piechart view / Improving the matplotlib approach
- Apache/mod_wsgi
- configuration, developing / Developing an Apache/mod_wsgi configuration
- using, during development / Using Apache/mod_wsgi during development
- Apache/mod_wsgi configuration
- about / Developing an Apache/mod_wsgi configuration
- Django WSGI script / Creating the WSGI script for the marketr project
- Apache VirtualHost, creating / Creating an Apache VirtualHost for the marketr project
- new configuration, activating / Activating the new Apache configuration
- new configuration, debugging / Debugging the new Apache configuration, CoApache/mod_wsgi configurationnew configuration, debuggingnfiguring Apache to serve static files
- Apache configuration, to server static files / CoApache/mod_wsgi configurationnew configuration, debuggingnfiguring Apache to serve static files
- args command / The args command
- assertContains method / Testing the survey home page
- assertFormError method / Testing the admin customization
- assertNotContains method / Testing the survey home page
- assertRedirects method / Testing the admin customization
- assertTemplateNotUsed method / Basic testing of the survey detail pages
- as_p method / Defining a question form for voting
B
- basic error information, debug page
- about / Basic error information
- exception value / Basic error information
- break command / The break command
C
- check_piechart method / Using the debugger to force race situations
- cleaned_data attribute
- clear command / The clear command
- client class instance / Testing the survey home page
- Client login method / Testing the admin customization
- command line options
- --help option / Command line options for running tests
- verbosity / Verbosity
- verbosity, database setup phase / Verbosity
- setting options / Settings
- Python path / Pythonpath
- Traceback / Traceback
- Noinput / Noinput
- version / Version
- comment block / SQL queries for the home page
- completed function / Creating data during test set up
- content attribute / Testing the survey home page
- content block / SQL queries for the home page
- continue command / The continue command
- cornerstone model
- about / The Survey application models
- count() / Getting the test data loaded during the test run
- coverage
- using, as standalone utility / Using coverage standalone
- integrating, into Django project / Integrating coverage into a Django project
- create_user method / Testing the admin customization
D
- database dependence, doctest issues
- about / Beware of database dependence
- fixing / Beware of database dependence
- database query history
- about / Database query history
- data providing, unit tests
- in text fixtures / Providing data in test fixtures
- example test / Example test that needs test data
- admin application, using / Using the admin application to create test data
- datetime module / Testing Survey model creation
- debug error pages
- about / Debug error pages
- debugger
- getting started / Getting started with the debugger, The debuggergetting startedlist command
- set_trace() call / Getting started with the debugger
- list command / The debuggergetting startedlist command
- where command / The where command
- args command / The args command
- whatis command / The whatis command
- print command / The print and pp commands
- pp command / The print and pp commands
- debug page
- about / Debug page #1: TypeError at /
- TypeError at / / Debug page #1: TypeError at /
- elements / Elements of the debug page
- DEBUG setting
- debug support, in development server
- display_active_survey function
- about / Starting the Survey voting implementation, SQL queries for the active Survey form display page, SQL queries for posting survey answers
- display_completed_survey function / Getting started with the debugger, Dynamically generating image files
- Django
- problems, tracking / Tracking down a problem in Django
- unreported problems, tracking / Tracking down unreported problems
- django.db.connection module / Database query history
- django.test.TestCase class / Understanding the sample unit test
- Django application
- creating / Getting started: Creating a new application
- SQL queries, tracking / Tracking SQL queries for a request
- Django Debug Toolbar / The Django Debug Toolbar
- Django debug settings
- about / Django debug settings
- TEMPLATE_DEBUG / The DEBUG and TEMPLATE_DEBUG settings
- DEBUG / The DEBUG and TEMPLATE_DEBUG settings
- TEMPLATE_STRING_IF_INVALID / The TEMPLATE_STRING_IF_INVALID setting
- Django Debug Toolbar
- about / The Django Debug Toolbar
- installing / Installing the Django Debug Toolbar
- appearance / Debug toolbar appearance
- SQL panel / The SQL panel
- Time panel / The Time panel
- Settings panel / The Settings panel
- HTTP Headers panel / The HTTP Headers panel
- Request Vars panel / The Request Vars panel
- Templates panel / The Templates panel
- Signals panel / The Signals panel
- Logging panel / The Logging panel
- redirect handling / Redirect handling by the debug toolbar
- Django object-relational manager
- about / Beware of database dependence
- Django testing
- new application, creating / Getting started: Creating a new application
- sample unit test / Understanding the sample unit test
- sample doctest / Understanding the sample doctest
- test errors, versus test failures / Test errors versus test failures
- command line options / Command line options for running tests
- issues, of integration / Problems of integration
- doctest
- disadvantages / Some pros and cons of doctests so far, Additional doctest caveats
- advantages / Some pros and cons of doctests so far
- about / Additional doctest caveats
- doctest caveats
- revisiting / Revisiting the doctest caveats
- environmental dependence / Environmental dependence
- database dependence / Database dependence
- test interdependence / Test interdependence
- Unicode / Unicode
- down command / The up and down commands
E
- elements, debug page
- basic error information / Basic error information
- traceback / Traceback
- request information / Request information
- settings / Settings
- EMAIL_SUBJECT_PREFIX / Internal server error notifications
- environmental dependence, doctest issues
- error handling, in production
- about / Handling problems in production
- general error pages, creating / Creating general error pages
- production error information, reporting / Reporting production error information
- internal server error notifications / Internal server error notifications
- page not found notifications / Page not found notifications
- error_class / Another way to search for a matching problem report
- error_class attribute / Coding custom error message and placement
F
- formvalue command / Using the twill command line program
G
- gentags.py / Packaging the template query display for reuse
- get method / Testing the survey home page
- get_absolute_url method / Integrating coverage into a Django project
- get_or_create function
- about / Additional load testing notes
- get_piechart_url method
- get_response() function / The where command
- graphical debuggers
- advantages / Notes on using graphical debuggers
- downside / Notes on using graphical debuggers
- QuerySets / Notes on using graphical debuggers
H
- --help option
- Http404 exception / Debug error pages
- httpd.conf file / Activating the new Apache configuration
- HttpRequest object / Decorators to log function entry and exit
- HttpResponse / Results display using matplotlib
- HttpResponse object / Debug error pages
I
- installing
- Django Debug Toolbar / Installing the Django Debug Toolbar
- internal code state
- tracking / Tracking internal code state
- print statements / Resist the urge to sprinkle prints
- sprinkle print method / Resist the urge to sprinkle prints
- logging module, using / Simple logging configuring for development
- log information, deciding / Deciding what to log
- return values, logging / Decorators to log function entry and exit
- log_call wrapper, implementing / Decorators to log function entry and exit
- decorators, applying to survey code / Applying the decorators to the Survey code
- debug toolbar, logging in / Logging in the debug toolbar
- internal server error notifications
- about / Internal server error notifications
- settings, for email sending / Internal server error notifications
- INTERNAL_IPS setting
- IRC
- issues, doctest
- environmental dependence / Beware of environmental dependence
- database dependence / Beware of database dependence
- test interdependence / Beware of test interdependence
- Unicode / Beware of Unicode
- issues, of integration
- about / Problems of integration
- alternative test runner, specifying / Specifying an alternative test runner
- new management command, creating / Creating a new management command
J
- jump command / The jump command
L
- label_from_instance method / Understanding and fixing the TypeError
- list command / The debuggergetting startedlist command
- log_view wrapper / Decorators to log function entry and exit
M
- make_pie_if_necessary function / Using the debugger to force race situations
- manage.py test survey -v2
- running / Organizing tests
- manage.py utility / Getting started: Creating a new application
- market_research
- matplotlib
- result, displaying / Results display using matplotlib
- approaches, improving / Improving the matplotlib approach
- matplotlib, approaches
- static file serving, setting up / Setting up static file serving
- image files, generating dynamically / Dynamically generating image files
- race conditions, dealing with / Dealing with race conditions
- race conditions forcing, debugger used / Using the debugger to force race situations
- method attribute / Decorators to log function entry and exit
- ModelChoiceField / Defining a question form for voting, Understanding and fixing the TypeError
- ModelForm class
- mod_python / Developing an Apache/mod_wsgi configuration
- mod_wsgi module / Using twill in a TestCase
- multiple survey questions
- handling / Handling multiple Survey questions
- data, creating / Creating the data for multiple questions
- coding support / Coding support for multiple questions
- TemplateSyntaxError, debug page #2 / Debug page #2: TemplateSyntaxError at /1/
- TemplateSyntaxError / Debug page #2: TemplateSyntaxError at /1/
- multithreaded environment
- testing / Testing multithreaded behavior
- siege / Generating load with siege
- load generation, siege used / Generating load with siege
- recording code results, testing / Load testing the results recording code
- recording code results, fixing / Fixing the results recording code
- additional load testing nodes / Additional load testing notes
N
- --noinput option
- about / Noinput
- --noreload option
- next command / The jump command
- none() method / Getting the test data loaded during the test run
- NoReverseMatch exception
O
- optparse module / Creating a new management command
P
- page not found notifications / Page not found notifications
- pdb.set_trace() call / Fixing the pygooglechart results display
- pie method / Results display using matplotlib
- pluralize filter / SQL queries for the home page
- post method / Testing the admin customization
- pp command / The print and pp commands
- print_png method
- using / Results display using matplotlib
- problems, tracking
- in Django / Tracking down a problem in Django
- right code, determining / Is the right code actually running?
- documentation, double-checking / Is the code correct as per the documentation?
- matching problem report, searching for / Searching for a matching problem report
- matching problem report, alternative search / Another way to search for a matching problem report
- fix containing release, determining / Determining the release that contains a fix
- fix, unreleased / What if a fix hasn't been released yet?
- fix, not committed / What if a fix hasn't been committed yet?
- invalid ticket, closing / What if a ticket has been closed without a fix?
- pygooglechart
- result, displaying / Results display using pygooglechart
- initial implementation / Results display using pygooglechart
- results display, debugging / Debugging the pygooglechart results display
- pygooglechart results display
- step command / The step and next commands
- next command / The step and next commands
- print command, using / The step and next commands
- continue command / The continue command
- jump command / The jump command
- break command / The break command
- clear command / The clear command
- fixing / Fixing the pygooglechart results display, The up and down commands, The return command
- up command, using / The up and down commands
- where command / The up and down commands
- down command, using / The up and down commands
- return command, using / The return command
Q
- q.answer_set.count()
- QuerySet / Getting the test data loaded during the test run
- queryset attribute / Defining a question form for voting
- QuerySet repr method / Database query history
- QuerySets
- QuestionVoteForm / Defining a question form for voting
R
- RadioSelect widget / Defining a question form for voting
- redirect_chain attribute / Testing the survey home page
- replace_dashes function
- RequestContext
- using / SQL queries for the home page
- request information, debug page
- response context attribute / Response context and template information
- result, displaying
- pygooglechart, using / Results display using pygooglechart
- matplotlib, using / Results display using matplotlib
- return command / The return command
- runserver command / Notes on using graphical debuggers
S
- sample doctest
- about / Understanding the sample doctest
- sample unit test
- about / Understanding the sample unit test
- running / Running the sample tests
- running, failure / Breaking things on purpose
- test failures / Breaking things on purpose
- settings, debug page
- about / Settings
- settings.py
- about / Logging in the debug toolbar
- settings.py file / Getting started: Creating a new application, Debugging the new Apache configuration
- setUp method / Creating data during test set up, Using twill in a TestCase
- simpleTest class / Understanding the sample unit test
- SMTPConnection class / E-mail services
- sprinkle print method
- SQL queries, tracking
- about / Tracking SQL queries for a request
- query history accessing, setings / Settings for accessing query history in templates
- for home page / SQL queries for the home page
- template query, packaging / Packaging the template query display for reuse
- repackaged template code, testing / Testing the repackaged template code
- active survey page / SQL queries for the active Survey form display page
- survey answers, posting / SQL queries for posting survey answers
- status_code attribute / Testing the survey home page
- step command / The step and next commands
- sudo command
- survey application home page
- creating / Creating the survey application home page
- function / Creating the survey application home page
- prerequisites / Creating the survey application home page
- survey application URLs, defining / Defining the survey application URLs
- views, developing to serve pages / Developing views to serve pages
- templates, creating for pages / Creating templates for pages
- testing / Testing the survey home page
- survey application models
- about / The Survey application models
- survey detail pages
- creating / Creating the survey detail pages
- survey detail view, refining / Refining the survey detail view
- templates / Templates for the survey detail pages
- testing / Basic testing of the survey detail pages
- SurveyDetailTest / Basic testing of the survey detail pages
- survey directory / Getting started: Creating a new application
- SurveyFrom clean method / Integrating coverage into a Django project
- SurveyHomeTest / Basic testing of the survey detail pages
- survey model
- testing / Testing the Survey model
- test, verifying / Is that test useful?
- custom survey save method, developing / Developing a custom Survey save method
- survey model creation
- testing / Testing Survey model creation
- survey responses, recording
- about / Recording Survey responses
- coding support / Coding support for recording Survey responses
- NoReverseMatch, debug page #3 / Debug page #3: NoReverseMatch at /1/
- TemplateDoesNotExist, debug page #4 / Debug page #4: TemplateDoesNotExist at /thanks/1/
- survey results display
- implementing / Implementing the Survey results display
- Survey save override function
- unit tests / Unit tests for the Survey save override method
- survey submissions, handling
- about / Handling invalid Survey submissions
- custom error message, coding / Coding custom error message and placement
- error message placement, coding / Coding custom error message and placement
- TemplateSyntaxError, debug page #5 / Debug page #5: Another TemplateSyntaxError
- SurveyTest setUp method / Basic testing of the survey detail pages
- survey voting implementation
- about / Starting the Survey voting implementation
- test data, creating / Creating test data for voting
- question form, defining / Defining a question form for voting
- debug page #1 / Debug page #1: TypeError at /
- survey_detail function
- survey_detail view / Refining the survey detail view
- survey_test command / Creating a new management command
T
- tearDown method / Testing the admin customization, Using twill in a TestCase
- TemplateDoesNotExist
- TemplateSyntaxError
- about / Understanding and fixing the TemplateSyntaxError
- fixing / Understanding and fixing the TemplateSyntaxError, Fixing the second TemplateSyntaxError
- TEMPLATE_CONTEXT_PROCESSORS setting
- TEMPLATE_DEBUG setting
- TEMPLATE_STRING_IF_INVALID setting
- testAddSurveyError method / Using twill in a TestCase
- testAddSurveyOK method / Testing the admin customization
- TestCase / Using twill in a TestCase
- TestCase class / Testing the survey home page
- testClosesReset method / Using coverage standalone
- test errors
- versus test failures / Test errors versus test failures
- test failures
- about / Breaking things on purpose
- versus test errors / Test errors versus test failures
- testHome method / Testing the survey home page
- test interdependence, doctest issues
- about / Beware of test interdependence
- fixing / Beware of test interdependence
- tests.py file / Getting started: Creating a new application
- test support
- about / Additional test support
- additional HTTP methods, supporting / Supporting additional HTTP methods
- persistent state, maintaining / Maintaining persistent state
- e-mail services / E-mail services
- test-specific URL configuration, providing / Providing test-specific URL configuration
- template information / Response context and template information
- response context / Response context and template information
- testUpcoming method / Basic testing of the survey detail pages
- Toggle Stacktrace option / The SQL panel
- traceback information, debug page
- about / Traceback
- Traceback portion
- about / Breaking things on purpose
- transactional behavior
- testing / Testing transactional behavior
- TransactionTestCase / Testing transactional behavior, Using twill in a TestCase
- twill
- about / The twill web browsing and testing tool
- benefits / The twill web browsing and testing tool
- using, in TestCase / Using twill in a TestCase
- twill.commands module / Using twill in a TestCase
- twill command line program
- TypeError
U
- Unicode, doctest issues
- about / Beware of Unicode
- fixing / Beware of Unicode
- unittest.TestCase / Understanding the sample unit test
- unit tests
- data providing, ways / Providing data for unit tests
- data, providing in text fixtures / Providing data in test fixtures
- winning_answers function, implementing / Writing the function itself
- test, writing / Writing a test that uses the test data
- test data, extracting from database / Extracting the test data from the database
- test data, loading / Getting the test data loaded during the test run
- data, creating during test set up / Creating data during test set up
- organizing / Organizing tests
- unit tests, Survey save override function
- implementing / Unit tests for the Survey save override method
- unit test version, Survey save override function
- advantages / Pros of the unit test version
- disadvantages / Cons of the unit test version
- unreported problems, tracking
- about / Wheunreported problems, trackingaboutre to ask questions
- Community link / Wheunreported problems, trackingaboutre to ask questions
- questions help, locating / Wheunreported problems, trackingaboutre to ask questions
- question tips / Tips on asking questions that will get good answers
- new ticket, creating / Opening a new ticket to report a problem
- upcoming method / Creating data during test set up
- up command / The up and down commands
- urls.py file / Getting started: Creating a new application, CoApache/mod_wsgi configurationnew configuration, debuggingnfiguring Apache to serve static files
- urls attribute / Providing test-specific URL configuration
V
W
- whatis command / The whatis command
- where command / The where command, The up and down commands
- winning_answers function, unit tests
- implementing / Writing the function itself
- WSGI