-
Notifications
You must be signed in to change notification settings - Fork 97
Quick Restart
Bartlomiej Mika edited this page Sep 19, 2017
·
1 revision
The goal of this article is to provide instructions on how to quickly format the project and restart it.
drop database academicstoday_db;
create database academicstoday_db;
\c academicstoday_db;
CREATE USER django WITH PASSWORD '123password';
GRANT ALL PRIVILEGES ON DATABASE academicstoday_db to django;
ALTER USER django CREATEDB;
ALTER ROLE django SUPERUSER;
-- CREATE EXTENSION postgis;
sudo -i -u postgres
psql
DROP DATABASE academicstoday_db;
CREATE DATABASE academicstoday_db;
\c academicstoday_db;
CREATE USER django WITH PASSWORD '123password';
GRANT ALL PRIVILEGES ON DATABASE academicstoday_db to django;
ALTER USER django CREATEDB;
-- ALTER ROLE django SUPERUSER;
-- CREATE EXTENSION postgis;
sudo -i -u postgres;
dropdb academicstoday_db;
createdb academicstoday_db;
psql academicstoday_db;
CREATE USER django WITH PASSWORD '123password';
GRANT ALL PRIVILEGES ON DATABASE academicstoday_db to django;
ALTER USER django CREATEDB;
ALTER ROLE django SUPERUSER;
-- CREATE EXTENSION postgis;
Just copy and paste this into your command console.
python manage.py makemigrations; \
python manage.py migrate_schemas; \
python manage.py populate_public; \
python manage.py setup_fixtures; \
python manage.py populate_site;