So lets begin towards django setup
Steps
Step 1 First make your own Directory in windows Command prompt or in Powershell using command mkdir mydjango for example -mydjango i used here
Then simply change that directory using command cd Mydjango
Step 2 Then lets make your own virtual environment in that directory for that particular project using command python -m venv myenv
venv is virtual environment -m is for make i guess
After that you to activate your virtual environment using command
command :- myenv\Scripts\activate
Then you to install django in that particular directory using command
Command :- pip install django
Note:- in your system before doing this python is installed this is must for working of django commands and pip also
and after that for creating django project command is
Command :- django-admin.exe startproject mysite .
. for the directory structure if donot used then you can experience that i experience that :))
And after that you can run your project using
Command python manage.py runserver
127.0.0.1:8000 on your local system ok
and for creating app in django python manage.py startapp myapp
and for migrations of databases make sure add your app in settings.py file in installed app section ok
And for creating superuser for admin interface use command
Command :- python manage.py createsuperuser
and then migrate that particular file using
Command using python manage.py migrate
and check your browser for django project working
See using this command localhost:8000 port
View in image of my cmd
my django powershell command prompt view
Thnak you i hope you it for stay tuned suggestions are welcome
Connect me here for regular thoughts twitter
Check it out my own website here krishnakakade
Recommended IDE (integrated development environment for django) Pycharm for Sure :))
Top comments (0)