0

whenever i give django-admin.py startproject

i get a notepad of django-admin. So that means i type in my website inside that ?

i have executed the django-admin.py and django-admin.pyc in cmd also. Still it shows. What should I do ?

GiftZwergrapper
  • 2,602
  • 2
  • 20
  • 40
cybersaki
  • 1
  • 2
  • I wonder why do you go to the django site-package directory and execute django-admin.py... Even the cmd window does not seem to execute `django-admin startproject mysite` as guided in the [docs](https://docs.djangoproject.com/en/1.9/intro/tutorial01/#creating-a-project) May I ask what is your objective of doing this? – Leonard2 Mar 26 '16 at 13:53

1 Answers1

0

You have - for some reason - created a virtual environment inside the actual Python source directory on Windows.

There is nothing wrong with this, except you may face issues when you uninstall or upgrade Python.

To fix your immediate problem, you need to follow these steps:

  1. Close all command prompt windows.
  2. Open a new command prompt.
  3. Type the following and hit ENTER which will activate your virtual environment:

    C:\Python27\Scripts\pymote_ven\Scripts\activate.bat
    
  4. Now, type the following to start your project:

    python django-admin.py startproject nameofyourproject
    

You should also read the documentation because you have confused the directories that are involved.

Burhan Khalid
  • 169,990
  • 18
  • 245
  • 284
  • I activated it. I went inside mode. And I started by giving a name for the project also. But it still shows the text file popping django-admin. – cybersaki Mar 26 '16 at 13:06
  • On your system `.py` files have been associated with notepad. To fix this, see [this question](http://stackoverflow.com/questions/8196314/how-do-you-change-file-association-for-py-python-files-in-xp). – Burhan Khalid Mar 26 '16 at 13:08