Your amazing help center

A nice template to quickly get you started.

Apache Settings

PassengerEnabled On

Nginxs Settings

passenger_enabled on;
passenger_app_type wsgi;
passenger_startup_file passenger_wsgi.py;

passenger_wsgi.py

import sys, os
ApplicationDirectory = 'CMS'
ApplicationName = 'CMS'
VirtualEnvDirectory = 'python-app-venv'
VirtualEnv = os.path.join(os.getcwd(), VirtualEnvDirectory, 'bin', 'python')
if sys.executable != VirtualEnv: os.execl(VirtualEnv, VirtualEnv, *sys.argv)
sys.path.insert(0, os.path.join(os.getcwd(), ApplicationDirectory))
sys.path.insert(0, os.path.join(os.getcwd(), ApplicationDirectory, ApplicationName))
sys.path.insert(0, os.path.join(os.getcwd(), VirtualEnvDirectory, 'bin'))
os.chdir(os.path.join(os.getcwd(), ApplicationDirectory))
os.environ.setdefault('DJANGO_SETTINGS_MODULE', ApplicationName + '.settings')
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

Install VirtualEnviroment

python3 -m virtualenv -p python3 python-app-venv

Activate VirtualEnviroment

source ./python-app-venv/bin/activate

Django Install

pip install django

Alle Apps aus Requirements installieren

pip install -r requirements.txt

Update all Apps installed

pip freeze --local | grep -v '^\-e' | cut -d = -f 1  | xargs -n1 pip install -U

CMS Install

pip install django-cms

Create CMS App

djangocms CMS_APP_NAME

Zugriff über Web erlauben

sed -i "s/ALLOWED_HOSTS = \[\]/ALLOWED_HOSTS = ['*']/" djangoProject/djangoProject/settings.py

Create Nginx Cache

mkdir tmp

Apache Cache leeren

touch tmp/restart.txt

Erstellen eines SSH Keys

Beschreibung

ssh-keygen -t rsa
pbcopy < ~/.ssh/id_rsa.pub

Pagename und Page set Auto

Automatisch den Pagenamen und die Aktuelle Seite aus den Einstellungen übernehmen

{{request.site.name}} - {% page_attribute 'title' %}

in Django Settings Middelware
'django.contrib.sites.middleware.CurrentSiteMiddleware',