Python Django Web Framework - Full Course for Beginners
We have to set up virtualenv because manage third party packages easily.to start virtualenv we can just type,
$ virtualenv . # '.' points all files inside of folder
To start virtualenv enter that main folder, not root folder, just folder that keeps all project files inside and type,
$ source bin/activate
django-admin startproject [projectName] #type this inside of src file which we created before and is located main folder.
python manage.py runserver # type that inside of root folder.()
$ python manage.py startapp [modelName] #this line creates new model
$ python manage.py makemigrate #to migrate our models
$ python manage.py migrate #apply all migrations
$ python manage.py createsuperuser
$ pip freeze #Output installed packages in requirements format.
main folder stands for folder that keep whole project files.
root folder' stands for folder that keeps that only project files and also keeps manage.py*.Mostly, root folder is '/src' folder.