$ psql -U postgres -a -f ./create_postgresql_db.sql
password for postgres:
create role testusr LOGIN NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
CREATE ROLE
create database "TestusrDb" with owner = testusr ENCODING = 'UTF8' CONNECTION LIMIT = -1;
CREATE DATABASE
alter role testusr with password 'password1!';
ALTER ROLE
$ python manager.py createsuperuser
Username: admin
Email: admin@test.com
Password:
Password (again):
This password is too common.
Bypass password validation and create user anyway? (y/N): y
Superuser created successfully.
start server
$ python manage.py runserver
just clone
$ cd venv
$ git clone https://github.com/asulikeit/django-jwt.git
$ source bin/activate
(django-jwt)$ cd django-jwt/
(django-jwt)$ sudo su postgres -c "psql -h localhost -p 5432 -a -f scripts/create_postgresql_db.sql"
(django-jwt)$ pip install -r requirements.txt
(django-jwt)$ python manage.py migrate
(django-jwt)$ $ python manage.py createsuperuser
Username: admin
Email: admin@test.com
Password:
Password (again):
Bypass password validation and create user anyway? (y/N): y
Superuser created successfully.
(django-jwt)$ python manage.py runserver
(django-jwt)$