K
K
Klaus Kater2016-04-02 09:41:45
Django
Klaus Kater, 2016-04-02 09:41:45

How to set model name in django admin?

Hello. There is such a need to display one model on 2 pages in the admin panel, a model with content, but in one case it is news and in another article. the functionality is almost identical, but the client wants them to be on different pages in the admin panel.
There is an option to override the ModelAdmin get_queryset method, in which there will be a filter by type, and only news or articles will be returned specifically to this ModelAdmin. There is an option to override save_formset and set the type there. But the problem is that ModelAdmin takes its name in the admin from the model.
Is there an option to reassign this name?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Klaus Kater, 2016-04-02
@kurojneko

Problems turned out to be a little more than just a name, I used such a solution.
Models with proxies are created, according to the number of required ones.
stackoverflow.com/questions/12790220/why-cant-i-re...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question