Apache Settings
PassengerEnabled On
A nice template to quickly get you started.
PassengerEnabled On
passenger_enabled on;
passenger_app_type wsgi;
passenger_startup_file 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()
python3 -m virtualenv -p python3 python-app-venv
source ./python-app-venv/bin/activate
pip install django
pip install -r requirements.txt
pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U
pip install django-cms
djangocms CMS_APP_NAME
sed -i "s/ALLOWED_HOSTS = \[\]/ALLOWED_HOSTS = ['*']/" djangoProject/djangoProject/settings.py
mkdir tmp
touch tmp/restart.txt
Beschreibung
ssh-keygen -t rsa
pbcopy < ~/.ssh/id_rsa.pub
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',