﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
22559	Tutorial 5 - Missing few steps in instruction	Briksins@…	nobody	"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()
}}}

"	Uncategorized	closed	Documentation	1.6	Normal	invalid	Tutorial 5		Unreviewed	0	0	0	0	0	0
