Skip to content

Instantly share code, notes, and snippets.

@ohrstrom
Created October 24, 2011 14:40
Show Gist options
  • Save ohrstrom/1309184 to your computer and use it in GitHub Desktop.
Save ohrstrom/1309184 to your computer and use it in GitHub Desktop.
from django.db import models
from django.utils.translation import ugettext_lazy as _
from cms.models.pagemodel import Page
from filer.fields.image import FilerImageField
class PageTeasers(models.Model):
page = models.ForeignKey(Page, unique=True, verbose_name=_("Page"), editable=False, related_name='extended_fields')
picture = FilerImageField(null=True, blank=True)
headline = models.CharField(max_length=255, null=True, blank=True)
<h1 class="headline">{{ request.current_page.headline }}</h1>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment