On Thu, Apr 25, 2013 at 2:56 PM, Iftikhar Ali <
iftikh...@gmail.com> wrote:
> when i am running the project it is running perfectly fine but when i am
> trying to open django-admin.py shell the error:
Don;t use django-admin to launch the shell, only use django-admin to
create projects¹. Once you have created your project using
django-admin.py, use the manage.py script it created inside your
project to interact in any with it - creating apps, running syncdb,
accessing the project shell.
See the docs here:
https://docs.djangoproject.com/en/1.5/ref/django-admin/#django-admin-py-and-manage-py
The reason you want to use manage.py over django-admin,py is that
manage.py can usually find your settings automatically - it
automatically sets the environment variable DJANGO_SETTINGS_MODULE to
the correct value.
Cheers
Tom
¹ Or standalone apps. For apps within the project, you use manage.py
startapp, like everything else in the project.