cmsplugin-blog Release post 0 Øyvind Saltvik

Similar documents
open-helpdesk Documentation

Django MFA Documentation

django-ad-code Documentation

django cms Documentation

Tangent MicroServices Documentation

Django IPRestrict Documentation

Django Admin Sortable Documentation

silk Documentation Release 0.3 Michael Ford

Cookiecutter Django CMS Documentation

wagtail-robots Documentation

MapEntity Documentation

django-cms-search Documentation

Django Wordpress API Documentation

Django PAM Documentation

puput Documentation Release 0.9 Marc Tudurí

SagePay payment gateway package for django-oscar Documentation

django-amp-tools Documentation Release latest

django-avatar Documentation

MIT AITI Python Software Development Lab DJ1:

fragapy Documentation

django-avatar Documentation

puput Documentation Release 1.0 Marc Tudurí

django-teamwork Documentation

Aldryn Installer Documentation

django-users2 Documentation

Bambu API Documentation

django-messages Documentation

django-private-chat Documentation

django-stored-messages Documentation

django-photologue Documentation

django-embed-video Documentation

django-cas Documentation

django-telegram-bot Documentation

django-fluent-dashboard Documentation

Django: Views, Templates, and Sessions

Django-Front Documentation

KonaKart Shopping Widgets. 3rd January DS Data Systems (UK) Ltd., 9 Little Meadow Loughton, Milton Keynes Bucks MK5 8EH UK

django-embed-video Documentation

Django-Select2 Documentation. Nirupam Biswas

Django Map Widgets Documentation

An Introduction to Google Blogger

django-allauth-2fa Documentation

django simple pagination Documentation

Building a Django Twilio Programmable Chat Application

Djam Documentation. Release Participatory Culture Foundation

django-embed-video Documentation

wagtailtrans Documentation

Django-frontend-notification Documentation

The Django Web Framework Part VI

Django Groups Manager Documentation

django-dajax Documentation

ganetimgr Documentation

Statirator Documentation

django-cron Documentation

django-session-security Documentation

Django Groups Manager Documentation

django-dajaxice Documentation

Tailor Documentation. Release 0.1. Derek Stegelman, Garrett Pennington, and Jon Faustman

django-model-report Documentation

django-scaffold Documentation

django-osm-field Release 0.3.1

Django-danceschool Documentation

django-audiofield Documentation

django-oauth2-provider Documentation

Trunk Player Documentation

django-reinhardt Documentation

django-notifier Documentation

django-sticky-uploads Documentation

The Django Web Framework Part II. Hamid Zarrabi-Zadeh Web Programming Fall 2013

django-openid Documentation

webcore Documentation

Nuit Documentation. Release Ben Cardy

django-audit-log Documentation

Django urls Django Girls Tutorial

LFC - Lightning Fast CMS Documentation

django-facetools Documentation

Tomasz Szumlak WFiIS AGH 23/10/2017, Kraków

django-baton Documentation

django-geoip Documentation

Django by errors. Release 0.2. Sigurd Gartmann

django-app-metrics Documentation

Mantis STIX Importer Documentation

Customizing GeoNode. Emere Arco, Simone Balbo, Paolo Pasquali, Constantin Sandu ITHACA

django-auditlog Documentation

django SHOP Release dev0

Spade Documentation. Release 0.1. Sam Liu

django-oscar-paypal Documentation

django-debreach Documentation

Pluggable Patterns. For Reusable Django Applications

WhiteNoise Documentation

django-filer Documentation

django-responsive2 Documentation

django-intranet Documentation

djangotribune Documentation

Webdev: Building Django Apps. Ryan Fox Andrew Glassman MKE Python

Easy-select2 Documentation

Django File Picker Documentation

django CMS Installer Documentation

Django File Picker Documentation

Django Phantom Theme Documentation

Transcription:

cmsplugin-blog Release 1.1.2 post 0 Øyvind Saltvik March 22, 2016

Contents 1 Requirements 3 1.1 Installation.............................................. 3 2 Configuration and setup 5 2.1 Settings................................................ 5 2.2 Update the database......................................... 6 3 Templates 7 4 Sitemaps 9 5 Creating the blog 11 i

ii

cmsplugin-blog, Release 1.1.2 post 0 cmsplugin-blog is really simple to set up on a working installation of django CMS. Contents 1

cmsplugin-blog, Release 1.1.2 post 0 2 Contents

