Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bigger text box for entry body in the admin

  • Loading branch information...
commit 4aba276800438299bbe1d0754c1af9c94f6f2a2c 1 parent c7511d8
@jphalip jphalip authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 django_website/blog/admin.py
View
6 django_website/blog/admin.py
@@ -10,4 +10,10 @@ class EntryAdmin(admin.ModelAdmin):
exclude = ('summary_html', 'body_html')
prepopulated_fields = {"slug": ("headline",)}
+ def formfield_for_dbfield(self, db_field, **kwargs):
+ formfield = super(EntryAdmin, self).formfield_for_dbfield(db_field, **kwargs)
+ if db_field.name == 'body':
+ formfield.widget.attrs['rows'] = 25
+ return formfield
+
admin.site.register(Entry, EntryAdmin)
Please sign in to comment.
Something went wrong with that request. Please try again.