Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 16 lines (12 sloc) 0.438 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# -*- coding: utf-8 -*-
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.