Quick Restart - AcademicsToday/academicstoday-django GitHub Wiki
Quickly Restarting Academics Today Project
Description
The goal of this article is to provide instructions on how to quickly format the project and restart it.
Instructions
MacOS Database
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;
Ubuntu Database
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;
CentOS 7 Database:
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;
Restart Script
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;