How to solve SyntaxError on autogenerated manage.py?

前端 未结 30 2128
囚心锁ツ
囚心锁ツ 2020-11-28 08:24

I\'m following the Django tutorial https://docs.djangoproject.com/es/1.10/intro/tutorial01/

I\'ve created a \"mysite\" dummy project (my very first one) and try to

30条回答
  •  清酒与你
    2020-11-28 08:45

    It's best to create a virtual environment and run your Django code inside this virtual environment, this helps in not changing your existing environments. Here are the basic steps to start with the virtual environment and Django.

    1. Create a new Directory and cd into it.

      mkdir test , cd test

    2. Install and Create a Virtual environment.

      python3 -m pip install virtualenv virtualenv venv -p python3

    3. Activate Virtual Environment: source venv/bin/activate

    4. Install Django: pip install django

    5. Start a new project: django-admin startproject myproject

    6. cd to your project and Run Project:

      cd myproject , python manage.py runserver

    7. You can see your project here : http://127.0.0.1:8000/

提交回复
热议问题