type: install version: 1.7 id: djangocms name: Django CMS homepage: https://www.django-cms.org/ baseUrl: https://cdn.jsdelivr.net/gh/jelastic-jps/django-cms@master description: Django CMS is an open-source content management system with a user-friendly interface and rich feature set. Django CMS is aimed at helping developers to take applications from concept to completion as quickly as possible, avoiding common security issues, and flexibly scaling your busy websites. logo: images/cms_icon.png globals: webroot: /var/www/webroot/ password: ${fn.password} RESET_PASS_SCRIPT: /var/www/webroot/ROOT/resetpassword.sh ssl: true skipNodeEmails: true nodes: nodeType: apache-python engine: python3.12 cloudlets: 8 onInstall: - cmd[cp]: |- cd ${globals.webroot} && rm -rf ROOT python3 -m venv ${globals.webroot} source bin/activate pip install --upgrade pip pip install django-cms djangocms --noinput --username admin --email ${user.email} ROOT . echo "STATIC_ROOT = BASE_DIR / 'static'" >> ROOT/settings.py python manage.py collectstatic --noinput cp -r ${globals.webroot}/static/* ${globals.webroot}/ROOT/static/ sed -i "s|ALLOWED_HOSTS = \[.*|ALLOWED_HOSTS = \['*'\]|g" ROOT/settings.py echo "WSGIApplicationGroup %{GLOBAL}" >> /etc/httpd/conf.d/wsgi.conf echo "python manage.py shell << EOF from django.contrib.auth.models import User l = User.objects.all() u = l[0] u.set_password('${globals.password}') u.save() EOF" > ${globals.RESET_PASS_SCRIPT} chmod +x ${globals.RESET_PASS_SCRIPT} && ${globals.RESET_PASS_SCRIPT} python_version=$(python -c "import sys; print(f'{sys.version_info[0]}.{sys.version_info[1]}')") sed -ri "s|import os|import os\nimport sys\nsys.path.append('${globals.webroot}/lib/python${python_version}/site-packages')|g" ${globals.webroot}/ROOT/wsgi.py echo "CSRF_TRUSTED_ORIGINS = ['https://${env.domain}', 'http://${env.domain}']" >> ROOT/settings.py jem service restart success: | Your Django CMS installation is available at: **App URL:** [${env.protocol}://${env.domain}/](${env.protocol}://${env.domain}/) Use the following credentials to access the Django CMS admin panel: **Admin panel URL:** [${env.protocol}://${env.domain}/admin/](${env.protocol}://${env.domain}/admin/) **Admin name:** admin **Admin password:** ${globals.password} To add a custom domain name for your Django CMS installation, follow the steps described in our [documentation](https://www.virtuozzo.com/application-platform-docs/custom-domains/).