Skip to content

Instantly share code, notes, and snippets.

@bsweger
Created August 28, 2011 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsweger/1177423 to your computer and use it in GitHub Desktop.
Save bsweger/1177423 to your computer and use it in GitHub Desktop.
create Django project in Windows 7 virtualenv
#Alternate to the django-admin.py startproject command.
#In windows, using 'django-admin.py startproject' is problematic...the .py extension
#is associated with the main install of Python, not the install on the current virtualenv, which fouls things up (e.g., import errors). Code below:
#1. forces module mode, which will check the path for django-admin (interpreter searches the path for modules but not for scripts)
#2. no more .py extension
#see http://stackoverflow.com/questions/2542674/no-matter-what-i-do-django-admin-py-is-not-found-even-though-its-in-my-path
-m django-admin startproject tutorial
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment