Background Image
Table of Contents Table of Contents
Previous Page  278 / 478 Next Page
Information
Show Menu
Previous Page 278 / 478 Next Page
Page Background

Figure 15-2. Debugging Ajax requests in the Firefox network console

If it’s not working when you try it manually, and you see “audience

mismatch” errors in the console, make sure you’re visiting the site via

http://localhost:

8000

, and not

127.0.0.1

.

Aside: Logging to stderr

While spiking, it’s pretty critical to be able to see exceptions that are being generated by

your code. Annoyingly, Django doesn’t send all exceptions to the terminal by default,

but you can make it do so with a variable called

LOGGING

in

settings.py

:

superlists/settings.py (ch15l011).

LOGGING

=

{

'version'

:

1

,

'disable_existing_loggers'

:

False

,

'handlers'

: {

'console'

: {

'level'

:

'DEBUG'

,

'class'

:

'logging.StreamHandler'

,

250

|

Chapter 15: User Authentication, Integrating Third-Party Plugins, and Mocking with JavaScript