Update 4-authentication-and-permissions.md: add note about PostgreSQL

I'm using PostgreSQL instead of SQLite and got a nice error message when I only flushed the db with `python manage.py flush`. It turns out you need to drop the whole db.

The error message was: `column snippets_snippet.owner_id does not exist`
This commit is contained in:
Mice Pápai 2017-08-23 13:16:44 +02:00
parent 08ec276850
commit 1de1185a1f

View File

@ -47,6 +47,8 @@ Normally we'd create a database migration in order to do that, but for the purpo
rm -r snippets/migrations rm -r snippets/migrations
python manage.py makemigrations snippets python manage.py makemigrations snippets
python manage.py migrate python manage.py migrate
Note: If you're using PostgreSQL, you should drop your database with the `DROP DATABASE your_db_name` SQL command instead of deleting the db.sqlite3 file.
You might also want to create a few different users, to use for testing the API. The quickest way to do this will be with the `createsuperuser` command. You might also want to create a few different users, to use for testing the API. The quickest way to do this will be with the `createsuperuser` command.