#22559: Tutorial 5 - Missing few steps in instruction -------------------------------+------------------------ Reporter: Briksins@… | Owner: nobody Type: Uncategorized | Status: new Component: Documentation | Version: 1.6 Severity: Normal | Keywords: Tutorial 5 Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+------------------------ DJango v1.6.4
'''Problem:''' In the Tutorial 5 - at the begining of the "Test View" part we have pythin console code to execute: {{{ >>> from django.test.utils import setup_test_environment >>> setup_test_environment() }}} however import of "setup_test_environment" doesnt work and throw exception: {{{ django.core.exceptions.ImproperlyConfigured: Requested setting CACHES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before acces sing settings. }}} however to execute {{{ settings.configure() }}} we have to import "settings" {{{ from django.conf import settings }}} '''Solution:''' To fix tutorial flow need to change current console code of 2 lines to the 4 lines like this: {{{ >>> from django.conf import settings >>> settings.configure() >>> from django.test.utils import setup_test_environment >>> setup_test_environment() }}} -- Ticket URL: <https://code.djangoproject.com/ticket/22559> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/061.86fff767515450197576d950ef7f4ed3%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.