Skip to main content

A djangoCMS 3 blog application

Project description

Latest PyPI version Latest Travis CI build status Monthly downloads Test coverage

A djangoCMS 3 blog application.

Still experimental and untested. You are welcome if you want to try it; if you encounter any issue, please open an issue.

Supported Django versions:

  • Django 1.5

  • Django 1.6

  • Django 1.7

Supported django CMS versions:

  • django CMS 3.0

Quickstart

Install djangocms-blog:

pip install djangocms-blog

Add djangocms_blog and its dependencies to INSTALLED_APPS:

INSTALLED_APPS = [
    ...
    'filer',
    'easy_thumbnails',
    'cmsplugin_filer_image',
    'parler',
    'taggit',
    'taggit_autosuggest',
    'django_select2',
    'meta',
    'meta_mixin',
    'admin_enhancer',
    'djangocms_blog',
    ...
]

Then sync and migrate:

$ python manage.py syncdb
$ python manage.py migrate

External applications configuration

Dependency applications may need configuration to work properly.

Please, refer to each application documentation on details.

Quick hint

The following are minimal defaults to get the blog running; they may not be suited for your deployment.

  • Add the following settings to your project:

    SOUTH_MIGRATION_MODULES = {
        'easy_thumbnails': 'easy_thumbnails.south_migrations',
        'taggit': 'taggit.south_migrations',
    }
    THUMBNAIL_PROCESSORS = (
        'easy_thumbnails.processors.colorspace',
        'easy_thumbnails.processors.autocrop',
        'filer.thumbnail_processors.scale_and_crop_with_subject_location',
        'easy_thumbnails.processors.filters',
    )
    META_SITE_PROTOCOL = 'http'
    META_USE_SITES = True
  • Configure parler according to your languages:

    PARLER_LANGUAGES = {
        1: (
            {'code': 'en',},
            {'code': 'it',},
            {'code': 'fr',},
        ),
    }
  • Add the following to your urls.py:

    url(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')),
  • To start your blog create a new page from the CMS and hook it to the blog application:

    • Create a new django CMS page

    • Go to Advanced settings and sele select Blog from the Application selector;

    • Eventually customise the Application instance name;

    • Restart the project instance to properly load blog urls.

Templates

To ease the template customisations a djangocms_blog/base.html template is used by all the blog templates; the templates itself extends a base.html template; content is pulled in the content block. If you need to define a different base template, or if your base template does not defines a content block, copy in your template directory djangocms_blog/base.html and customise it according to your needs; the other application templates will use the newly created template and will ignore the bundled one.

Features

  • Placeholder content editing

  • Frontend editing using django CMS 3.0 frontend editor

  • Multilingual support using django-parler

  • Support for Twitter cards, Open Graph and Google+ snippets meta tags

  • Optional support for simpler TextField-based content editing

  • Multisite support (posts can be visible in one or more Django sites on the same project)

Import from Wordpress

If you want to import content from existing wordpress blog, check https://pypi.python.org/pypi/the-real-django-wordpress and this gist https://gist.github.com/yakky/11336204 as a base.

Settings

  • BLOG_ENABLE_COMMENTS: Whether to enable comments by default on posts; while djangocms_blog does not ship any comment system, this flag can be used to control the chosen comments framework; (default: True)

  • BLOG_USE_PLACEHOLDER: Post content is managed via placeholder; if False a simple HTMLField is used; (default: True)

  • BLOG_IMAGE_THUMBNAIL_SIZE: Size of the main image when shown on the post lists; it’s a dictionary with size, crop and upscale keys; (default: {'size': '120x120', 'crop': True,'upscale': False})

  • BLOG_IMAGE_FULL_SIZE: Size of the main image when shown on the post detail; it’s a dictionary with size, crop and upscale keys; (default: {'size': '640x120', 'crop': True,'upscale': False})

  • BLOG_PAGINATION: Number of post per page; (default: 10)

  • BLOG_LATEST_POSTS: Default number of post in the Latest post plugin; (default: 5)

  • BLOG_POSTS_LIST_TRUNCWORDS_COUNT: Default number of words shown for abstract in the post list; (default: 100)

  • BLOG_MULTISITE: Add support for multisite setup

  • BLOG_AUTHOR_DEFAULT: Use a default if not specified; if set to True the current user is set as the default author, if set to False no default author is set, if set to a string the user with the provided username is used; (default: True)

Social media tags settings

  • BLOG_TYPE: Generic type for the post object; (default: Article)

  • BLOG_FB_TYPE: Open Graph type for the post object; (default: Article)

  • BLOG_FB_APPID: Facebook Application ID

  • BLOG_FB_PROFILE_ID: Facebook profile ID of the post author

  • BLOG_FB_PUBLISHER: Facebook URL of the blog publisher

  • BLOG_FB_AUTHOR_URL: Facebook profile URL of the post author

  • BLOG_FB_AUTHOR: Facebook profile URL of the post author

  • BLOG_TWITTER_TYPE: Twitter Card type for the post object; (default: Summary)

  • BLOG_TWITTER_SITE: Twitter account of the site

  • BLOG_TWITTER_AUTHOR: Twitter account of the post author

  • BLOG_GPLUS_TYPE: Google+ Snippet type for the post object; (default: Blog)

  • BLOG_GPLUS_AUTHOR: Google+ account of the post author

Bitdeli badge

History

0.3.0 (2015-01-04)

  • Multisite support

  • Configurable default author support

  • Refactored settings

  • Fix multilanguage issues

  • Fix SEO fields length

  • Post absolute url is generated from the title in any language if current is not available

  • If djangocms-page-meta and djangocms-page-tags are installed, the relevant toolbar items are removed from the toolbar in the post detail view to avoid confusings page meta / tags with post ones

  • Plugin API changed to filter out posts according to the request.

  • Django 1.7 support

  • Python 3.3 and 3.4 support

0.2.0 (2014-09-24)

  • INCOMPATIBLE CHANGE: view names changed!

  • Based on django parler 1.0

  • Toolbar items contextual to the current page

  • Add support for canonical URLs

  • Add transifex support

  • Add social tags via django-meta-mixin

  • Per-post or site-wide comments enabling

  • Simpler TextField-based content editing for simpler blogs

  • Add support for custom user models

0.1.0 (2014-03-06)

  • First experimental release

Project details


Release history Release notifications | RSS feed

This version

0.3.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djangocms-blog-0.3.0.tar.gz (41.5 kB view details)

Uploaded Source

Built Distribution

djangocms_blog-0.3.0-py2.py3-none-any.whl (78.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file djangocms-blog-0.3.0.tar.gz.

File metadata

File hashes

Hashes for djangocms-blog-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4feb1fe6f1bdbd9e064f646e1b91f165a67fce5d4f5beeebcae694070243a0c3
MD5 9e0674d197fcc0509b848a2850429f66
BLAKE2b-256 a86e983e179d4cddeb11c8402ff3581f2fb86aa727c2a4c221b69486e9b02eb6

See more details on using hashes here.

File details

Details for the file djangocms_blog-0.3.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for djangocms_blog-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 617669ecfb4d38a566cedc2c7392d0ceae6071f8c5f2bd9e43748ff942ea08df
MD5 e1ef5bce2ba3755f17a0af1fe182fda2
BLAKE2b-256 33ae3492909a4854a904bd38cbffc1a0274bdf018f7e44a25d2e48a4b7527f46

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page