Create virtual environment
python -m venv venv
Active virtual environment
venv\Scripts\activate
Install necessary package (setuptools: for No module named pkg_resources Error)
pip install django pymysql cloudinary pillow django-ckeditor djangorestframework drf-yasg django-oauth-toolkit django-debug-toolbar python-dotenv setuptools twilio google-auth django-cors-headers
Config and Login with Social Accounts
pip install django-allauth, django_extensions
Create cert and key
pip install Werkzeug, pyOpenSSL
Config send SMS
pip install twilio
Create database in mySQL
Run migrate
python manage.py migrate
Create superuser
python manage.py createsuperuser
Run server
python manage.py runserver
Show all URLs (Optional)
python manage.py show_urls
Run localhost with HTTPS (Optional)
python manage.py runserver_plus --cert-file cert.pem --key-file key.pem
Insecure Login Block Solution:
- Using NgroK
- Using Passport strategy
- Using cert.pem & key.perm
https://docs.allauth.org/en/latest/installation/quickstart.html
https://django-extensions.readthedocs.io/en/latest/runserver_plus.html