Last active
August 29, 2015 14:03
-
-
Save michaelorionmcmanus/6de0a7123a453d58a1c9 to your computer and use it in GitHub Desktop.
Django CMS placeholder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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