This is some of the code from my website mrevanishere.
pip
sudo apt-get update
sudo apt-get install libpq-dev python-dev
pip3 install django
pip3 install django-ckeditor
pip3 install psycopg2-binary psycopg2
- Create a venv and install requirements sudo pip3 install virtualenv
- django
- Gitflow
- on Linode #TODO move to AWS
- apache #TODO move to nginx
- SQLite #TODO move to PostgreSQL or MongoDB
- add auth0 login (as fastapi separate service)
- manage the server on a container instead of base OS
- TODO: change db keys to env files
- Load dev branch + VENV + pip + test run,
- make multiple branches (dev branch and master branch)
- python manage.py check
- update requirements.txt
- Commit and push to dev branch
- Merge everything except settings to master
- push to dev parts to master
- apache reload
django-admin startproject mysite
python manage.py startapp <name of app>
- in site settings
- update INSTALLED_APPS with apps
- updated ALLOWED_HOSTS to localhost, 127.0.0.1 for dev
- Configure blog app
python manage.py makemigrations
- add a user with https://docs.djangoproject.com/en/3.2/topics/auth/default/ https://docs.djangoproject.com/en/3.2/topics/auth/default/#creating-users
- only staff users can view forms
- Create DB separate from webserver (MongoDB on AWS)
I wanted to build this to have a nice place to host my future projects and portfolio and to learn Django.
Built with LAPP stack (Linux, Apache, PostgreSQL, Python)
- Django
- debian
- apache
- PostgreSQL
- SQLite
- https
Home / Updates
A list of places to find me.