0% found this document useful (0 votes)
36 views

Django Setup Commands

The document outlines the steps taken to set up a Django development environment on a Windows machine. This includes creating a virtual environment, upgrading pip, installing Django and additional packages like django-binary-database-files. A Django project is then started and migrations are run to set up the database tables. Finally, the development server is started on port 8000.

Uploaded by

hamza khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Django Setup Commands

The document outlines the steps taken to set up a Django development environment on a Windows machine. This includes creating a virtual environment, upgrading pip, installing Django and additional packages like django-binary-database-files. A Django project is then started and migrations are run to set up the database tables. Finally, the development server is started on port 8000.

Uploaded by

hamza khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

PS C:\Users\hamza\django web> python -m venv env

PS C:\Users\hamza\django web>
PS C:\Users\hamza\django web> python -m pip install --upgrade pip
Requirement already satisfied: pip in c:\users\hamza\appdata\local\programs\python\
python310\lib\site-packages (22.0.4)
Collecting pip
Using cached pip-22.2.2-py3-none-any.whl (2.0 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 22.0.4
Uninstalling pip-22.0.4:
Successfully uninstalled pip-22.0.4
Successfully installed pip-22.2.2
PS C:\Users\hamza\django web> python -m pip install django
Collecting django
Downloading Django-4.1-py3-none-any.whl (8.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.1/8.1 MB 2.7 MB/s eta 0:00:00Collecting
tzdata
Downloading tzdata-2022.1-py2.py3-none-any.whl (339 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 339.5/339.5 kB 3.5 MB/s eta 0:00:00Collecting
sqlparse>=0.2.2
Downloading sqlparse-0.4.2-py3-none-any.whl (42 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.3/42.3 kB 2.1 MB/s eta 0:00:00Collecting
asgiref<4,>=3.5.2
Downloading asgiref-3.5.2-py3-none-any.whl (22 kB)
Installing collected packages: tzdata, sqlparse, asgiref, django
Successfully installed asgiref-3.5.2 django-4.1 sqlparse-0.4.2 tzdata-2022.1
PS C:\Users\hamza\django web> pip install django-binary-database-files
Collecting django-binary-database-files
Downloading django_binary_database_files-1.0.17-py3-none-any.whl (21 kB)
Collecting Django<5,>=2.2
Using cached Django-4.1-py3-none-any.whl (8.1 MB)
Collecting asgiref<4,>=3.5.2
Using cached asgiref-3.5.2-py3-none-any.whl (22 kB)
Collecting tzdata
Using cached sqlparse-0.4.2-py3-none-any.whl (42 kB)
Installing collected packages: tzdata, sqlparse, asgiref, Django, django-binary-
database-filesSuccessfully installed Django-4.1 asgiref-3.5.2 django-binary-
database-files-1.0.17 sqlparse-0.4.2 tzdata-2022.1
PS C:\Users\hamza\django web> django-admin startproject web_project .
PS C:\Users\hamza\django web> python manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying admin.0002_logentry_remove_auto_add... OK
Applying admin.0003_logentry_add_action_flag_choices... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying auth.0009_alter_user_last_name_max_length... OK
Applying auth.0010_alter_group_name_max_length... OK
Applying auth.0011_update_proxy_permissions... OK
Applying auth.0012_alter_user_first_name_max_length... OK
Applying sessions.0001_initial... OK
PS C:\Users\hamza\django web> python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).


August 10, 2022 - 10:04:33
Django version 4.1, using settings 'web_project.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[10/Aug/2022 10:05:13] "GET / HTTP/1.1" 200 10681
[10/Aug/2022 10:05:13] "GET /static/admin/css/fonts.css HTTP/1.1" 200 423
[10/Aug/2022 10:05:13] "GET /static/admin/fonts/Roboto-Regular-webfont.woff
HTTP/1.1" 200 85876
[10/Aug/2022 10:05:13] "GET /static/admin/fonts/Roboto-Light-webfont.woff HTTP/1.1"
200 85692
[10/Aug/2022 10:05:13] "GET /static/admin/fonts/Roboto-Bold-webfont.woff HTTP/1.1"
200 86184
Not Found: /favicon.ico
[10/Aug/2022 10:05:13] "GET /favicon.ico HTTP/1.1" 404 2115 (crlt + c to exit
server)
PS C:\Users\hamza\django web>

You might also like