Ejemplo n.º 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;'}),
     }
Ejemplo n.º 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
Ejemplo n.º 3
0
 class Meta:
     fields = '__all__'
     widgets = {
         'template':
         HtmlEditor(attrs={'style': 'width: 90%; height: 400px;'}),
     }