Problem to work with Django

0

I'm trying to work with Django and I could not. I can not access Django from the cmd. Do we have to configure something in the path to work with Django? - C: \ Django-1.10.8 \ django \ bin--

I have the correct path with Python, and add Django to the environment variables. - C: \ Users \ Diego \ AppData \ Local \ Programs \ Python \ Python36-32 \ Scripts \ C: \ Django-1.10.8 \ django \ bin -

If someone can tell me something, it would be very helpful.

    
asked by Diego Porro 05.12.2017 в 21:24
source

2 answers

0

Your problem is that you did not put a semicolon between each variable in the path:

So you have it:

C:\Users\Diego\AppData\Local\Programs\Python\Python36-32\Scripts\C:\Django-1.10.8\django\bin 

It should be like this:

C:\Users\Diego\AppData\Local\Programs\Python\Python36-32\Scripts\;C:\Django-1.10.8\django\bin 
    
answered by 07.12.2017 в 04:14
0

I'm going to advance a bit with this answer xq really is not entirely clear your question, but I think this may be your problem.

Starting from saying you already have Python added to the path.

Responding to Do you have to configure something in the path to work with Django?

  • The path to the folder that contains the Python executable
  • The path to the Scripts folder that must be at the same level as the python executable.
  • Django's folder does not.

    After this you can install Django via Pip or directly by running setup.py

    Ex 1 - without PIP: python <path_to_django_folder>\setup.py install

    Ex 2 - with PIP: pip install django or pip install <path_to_django_folder>\django.tar.gz

    Then you can use create a project in the following way:

    python django-admin.py startproject <path_for_project>
    

    or

    django-admin startproject <path_for_project>
    

    I hope it solves you. PS: you should study how you use virtual environments so you can use the necessary packages for each project.

        
    answered by 06.12.2017 в 16:26