예제 #1
0
 class Meta:
     model = models.Prepuzzle
     fields = [
         'puzzle_name', 'released', 'hunt', 'answer', 'resource_link',
         'template', 'response_string'
     ]
     widgets = {
         'template':
         HtmlEditor(attrs={'style': 'width: 90%; height: 400px;'}),
     }
예제 #2
0
 def get_form(self, request, obj=None, **kwargs):
     kwargs['form'] = FlatpageProxyForm
     form = super(FlatPageAdmin, self).get_form(request, obj, **kwargs)
     form.base_fields['sites'].initial = Site.objects.get(pk=1)
     form.base_fields['content'].widget = HtmlEditor(
         attrs={'style': 'width:90%; height:400px;'})
     form.base_fields['url'].help_text = (
         "Example: '/contact-us/' translates to " +
         "/info/contact-us/. Make sure to have leading and " +
         "trailing slashes.")
     return form
예제 #3
0
 class Meta:
     fields = '__all__'
     widgets = {
         'template':
         HtmlEditor(attrs={'style': 'width: 90%; height: 400px;'}),
     }