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

Added requirements and installation instructions for using PostgreSQL and...

Added requirements and installation instructions for using PostgreSQL and apparently there were another migration necessary.
parent 311ad6a1
No related branches found
No related tags found
No related merge requests found
Pipeline #435 failed
......@@ -10,4 +10,5 @@ pv/site_media/note_images/*
pv/site_media/host_images/*
pv/site_media/__sized__/*
pv/cache/*
pv/mysql.cnf
\ No newline at end of file
pv/mysql.cnf
pv/postgresql.cnf
\ No newline at end of file
......@@ -15,13 +15,20 @@ and log into it at http://127.0.0.1:8000/admin/ with username "admin" and passwo
To get setup you must have the following installed:
* MySQL-Client Development libraries
* PostgresSQL or MySQL-Client Development libraries
* JPEG library development files
* Python 3.5 including Development files
* virtualenv 1.11
In Debian or Ubuntu (or derivatives) you should be able to achieve this with this command::
Using PostgreSQL:
$ sudo apt-get install postgresql postgresql-contrib libjpeg-dev python3.5-dev virtualenv
Using MySQL:
$ sudo apt-get install libmysqlclient-dev libjpeg-dev python3.5-dev virtualenv
Setting up the environment
......@@ -57,6 +64,26 @@ Open pv/local_settings.py again and add the line::
USE_TZ = False
Setting up PostgreSQL
----------------
We recommend using PostgreSQL in order to be able to use the collation utf8mb64_unicode_ci and thus being able to display all languages.
To use PostgreSQL, add the following to your local_settings.py (before migrating) and add your credentials::
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': '',
'USER': '',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': '5432'
}
}
Setting up MySQL
----------------
......
# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2019-08-10 11:46
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('program', '0017_auto_20180314_1409'),
]
operations = [
migrations.AlterField(
model_name='show',
name='cba_series_id',
field=models.IntegerField(blank=True, help_text="Link your show to a CBA series by giving its ID. This will enable CBA upload and will automatically link your show to your CBA archive. Find out your show's ID under https://cba.fro.at/series", null=True, verbose_name='CBA Series ID'),
),
migrations.AlterField(
model_name='show',
name='fallback_id',
field=models.IntegerField(blank=True, help_text='If a timeslot of your show is empty, this playlist will be aired as a backup.', null=True, verbose_name='Fallback ID'),
),
migrations.AlterField(
model_name='show',
name='logo',
field=models.ImageField(blank=True, help_text='Upload a logo of your show.', null=True, upload_to='show_images', verbose_name='Logo'),
),
migrations.AlterField(
model_name='show',
name='short_description',
field=models.TextField(help_text='Describe your show for your listeners in some sentences. Avoid technical data like airing times and contact information. They will be added automatically.', verbose_name='Short description'),
),
]
......@@ -43,6 +43,15 @@ DATABASES = {
'NAME': os.path.join(PROJECT_DIR, 'dev_data.sqlite'),
},
"""
'default': {
'ENGINE': 'django.db.backends.postgresql',
'OPTIONS': {
'read_default_file': os.path.join(PROJECT_DIR, 'postgresql.cnf'),
},
},
"""
"""
# MySQL
'default': {
......@@ -50,8 +59,9 @@ DATABASES = {
'OPTIONS': {
'read_default_file': os.path.join(PROJECT_DIR, 'mysql.cnf'),
},
}
},
"""
# Deprecated
'nop': {
'ENGINE': 'django.db.backends.sqlite3',
......
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