Skip to content
Snippets Groups Projects
Commit 2c3243ac authored by Ingo Leindecker's avatar Ingo Leindecker
Browse files

Why is .rst so different to .md?

parent 9c71d91d
No related branches found
No related tags found
No related merge requests found
# AURA Steering: Program Scheduler ================================
AURA Steering: Program Scheduler
================================
## Installation Installation
--------------- ------------
To get setup you must have the following installed: To get setup you must have the following installed:
* MySQL-Client Development libraries * MySQL-Client Development libraries
* JPEG library development files * JPEG library development files
* Python 3.5 including Development files * Python 3.5 including Development files
* virtualenv 1.11 * virtualenv 1.11
In Debian or Ubuntu (or derivatives) you should be able to achieve this with this command: 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 $ sudo apt-get install libmysqlclient-dev libjpeg-dev python3.5-dev virtualenv
```
## Setting up the environment Setting up the environment
----------------------------- --------------------------
Create a virtual environment where the dependencies will live: Create a virtual environment where the dependencies will live::
```
$ virtualenv -p python3.5 python $ virtualenv -p python3.5 python
$ source python/bin/activate $ source python/bin/activate
(python)$ (python)$
```
Change into the base directory of this software and install the project dependencies: Change into the base directory of this software and install the project dependencies::
```
(python)$ pip3 install -r requirements.txt (python)$ pip3 install -r requirements.txt
```
## Setting up the database Setting up the database
-------------------------- -----------------------
By default the project is set up to run on a SQLite 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 Create a file pv/local_settings.py and add at least the line::
```
SECRET_KEY = 'secret key' SECRET_KEY = 'secret key'
```
(obviously replacing "secret key" with a key of your choice). (obviously replacing "secret key" with a key of your choice).
Then run: Then run::
```
(python)$ python manage.py migrate (python)$ python manage.py migrate
(python)$ python manage.py loaddata program/fixtures/*.yaml (python)$ python manage.py loaddata program/fixtures/*.yaml
```
### Setting up MySQL 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). __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',
...@@ -68,11 +60,9 @@ To use MySQL, add the following to your local_settings.py (before migrating): ...@@ -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] [client]
database = database =
host = localhost host = localhost
...@@ -80,24 +70,20 @@ Create a file pv/mysql.cnf and give your MySQL credentials: ...@@ -80,24 +70,20 @@ 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.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment