-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from moorinteractive/select
Prevent migrating this app, use Select widget instead
- Loading branch information
Showing
2 changed files
with
9 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
from django import forms | ||
from django.conf import settings | ||
from django.db import models | ||
from wagtail.contrib.settings.models import BaseSetting, register_setting | ||
from wagtail.wagtailadmin.edit_handlers import FieldPanel | ||
|
||
|
||
__ALL__ = ['ThemeSettings'] | ||
|
||
|
||
@register_setting | ||
class ThemeSettings(BaseSetting): | ||
THEMES = getattr(settings, 'WAGTAIL_THEMES', None) | ||
|
||
theme = models.CharField( | ||
blank=True, choices=THEMES, max_length=255, null=True) | ||
theme = models.CharField(blank=True, max_length=255, null=True) | ||
|
||
panels = [ | ||
FieldPanel('theme', widget=forms.Select(choices=THEMES)) | ||
] |
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