1) Create a Python virtual environment
C:\Users\Owner> cd desktop
C:\Users\Owner\desktop> py -m venv env
C:\Users\Owner\desktop> cd env
C:\Users\Owner\desktop\env> Scripts\activate
(env)C:\Users\Owner\desktop\env>
2) Install Django
(env)C:\Users\Owner\desktop\env> pip install django
3) Make sure Django installed
(env)C:\Users\Owner\desktop\env> pip show django
4) Create the Django project
(env)C:\Users\Owner\desktop\env> django-admin startproject mysite
5) Create a Django app
(env)C:\Users\Owner\desktop\env> cd mysite
(env)C:\Users\Owner\desktop\env\mysite> py manage.py startapp main
6) Run the local development server
(env) C:\Users\Owner\Desktop\Code\env\mysite>py manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
You have 17 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
February 26, 2019 - 09:54:26
Django version 3.0.6, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-C.
7) Open the development server address in your browser
Look for the address http://127.0.0.1:8000/ above in the CLI then copy and paste this URL in a new browser window. A web page with a rocket will appear stating your installation was successful.
8) Congrats! You now have a Django project. From here, you need to configure your web app to display your custom templates.
Top comments (0)