Changes between Version 69 and Version 70 of NewbieMistakes
- Timestamp:
- Jun 28, 2018, 11:20:07 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NewbieMistakes
v69 v70 65 65 You'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'. 66 66 67 ==== Probable cause ====67 77==== Probable cause ==== 68 68 69 69 You 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. … … 449 449 ==== Solution ==== 450 450 Make 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 456 You'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 458 django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty. 459 460 461 ==== Probable cause ==== 462 463 A 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 467 Add a DJANGO_SETTINGS_MODULE environment variable with the appropriate python module in your shell. 468 469 {{{ 470 export DJANGO_SETTINGS_MODULE=<projectname>.settings 471 }}}