2👍
It’s best to post the traceback error when posting a question!
That said, the error comes from you passing request.GET
to a ModelAdmin
admin object which isn’t expecting it.
You have a long road of troubles ahead of you though, as you’re trying to use the magical change_list view template which is operated on by a collection of even more magical, undocumented template tags, which just doesn’t normally appear in the same sentence as new to django.
I think you’re on the wrong track simply because django’s admin is not easy to hack into.
At a minimum, you’d have to pass in your template a ChangeList
object for the cl
variable.
If you really want to do this, the only advice I can give is to take a look at django.contrib.admin.options.ModelAdmin.changelist_view()
since that’s what you’re trying to replicate.
Seriously though I’d like to talk you out of this. Django’s actually really fun to work with!