This website introduces us to a basic logic django blog application with user authorisation and drf included.
$ python -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
Note:
- You need to create your own postgres database in order for it to work using
$ CREATE USER blog WITH PASSWORD '<password>'; #set a password
$ CREATE DATABASE blog OWNER blog ENCODING 'UTF8';
- First of all you need to create db
$ python manage.py makemigrations
$ python manage.py migrate
- You need to either load your own data later via admin or load them from preinstalled in the project json file mysite_json.data
$ python -Xutf8 manage.py loaddata mysite_data.json
- login: admin
- password: admin
$ python manage.py createsuperuser
- If you want to check how email recommendation works you need to create your own .env file
$ touch .env
- Follow all steps here click and get 16-digit code
EMAIL_HOST = '' #your email from which you're going to send recommendations
EMAIL_PASSWORD = '' #your 16-digit code
$ python manage.py runserver
EMAIL_HOST = ''
EMAIL_PASSWORD = ''
DB_PASSWORD = ''
GITHUB_CLIENT_ID=''
GITHUB_SECRET_KEY=''
GOOGLE_CLIENT_ID=''
GOOGLE_SECRET_KEY=''