Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/d/j/django-fluent-contents-HEAD/example/simplecms/models.py   django-fluent-contents(Download)
 
    # Allow different layouts
    template_name = models.CharField("Layout", max_length=255, choices=appconfig.SIMPLECMS_TEMPLATE_CHOICES, default=appconfig.SIMPLECMS_DEFAULT_TEMPLATE)
 
    # Accessing the data of django-fluent-contents

src/d/j/django-fluent-contents-HEAD/example/simplecms/admin.py   django-fluent-contents(Download)
    def get_page_template(self, obj):
        if not obj:
            # Add page. start with default
            return get_template(appconfig.SIMPLECMS_DEFAULT_TEMPLATE)
        else:
            # Change page, honor template of object.
            return get_template(obj.template_name or appconfig.SIMPLECMS_DEFAULT_TEMPLATE)