CHAPTER 1 Requirements django CMS 2.2 djangocms-utils 0.9.5+ simple-translation 0.8.5+ jquery 1.4.4+ jquery UI 1.8.1+ django-tagging 0.3+ django-missing django-guardian (optional) On Django 1.2.7: * django-cbv Note: jquery can be provided either by locally or linking to a public server, like Google s or Microsoft s CDN. 1.1 Installation Install cmsplugin-blog from pypi: pip install cmsplugin-blog Note: When installing the cmsplugin-blog using pip django-tagging, django-missing, djangocms-utils, and simple-translation will be installed automatically. 3

cmsplugin-blog, Release 1.1.2 post 0 4 Chapter 1. Requirements

CHAPTER 2 Configuration and setup 2.1 Settings Add the following apps to your INSTALLED_APPS which enable cmsplugin-blog and required or highly recommended applications/libraries): cmsplugin_blog, cmsplugin-blog itself djangocms_utils, utilities and extensions to django CMS simple_translation, enables multilingual features tagging, enables tagging of posts staticfiles, for serving static files missing, provides improved slug generation guardian, provides per-object-permissions (see docs for django-guardian) Add required settings: INSTALLED_APPS = (... 'cmsplugin_blog', 'djangocms_utils', 'simple_translation', 'tagging', 'staticfiles', 'missing', 'guardian', # optional... ) For Django < 1.3 you need django-cbv for support for class-based views and you should also add cbv.middleware.deferredrenderingmiddleware to MIDDLEWARE_CLASSES MIDDLEWARE_CLASSES = (... 'cbv.middleware.deferredrenderingmiddleware', ) 2.1.1 Static content Set the STATIC_ROOT and STATIC_URL settings for django-staticfiles.: STATIC_ROOT = '/projectpath/static/' STATIC_URL = '/static/' 5

cmsplugin-blog, Release 1.1.2 post 0 2.1.2 jquery and jquery UI Add the following settings to add jquery UI JQUERY_JS = 'https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js' JQUERY_UI_JS = 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js' JQUERY_UI_CSS = 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/themes/smoothness/jquery-ui. Or download the sources and make them available locally: JQUERY_UI = '/path/to/jquery/' JQUERY_JS = '%sjs/jquery-1.4.4.min.js' % JQUERY_UI JQUERY_UI_JS = '%sjs/jquery-ui-1.8.9.custom.min.js' % JQUERY_UI JQUERY_UI_CSS = '%scss/smoothness/jquery-ui-1.8.9.custom.css' % JQUERY_UI 2.1.3 Multilingual blog If you are interested in multilingual blog, add cmsplugin_blog.middleware.multilingualblogentriesmiddlewar to MIDDLEWARE_CLASSES MIDDLEWARE_CLASSES = (... 'cmsplugin_blog.middleware.multilingualblogentriesmiddleware', ) 2.1.4 Blog entry placeholders You can create multiple placeholders for each blog entry. This is useful for creating extra fields like excerpt, images, etc.: CMSPLUGIN_BLOG_PLACEHOLDERS = ('first', 'second', 'third') 2.2 Update the database Next, you need to update the database with the fields required by cmsplugin-blog: python manage.py syncdb # or if south is installed python manage.py syncdb --all python manage.py migrate --fake 6 Chapter 2. Configuration and setup

CHAPTER 3 Templates In your template folder create a template adapted to your site as cmsplugin_blog/cmsplugin_blog_base.html. For example, if you have a template called base.html which has a block called body create a template that looks like this: {% extends "base.html" %} {% block body %} {% block left-col %}{% endblock %} {% block right-col %}{% endblock %} {% endblock %} Note: The cmsplugin-blog uses the block names left-col and right-col by default. 7

cmsplugin-blog, Release 1.1.2 post 0 8 Chapter 3. Templates

CHAPTER 4 Sitemaps If you use the sitemaps framework in your cms, you can add your blog entry pages to the sitemaps.xml file by including the sitemap class in your urls.py. e.g. from cms.sitemaps import CMSSitemap from cmsplugin_blog.sitemaps import BlogSitemap urlpatterns = patterns('', url(r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', { 'sitemaps': { 'cmspages': CMSSitemap, 'blogentries': BlogSitemap } }), url(r'^', include('cms.urls')) ) 9

cmsplugin-blog, Release 1.1.2 post 0 10 Chapter 4. Sitemaps

CHAPTER 5 Creating the blog To create a blog you need to create a page which will contain the root of the blog. From this page the entire blog is shown. Create a page in the CMS. Under Advanced settings Application, select Blog Apphook. Do this for each language you want to show posts in. A restart of the server afterwards is mandatory due to caching. That should be it! Now you can spend countless hours and nights thinking about what you were supposed to write about that wasn t kittens or other cute furry animals. 11