Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In most cases this means that the <strong>previous</strong> SQL statement failed to execute. In this case you should:</p> <ol> <li><p><strong>Enable SQL <a href="https://docs.djangoproject.com/en/dev/topics/logging/#id1">logging</a></strong>, see the following snippet to paste in settings.py</p></li> <li><p><strong>Set DEBUG=1</strong>, or SQL won't be logged</p></li> <li><p><strong>Run runserver again</strong>, and you should see all SQL queries in the console</p></li> <li><p><strong>Execute the last SQL queries directly in your database</strong>, you should then find which queries fail and then you should be able to debug them - or open a new question which is specific to the query that causes the problem. You can use phpMyAdmin, or directly a CLI client, or whatever database client, to execute the SQL queries one by one until you find the one that needs some love.</p></li> </ol> <p>SQL Logging configuration:</p> <pre><code>LOGGING = { 'version': 1, 'disable_existing_loggers': True, 'formatters': { 'simple': { 'format': '%(levelname)s %(message)s', }, }, 'handlers': { 'console':{ 'level':'DEBUG', 'class':'logging.StreamHandler', 'formatter': 'simple' }, }, 'loggers': { 'django': { 'handlers': ['console'], 'level': 'DEBUG', }, } } </code></pre> <p>If this configuration does not provide any additional console output with <code>runserver</code>, then feel free to try <a href="http://django-autocomplete-light.readthedocs.org/en/latest/demo.html">django-autocomplete-light's example test_project</a>:</p> <ol> <li><p>Read and paste the installation commands in <code>/tmp</code></p></li> <li><p>Change dir to <code>autocomplete_light_env/src/django-autocomplete-light/test_project</code></p></li> <li><p>Open <code>test_project/settings.py</code>, replace the <code>LOGGING</code> configuration by the one above</p></li> <li><p>Runserver and open your browser</p></li> </ol> <p>Your console will look like:</p> <pre><code>Validating models... 0 errors found Django version 1.4.1, using settings 'test_project.settings' Development server is running at http://127.0.0.1:8000/ Quit the server with CONTROL-C. DEBUG (0.001) SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = taggable AND "django_content_type"."app_label" = charfield_autocomplete ); args=('taggable', 'charfield_autocomplete') DEBUG (0.000) SELECT DISTINCT "tagging_tag".id, "tagging_tag".name FROM "tagging_tag" INNER JOIN "tagging_taggeditem" ON "tagging_tag".id = "tagging_taggeditem".tag_id INNER JOIN "charfield_autocomplete_taggable" ON "tagging_taggeditem".object_id = "charfield_autocomplete_taggable"."id" WHERE "tagging_taggeditem".content_type_id = 11 GROUP BY "tagging_tag".id, "tagging_tag".name ORDER BY "tagging_tag".name ASC; args=[] </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload