Port details on branch 2022Q2 |
- py-django-cms Content management system built with the Django framework
- 4.1.0 www =1 3.9.0_1Version of this port present on the latest quarterly branch.
- Maintainer: xenophon+fbsdports@irtnog.org
- Port Added: 2012-02-07 04:58:41
- Last Update: 2024-02-09 05:30:39
- Commit Hash: 019406c
- People watching this port, also watch:: otrs, links, mupdf
- Also Listed In: python
- License: BSD3CLAUSE
- WWW:
- https://django-cms.org/
- Description:
- A free and open source content management system for publishing
content on the World Wide Web and intranets. It is based on Django
and written in Python.
- ¦ ¦ ¦ ¦
- Manual pages:
- FreshPorts has no man page information for this port.
- pkg-plist: as obtained via:
make generate-plist - There is no configure plist information for this port.
- Dependency lines:
-
- ${PYTHON_PKGNAMEPREFIX}django-cms>0:www/py-django-cms@${PY_FLAVOR}
- To install the port:
- cd /usr/ports/www/py-django-cms/ && make install clean
- To add the package, run one of these commands:
- pkg install www/py-django-cms
- pkg install py39-django-cms
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above. NOTE: This is a Python port. Instead of py39-django-cms listed in the above command, you can pick from the names under the Packages section.- PKGNAME: py39-django-cms
- Package flavors (<flavor>: <package>)
- distinfo:
- TIMESTAMP = 1704566591
SHA256 (django-cms-4.1.0.tar.gz) = 860a7e4045cde2ec22c0090d437f0110630ef8d9959b9a3b7cee2039c76687fb
SIZE (django-cms-4.1.0.tar.gz) = 5065953
Packages (timestamps in pop-ups are UTC):
- Dependencies
- NOTE: FreshPorts displays only information on required and default dependencies. Optional dependencies are not covered.
- Build dependencies:
-
- py39-setuptools>=63.1.0 : devel/py-setuptools@py39
- python3.9 : lang/python39
- Test dependencies:
-
- python3.9 : lang/python39
- Runtime dependencies:
-
- py39-django32>=2.2 : www/py-django32@py39
- py39-djangocms-admin-style>=1.2 : www/py-djangocms-admin-style@py39
- py39-django-classy-tags>=0.7.2 : www/py-django-classy-tags@py39
- py39-django-formtools>=2.1 : www/py-django-formtools@py39
- py39-django-sekizai>=0.7 : www/py-django-sekizai@py39
- py39-django-treebeard>=4.3 : www/py-django-treebeard@py39
- py39-packaging>0 : devel/py-packaging@py39
- py39-sqlite3>0 : databases/py-sqlite3@py39
- py39-setuptools>=63.1.0 : devel/py-setuptools@py39
- python3.9 : lang/python39
- There are no ports dependent upon this port
Configuration Options:
- ===> The following configuration options are available for py39-django-cms-4.1.0:
====> Options available for the multi DATABASE: you have to choose at least one of them
MYSQL=off: MySQL database support
PGSQL=off: PostgreSQL database support
SQLITE=on: SQLite database support
===> Use 'make config' to modify these settings
- Options name:
- www_py-django-cms
- USES:
- python
- pkg-message:
- For install:
- IMPORTANT /
If you're upgrading from a older version of py-django-cms please read the
upgrade instructions at:
http://docs.django-cms.org/en/latest/upgrade/index.html
The described steps further down are a distilled version of "How to install
django CMS by hand" which is available at:
http://docs.django-cms.org/en/latest/how_to/install.html
The manual gives enough information how to setup py-django-cms for
development use. For production environments please consider to read the
full documentation available at:
http://docs.django-cms.org/en/latest/index.html
1. Create a new Django project
$ django-admin.py startproject myproject
2. Edit settings.py
--- Set a SITE_ID by adding the following line:
SITE_ID = 1 # 1 will suffice in most cases
--- Add the next lines to INSTALLED_APPS:
'djangocms_admin_style' # must come BEFORE django.contrib.admin
'django.contrib.sites'
'cms'
'menus'
'sekizai'
'treebeard'
--- Configure the LANGUAGES and LANGUAGE_CODE, e.g.:
LANGUAGES = [
('en', 'English'),
('de', 'German'),
]
LANGUAGE_CODE = 'en' # For simplicity's sake at this stage it is worth
# changing the default en-us in that you'll find in
# the LANGUAGE_CODE setting to en.
--- Add the following lines to MIDDLEWARE_CLASSES:
'cms.middleware.utils.ApphookReloadMiddleware' # Optional, but useful
'cms.middleware.user.CurrentUserMiddleware'
'cms.middleware.page.CurrentPageMiddleware'
'cms.middleware.toolbar.ToolbarMiddleware'
'cms.middleware.language.LanguageCookieMiddleware'
'django.middleware.locale.LocaleMiddleware'
--- Add MEDIA_URL (where media files will be served) and MEDIA_ROOT (where they
--- will be stored):
MEDIA_URL = "/media/"
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
--- See the Django documentation for guidance on serving media files in
--- production.
--- Add a CMS_TEMPLATES section that will be the project's default template:
CMS_TEMPLATES = [
('home.html', 'Home page template'),
]
--- Add the next lines to TEMPLATES['OPTIONS']['context_processors']:
'sekizai.context_processors.sekizai'
'cms.context_processors.cms_settings'
--- Django needs to be know where to look for its templates, so add following
--- line (the appropriate directory will be created in the next step) to the
----TEMPLATES['DIRS'] list:
['templates']
--- In the root of the project, create a templates directory, and in that,
--- home.html, a minimal django CMS template:
{% load cms_tags sekizai_tags %}
<html>
<head>
<title>{% page_attribute "page_title" %}</title>
{% render_block "css" %}
</head>
<body>
{% cms_toolbar %}
{% placeholder "content" %}
{% render_block "js" %}
</body>
</html>
--- Note: See Django's template language documentation for more on how template
--- inheritance works.
3. Edit urls.py
--- Edit urls.py and add url(r'^', include('cms.urls')) to the urlpatterns
--- list. It should come after other patterns, so that specific URLs for other
--- applications can be detected first.
--- You'll also need to have an import for django.conf.urls.include and
--- configure a media file serving for development purposes:
from django.conf import settings
from django.conf.urls import url, include
from django.conf.urls.static import static
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^', include('cms.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
4. Setup the relational database backend
--- For testing purpose SQLite can be used and it is configured by default
--- in a new Django project's DATABASES.
--- Refer to Django's DATABASES setting documentation for the appropriate
--- configuration when PostgreSQL or MySQL are used as database backends.
5. Run migrations to create database tables
--- When a database backend has been choosen and set up properly, run the
--- following command:
$ python manage.py migrate
6. Create an admin superuser
--- For maintenance purposes it is necessary to create a admin user:
$ python manage.py createsuperuser
7. Check CMS installation
--- This will check your configuration, your applications, your database and
--- report on any problems:
$ python manage.py cms check
--- When there are no errors continue with the last step.
8. Start the CMS
--- The django CMS project will now run by issuing:
$ python manage.py runserver
--- The CMS can now be reached http://localhost:8000/ and the admin interface
--- at http://localhost:8000/admin/
- Master Sites:
|