__Note:__ When adding your database, make sure you _don't_ use the collation _utf8mb4_unicode_ci_ or you will get a key length error during migration. (use e.g. _utf8_general_ci_ instead).
To use MySQL, add the following to your local_settings.py (before migrating):
To use MySQL, add the following to your local_settings.py (before migrating)::
```
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
...
...
@@ -68,11 +60,9 @@ To use MySQL, add the following to your local_settings.py (before migrating):
},
}
}
```
Create a file pv/mysql.cnf and give your MySQL credentials:
Create a file pv/mysql.cnf and give your MySQL credentials::
```
[client]
database =
host = localhost
...
...
@@ -80,24 +70,20 @@ Create a file pv/mysql.cnf and give your MySQL credentials:
user =
password =
default-character-set = utf8
```
## Adding an admin user
-----------------------
Adding an admin user
--------------------
In order to create an admin user (which you will need to login to the webinterface after the next step) run:
In order to create an admin user (which you will need to login to the webinterface after the next step) run::
```
(python)$ python manage.py createsuperuser
```
## Running a web server
-----------------------
Running a web server
--------------------
In development you should run:
In development you should run::
```
(python)$ python manage.py runserver
```
After this you can open http://127.0.0.1:8000/admin in your browser and log in with the admin credential you created previously.