djangocms-blog
latest
  • Installation
  • Features
    • Attaching blog to the home page
    • Provide a custom URLConf
    • Configurable permalinks
    • Templates
    • Admin customization
    • Setup social metatags rendering
    • Social shares
    • Media plugins - Vlog / Podcast
    • Menu
    • Sitemap
    • Multisite
    • Related posts
    • Channels: Desktop notifications - Liveblog
    • django CMS 3.2+ Wizard
    • Post Extensions
    • Upgrading django CMS blog
  • Configuration
  • API Documentation
  • Development & community
  • Contributing
  • History
djangocms-blog
  • Docs »
  • Features »
  • Configurable permalinks
  • Edit on GitHub

Configurable permalinksΒΆ

Blog comes with four different styles of permalinks styles:

  • Full date: YYYY/MM/DD/SLUG
  • Year / Month: YYYY/MM/SLUG
  • Category: CATEGORY/SLUG
  • Just slug: SLUG

As all the styles are loaded in the urlconf, the latter two does not allow to have CMS pages beneath the page the blog is attached to. If you want to do this, you have to override the default urlconfs by setting something like the following in the project settings:

BLOG_PERMALINK_URLS = {
    "full_date": "<int:year>/<int:month>/<int:day>/<str:slug>/",
    "short_date": "<int:year>/<int:month>/<str:slug>/",
    "category": "<str:category>/<str:slug>/",
    "slug": "<str:slug>/",
}

And change post/ with the desired prefix.

Warning

Version 1.2 introduce a breaking change as it drops url function in favour of path. If you have customized the urls as documented above you must update the custom urlconf to path-based patterns.

Next Previous

© Copyright 2016, Iacopo Spalletti Revision 6a3224ee.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
Versions
latest
stable
release-1.1.x
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.