No problem, happens to me sometimes as well :)

The only reason I thought there might be another way is that it feels a
bit tedious, and I'd expect people need this kind of functionality
quite often. I was wondering if there might be some sort of shortcut for
it.

I'll stick with the template override method for now, though -
thanks for the answer :)

Best regards

On Sun, 26 May 2013 17:40:16 -0700 (PDT)
Marc R <war...@gmail.com> wrote:

> Sorry, didn't read to the bottom of your post :)
> 
> Why would there be a better way than overriding the default template?  that 
> is the most efficient way and the power of frameworks.
> 
> On Saturday, May 25, 2013 11:53:00 AM UTC-4, Branko Majic wrote:
> >
> > 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 <javascript:> 
> > Please use only Free formats when sending attachments to me. 
> >
> > Бранко Мајић 
> > Џабер: bra...@majic.rs <javascript:> 
> > Молим вас да додатке шаљете искључиво у слободним форматима. 
> >
> 



-- 
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