Skip to content

Instantly share code, notes, and snippets.

@michaelorionmcmanus
Last active August 29, 2015 14:03
Show Gist options
  • Save michaelorionmcmanus/6de0a7123a453d58a1c9 to your computer and use it in GitHub Desktop.
Save michaelorionmcmanus/6de0a7123a453d58a1c9 to your computer and use it in GitHub Desktop.
Django CMS placeholder
## in models.py
class Season(models.Model):
title = models.CharField(max_length=255)
season = models.IntegerField(choices=SEASONS, blank=True, null=True)
year = models.IntegerField(blank=True, null=True)
description = HTMLField(blank=True, null=True)
description_placeholder = PlaceholderField('base_content', related_name='season_description', blank=True, null=True)
calendar_file = FilerFileField(blank=True, null=True)
## in admin.py
class SeasonAdmin(PlaceholderAdminMixin, admin.ModelAdmin):
pass
admin.site.register(Season, SeasonAdmin)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment