Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 29b2a1cf7e
Fetching contributors…

Cannot retrieve contributors at this time

file 14 lines (11 sloc) 0.414 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14
from dbgettext.registry import registry, Options
from models import Page
from django.conf import settings

class PageOptions(Options):
    attributes = ('get_title', 'get_slug')
    translate_if = {'published' : True,}
    def get_path_identifier(self, obj):
        return obj.get_path()

if settings.CMS_MODERATOR:
    PageOptions.translate_if['publisher_is_draft'] = False

registry.register(Page, PageOptions)
Something went wrong with that request. Please try again.