You have not configured database in your setup. Your error is popped up in
this case.
11 трав. 2015 18:57, користувач "SUBHABRATA BANERJEE" <
subhabrata.bane...@gmail.com> написав:

> Dear Group,
>
> I am pretty new to Django. I was using
> https://docs.djangoproject.com/en/1.8/intro/tutorial01/ to learn aspects
> of Django.
> As I gave the command in IDLE,
> from django.db import models
>
> I am getting the error as,
> Traceback (most recent call last):
>   File "<pyshell#2>", line 1, in <module>
>     from django.db import connection
>   File "C:\Python27\lib\site-packages\django\db\__init__.py", line 11, in
> <module>
>     if settings.DATABASES and DEFAULT_DB_ALIAS not in settings.DATABASES:
>   File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 53,
> in __getattr__
>     self._setup(name)
>   File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 46,
> in _setup
>     % (desc, ENVIRONMENT_VARIABLE))
> ImproperlyConfigured: Requested setting DATABASES, but settings are not
> configured. You must either define the environment variable
> DJANGO_SETTINGS_MODULE or call settings.configure() before accessing
> settings.
>
> I tried to do some research on the problem in internet and did not find
> anything much of use.
>
> I am using Windows 7 Professional, Python 2.7.9 and IDLE as GUI. I am
> using
> >>> django.get_version()
> '1.5.4'
> as my django version, and learnt more or less how to use command prompt as
> given in this tutorial.
>
> If anyone may kindly suggest how to solve the problem.
>
> Regards,
> Subhabrata Banerjee.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4a3531e6-de46-4106-bfaa-1787e9696d86%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/4a3531e6-de46-4106-bfaa-1787e9696d86%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADTRxJPmT%2BMqUs9qJ14uyqiiZHa_TK_2kY%3D%3DG%2BTiScTVCfTaSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to