learning a bit of django. following along with the getting started demo...
$ django-admin startproject mysite
$ cd mysite
$ python3 manage.py runserver
$ python3 manage.py startapp polls
$ python3 manage.py migrate
$ python3 manage.py makemigrations polls
$ python3 manage.py sqlmigrate polls 0001
$ python3 manage.py migrate
remember the three-step guide to making model changes:
- change your models (in models.py)
- run 'python3 manage.py makemigrations' to create migrations for those changes
- run 'python3 manage.py migrate' to apply those changes to the database
$ python3 manage.py createsuperuser admin, [email protected], admin
each view is responsible for doing one of two things: returning an HttpResponse object containing the content for the requested page, or raising an exception such as Http404.
Create a Python3 Virtual Environment:
python3 -m venv env
Activate the Virtual Environment:
source env/bin/activate
Deactivate the Virtual Environment:
deactivate
To Remove a Virtual Environment:
sudo em -rf venv
Automagically create a requirements.txt file:
pip3 freeze > requirements.txt