diff --git a/README.rst b/README.rst index 01039109ce246aa444ec7a2dc0307aa57dbfcea6..35568149310e9fbc38e4f7ee17b927780ac8bf5e 100644 --- a/README.rst +++ b/README.rst @@ -13,17 +13,20 @@ To get setup you must have the following installed: * virtualenv 1.11 In Debian or Ubuntu (or derivatives) you should be able to achieve this with this command:: + $ sudo apt-get install libmysqlclient-dev libjpeg-dev python3.5-dev virtualenv Setting up the environment -------------------------- Create a virtual environment where the dependencies will live:: + $ virtualenv -p python3.5 python $ source python/bin/activate (python)$ Change into the base directory of this software and install the project dependencies:: + (python)$ pip3 install -r requirements.txt Setting up the database @@ -32,11 +35,13 @@ Setting up the database By default the project is set up to run on a SQLite database. Create a file pv/local_settings.py and add at least the line:: + SECRET_KEY = 'secret key' (obviously replacing "secret key" with a key of your choice). Then run:: + (python)$ python manage.py migrate (python)$ python manage.py loaddata program/fixtures/*.yaml @@ -46,6 +51,7 @@ Setting up MySQL **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):: + DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', @@ -56,6 +62,7 @@ To use MySQL, add the following to your local_settings.py (before migrating):: } Create a file pv/mysql.cnf and give your MySQL credentials:: + [client] database = host = localhost @@ -68,12 +75,15 @@ 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:: + (python)$ python manage.py createsuperuser + Running a web server -------------------- In development you should run:: + (python)$ python manage.py runserver diff --git a/requirements.txt b/requirements.txt index 207448256a970634a1cc194abd45f825af692cc8..2c83ad75b4a873227647198c5f37b1d1ec311e4b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,6 +5,6 @@ PyYAML==3.12 django-tinymce==2.6.0 python-dateutil==2.6.0 django-versatileimagefield==1.8.1 -djangorestframework +djangorestframework=3.7.3 drf-nested-routers==0.90.0 django-oidc-provider==0.5.2 \ No newline at end of file