Django admin, section without “model”?

2020-06-13 22:10发布

问题:

in the Django administration console, all section (menu links) come from models with database tables, but what would I need to do if I need a section without a corresponding model object (no database table) that fetches data from other section with model?

Any ideas? Thanks

回答1:

It looks like you want to add new admin urls with your own customized views and template: django.contrib.admin.ModelAdmin.get_urls

You can construct those new admins without a new model this way.



回答2:

I did it with Proxy Models....