Sunday, November 27, 2011

startproject

Hi !
Command django-admin.py startproject stopped work on my computer (it
worked well in the past), I get:
Usage: django-admin.py subcommand [options] [args]
etc.
I found it was because I have set another Python version last week. At
first I got such a message:

Traceback (most recent call last):
File "C:\python26\lib\site-packages\django\bin\django-admin.py",
line 2, in <module>
from django.core import management
ImportError: No module named django.core

Then I removed the 2nd Python version. Now I get the message I wrote
on the top.
I can not fix this problem.
I use Windows 7, Python 2.6.6, Django 1.3.
PATH=C:\python26\lib\site-packages\django\bin\;
PYTHONPATH=C:\python26
There was similar question
https://groups.google.com/group/django-users/browse_thread/thread/6fbeaa486de657a8/9295d515ce9f79ae?hl=ru&lnk=gst&q=startproject#9295d515ce9f79ae
I think there was no satisfactory answer.
This is a copy of my screen:
c:\DjangoMySites>django-admin.py startproject newsite
Usage: django-admin.py subcommand [options] [args]
Options:
-v VERBOSITY, --verbosity=VERBOSITY
Verbosity level; 0=minimal output, 1=normal
output,
2=all output
--settings=SETTINGS The Python path to a settings module, e.g.
"myproject.settings.main". If this isn't
provided, the
DJANGO_SETTINGS_MODULE environment variable
will be
used.
--pythonpath=PYTHONPATH
A directory to add to the Python path, e.g.
"/home/djangoprojects/myproject".
--traceback Print traceback on exception
--version show program's version number and exit
-h, --help show this help message and exit
Type 'django-admin.py help <subcommand>' for help on a specific
subcommand.
Available subcommands:
cleanup
compilemessages
...
startproject
syncdb
test
testserver
validate

DJANGO_SETTINGS_MODULE , I think, is not wrong:
c:\DjangoMySites>DJANGO_SETTINGS_MODULE
"DJANGO_SETTINGS_MODULE" is not internal or external command,
executable program or a batch file".

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment