To more easily use Django on Windows, create a dos .bat file in Django’s bin directory named django-admin.bat with the following content:
@%~dp0\..\..\..\..\python.exe %~dp0\django-admin.py %\*
and add Django’s bin directory to your PATH:
set DJANGO_HOME=C:\Development\tools\Python25\Lib\site-packages\django
set PATH=%DJANGO_HOME%\bin;%PATH%
You can now use django-admin from anywhere without specifying the full path.
(I kept getting ImportError: No module named django.core when trying to invoke django-admin.py from the commandline)
Leave a comment