Changes between Version 69 and Version 70 of NewbieMistakes


Ignore:
Timestamp:
Jun 28, 2018, 11:20:07 AM (6 years ago)
Author:
Michael Jonaitis
Comment:

This seems to be an issue with older versions of Django.

Legend:

Unmodified
Added
Removed
Modified
  • NewbieMistakes

    v69 v70  
    6565You're trying to get your URLconf files to work, but getting cryptic errors about how there is no module 'index' (where 'index' is some function you are trying to assign as a view), or module 'foo' has no attribute 'urlpatterns'.
    6666
    67 ==== Probable cause ====
     6777==== Probable cause ====
    6868
    6969You may have tried to load your view files using include() in the URLconf file (in tutorial 3, this is myproject/settings/urls/main.py). The include() call assumes that the file it's loading is also a URLconf file.
     
    449449==== Solution ====
    450450Make sure that template used to display the page actually contains the tags {% block content %} {% endblock %} wrapping your form definition in the template file.
     451
     452== The SECRET KEY setting must not be empty. ==
     453
     454==== Symptom ====
     455
     456You're attempting to run the Django shell from your terminal (ie.  python manage.py shell), for either the first time or after rebooting your system.  Instead of a Django shell opening, you are presented with the following error.
     457
     458django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
     459
     460
     461==== Probable cause ====
     462
     463A DJANGO_SETTINGS_MODULE has not been specified as an environment variable and therefore no settings file could be loaded as the shell attempts to open.
     464
     465==== Solution ====
     466
     467Add a DJANGO_SETTINGS_MODULE environment variable with the appropriate python module in your shell. 
     468
     469{{{
     470export DJANGO_SETTINGS_MODULE=<projectname>.settings
     471}}}
Back to Top