Skip to content

Instantly share code, notes, and snippets.

@artieziff
Last active December 17, 2015 03:18
Show Gist options
  • Save artieziff/5541885 to your computer and use it in GitHub Desktop.
Save artieziff/5541885 to your computer and use it in GitHub Desktop.

###CUZTOMIZE ADMIN FORM

class PollAdmin(admin.ModelAdmin):

fields = ['pub_date', 'question']

fieldsets = [ (None, {'fields': ['question']}), ('Date information', {'fields': ['pub_date']}), ]

fieldsets = [ (None, {'fields': ['question']}), ('Date information', {'fields': ['pub_date'],

'classes': ['collapse']}), ]

admin.site.register(Poll, PollAdmin)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment