__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).
__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 = {
DATABASES = {
'default': {
'default': {
'ENGINE': 'django.db.backends.mysql',
'ENGINE': 'django.db.backends.mysql',
...
@@ -61,9 +61,9 @@ To use MySQL, add the following to your local_settings.py (before migrating):
...
@@ -61,9 +61,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]
[client]
database =
database =
host = localhost
host = localhost
...
@@ -71,21 +71,21 @@ Create a file pv/mysql.cnf and give your MySQL credentials:
...
@@ -71,21 +71,21 @@ Create a file pv/mysql.cnf and give your MySQL credentials:
user =
user =
password =
password =
default-character-set = utf8
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
(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
(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.
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.