Hello all,

I've posted a similar question a couple of months ago, but received no
answer. I'm repeating the question now, but hopefully making it a bit
clearer on what I desire to achieve.

Is there any way to have the admin app pass the currently set filter
(GET prameters) to the "add view"?

For example, let's say that the following page is open:

http://localhost:8000/admin/conntrackt/entity/?project__id__exact=1

By default the page will contain the "Add item" link as:

http://localhost:8000/admin/conntrackt/entity/add/

What I'm interested in doing would be to have this link instead as:

http://localhost:8000/admin/conntrackt/entity/add/?project__id__exact=1

The idea is to take advantage of the current filter in the list view in
admin in order to limit the foreign key fields when adding a new
entity.

I've already implemented this by overriding the admin's
change_list.html template, but I'd be a bit surprised that there isn't
a better way to perform this.

Best regards

-- 
Branko Majic
Jabber: bra...@majic.rs
Please use only Free formats when sending attachments to me.

Бранко Мајић
Џабер: bra...@majic.rs
Молим вас да додатке шаљете искључиво у слободним форматима.

Attachment: signature.asc
Description: PGP signature

Reply via email to