diff options
author | miwi <miwi@FreeBSD.org> | 2018-05-21 23:52:35 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2018-05-21 23:52:35 +0800 |
commit | db62f3f2ffe17edbebd49fae1bb138dbfd524174 (patch) | |
tree | 05f185382f4aa42786881fdfbea0fa1a533c0380 /www | |
parent | 4fa0014a297f83e1c8c3d1ada994874a1a2a4b05 (diff) | |
download | freebsd-ports-gnome-db62f3f2ffe17edbebd49fae1bb138dbfd524174.tar.gz freebsd-ports-gnome-db62f3f2ffe17edbebd49fae1bb138dbfd524174.tar.zst freebsd-ports-gnome-db62f3f2ffe17edbebd49fae1bb138dbfd524174.zip |
- Update to 3.5.2
- Switch to py-django111
PR: 228092
Submitted by: freebsd_ports@k-worx.org
Approved by: maintainer
Sponsored by: iXsystems Inc.
Diffstat (limited to 'www')
-rw-r--r-- | www/py-django-cms/Makefile | 40 | ||||
-rw-r--r-- | www/py-django-cms/distinfo | 5 | ||||
-rw-r--r-- | www/py-django-cms/pkg-message | 203 |
3 files changed, 203 insertions, 45 deletions
diff --git a/www/py-django-cms/Makefile b/www/py-django-cms/Makefile index c24b419846d1..9416c371baa1 100644 --- a/www/py-django-cms/Makefile +++ b/www/py-django-cms/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= django-cms -PORTVERSION= 2.4.1 -PORTREVISION= 3 +PORTVERSION= 3.5.2 CATEGORIES= www python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -12,23 +11,24 @@ MAINTAINER= xenophon+fbsdports@irtnog.org COMMENT= Content management system built with the Django framework LICENSE= BSD3CLAUSE - -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}south>=0.7.3:databases/py-south@${FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django18>=1.4:www/py-django18@${FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django-classy-tags>=0.3.4.1:www/py-django-classy-tags@${FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django-mptt>=0.5.2:www/py-django-mptt@${FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django-sekizai>=0.6.1:www/py-django-sekizai@${FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}html5lib>=0.90:www/py-html5lib@${FLAVOR} - -USES= python:2.7 -USE_PYTHON= autoplist distutils - -OPTIONS_MULTI= DATABASE -OPTIONS_DEFAULT=SQLITE -OPTIONS_MULTI_DATABASE=MYSQL PGSQL SQLITE - -MYSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}MySQLdb>=1.2.2:databases/py-MySQLdb@${FLAVOR} -PGSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}psycopg2>0:databases/py-psycopg2@${FLAVOR} -SQLIE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${FLAVOR} +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django111>0:www/py-django111@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}djangocms-admin-style>=1.0:www/py-djangocms-admin-style@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}django-classy-tags>=0.7.2:www/py-django-classy-tags@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}django-formtools>=1.0:www/py-django-formtools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}django-sekizai>=0.7:www/py-django-sekizai@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}django-treebeard>=4.0.1:www/py-django-treebeard@${PY_FLAVOR} + +USES= python +USE_PYTHON= distutils autoplist +NO_ARCH= yes + +OPTIONS_MULTI= DATABASE +OPTIONS_MULTI_DATABASE= MYSQL PGSQL SQLITE +OPTIONS_DEFAULT= SQLITE +MYSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}MySQLdb>=1.2.2:databases/py-MySQLdb@${PY_FLAVOR} +PGSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}psycopg2>0:databases/py-psycopg2@${PY_FLAVOR} +SQLITE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} .include <bsd.port.mk> diff --git a/www/py-django-cms/distinfo b/www/py-django-cms/distinfo index 5dfed2a10795..0bf221e3093f 100644 --- a/www/py-django-cms/distinfo +++ b/www/py-django-cms/distinfo @@ -1,2 +1,3 @@ -SHA256 (django-cms-2.4.1.tar.gz) = ea284caea7b8e835186a2ad3d9a5aafcdc43db31c65711e710ef95b2a6ca497f -SIZE (django-cms-2.4.1.tar.gz) = 4436793 +TIMESTAMP = 1524057883 +SHA256 (django-cms-3.5.2.tar.gz) = 961e17223087d80004205b86062dcd26765264534bdb7020bd4d610279307c55 +SIZE (django-cms-3.5.2.tar.gz) = 4844699 diff --git a/www/py-django-cms/pkg-message b/www/py-django-cms/pkg-message index d002988d5451..cd548f529ff7 100644 --- a/www/py-django-cms/pkg-message +++ b/www/py-django-cms/pkg-message @@ -1,23 +1,180 @@ -********************************************************************** - -To try out django CMS, open a shell and run the following commands: - - django-admin.py startproject mycmsproject - cd mycmsproject/mycmsproject - rm settings.py - rm urls.py - fetch https://gist.github.com/williambr/5748696/raw/settings.py - fetch https://gist.github.com/raw/1125918/urls.py - mkdir templates - cd templates - fetch https://gist.github.com/raw/1125918/example.html - cd ../.. - python manage.py syncdb --all - python manage.py migrate --fake - python manage.py runserver - -The last command should start a local server on port 8000 serving -your CMS installation, so open your browser and go to 127.0.0.1:8000 -and you should see the CMS welcome page. - -********************************************************************** +=============================================================================== + +**************************************************************************** + 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/ + +=============================================================================== |