divanov11 / mumbleapi

Backend/API for the Mumble.dev, an open source social media application.
Apache License 2.0
199 stars 122 forks source link

Add custom classes in admin.py #145

Closed mkhnuser closed 3 years ago

mkhnuser commented 3 years ago

Is your feature request related to a problem? Please describe.

We should add custom classes in admin.py files in order to include target search and increase readability on admin page.

#

Describe the solution you'd like

I would like to create custom classes, which are inherited from admin.ModelAdmin, so I need to get basic information, such as:

  1. Which model field we should use for search for each model? For example, if we want to find one particular post, should we use pk or title (search_fields field)
  2. Which field we should use for instance filtering? For example, we would want to filter using pub_data field or length (list_filter field)
  3. Should we exclude some fields? For instance, we have model user, which has a lot of fields. Should we exclude some of them?

In my humble opinion, other fields can be edited by admins themselves, just created a new commit.

mkhnuser commented 3 years ago

If you have any questions, you can ask them whenever you like. Of course, if you want me to create specific class structure, just give me a sign.