andreahi / SAKS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Run server with
> python manage.py runserver 37.191.215.88:8000

Update the database after making changes to model
> python manage.py schemamigration Norskkurs --auto
> python manage.py migrate Norskkurs


How to set up guide:
https://www.digitalocean.com/community/articles/how-to-install-and-configure-django-with-postgres-nginx-and-gunicorn

DATABASE COMMANDS:

database console:
sudo su - postgres
psql

connect to database:
\c nkdb

list all tables:
\dt


If you dont mind feeling dirty, how to delete and recreate DB:
sudo su - postgres
dropdb nkdb
createdb nkdb
psql
GRANT ALL PRIVILEGES ON DATABASE nkdb TO myuser;
\q
exit

delete migrations and then:
python manage.py syncdb --migrate

Fake it till you make it:
python manage.py migrate Norskkurs --fake

About


Languages

Language:Python 40.5%Language:HTML 31.8%Language:C 20.2%Language:JavaScript 4.2%Language:CSS 3.0%Language:Makefile 0.3%Language:Shell 0.0%