Django Admin Fieldsets

Viewed 34172

Trying to understand Django Admin a bit better, but I find the Django documentation a bit lacking sometimes (or perhaps my capacity to understand).

I know you can use fieldsets to control the layout of certain admin pages. What I can't seem to grasp is what the fieldset names are.

If I have the following class

class Demo(model.Model):
    name = models.CharField(max_length=150)
    address = models.CharField(max_length=150)
    city = models.CharField(max_length=50)
    zip = models.CharField(max_length=15)

and Admin class as the following

class DemoAdmin(admin.ModelAdmin):
    list_display = ('name', 'City')

In this, albeit contrived example, what possible fieldsets could I use?

1 Answers
Related