Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » admin filters getting reset after admin action [RSS Feed]

#1 June 17, 2010 04:45:04

rahul j.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

admin filters getting reset after admin action


Hi there,

I have some filters set-up on admin page. As soon as I perform admin
action. All filters are getting reset.

Is this is a bug from framework ?

--RJ

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 June 17, 2010 16:13:38

d.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

admin filters getting reset after admin action


On Jun 17, 5:44 am, rahul jain <jainwolver...@gmail.com> wrote:
> Hi there,
>
> I have some filters set-up on admin page. As soon as I perform admin
> action. All filters are getting reset.
>
> Is this is a bug from framework ?

No. There are work-arounds to get back to these; Google this group
for suggestions.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 June 18, 2010 20:18:54

s.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

admin filters getting reset after admin action


On Jun 17, 4:13 pm, derek <gamesb...@gmail.com> wrote:
> On Jun 17, 5:44 am, rahul jain <jainwolver...@gmail.com> wrote:
>
> > Hi there,
>
> > I have some filters set-up on admin page. As soon as I perform admin
> > action. All filters are getting reset.
>
> > Is this is a bug from framework ?
>
> No.  There are work-arounds to get back to these; Google this group
> for suggestions.

Hi there,

I'm trying to do the same (retain admin filters after action). I've
searched this group for suggestions, but have failed to come up with
anything. Can anyone give me some pointers?

Thanks,
Steve

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 June 18, 2010 20:55:30

s.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

admin filters getting reset after admin action


On Jun 18, 8:18 pm, swinton <stevewin...@gmail.com> wrote:
> On Jun 17, 4:13 pm, derek <gamesb...@gmail.com> wrote:
>
> > On Jun 17, 5:44 am, rahul jain <jainwolver...@gmail.com> wrote:
>
> > > Hi there,
>
> > > I have some filters set-up on admin page. As soon as I perform admin
> > > action. All filters are getting reset.
>
> > > Is this is a bug from framework ?
>
> > No.  There are work-arounds to get back to these; Google this group
> > for suggestions.
>
> Hi there,
>
> I'm trying to do the same (retain admin filters after action). I've
> searched this group for suggestions, but have failed to come up with
> anything. Can anyone give me some pointers?
>
> Thanks,
> Steve

Hmmm, worked out a solution on my own, although I'm sure it's less
than optimal.

I'm just returning an HttpResponseRedirect from my action, passing in
the various query string parameters that may or may not have been set
by the filters, e.g. something like:

# Retain filters
params = {}

if 'foo' in request.GET:
params = request.GET
if 'bar' in request.GET:
params = request.GET

return HttpResponseRedirect("/admin/app/model/?%s" %
urlencode(params))

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#5 June 19, 2010 19:09:46

d.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

admin filters getting reset after admin action


On Jun 18, 9:18 pm, swinton <stevewin...@gmail.com> wrote:
> On Jun 17, 4:13 pm, derek <gamesb...@gmail.com> wrote:
>
> > On Jun 17, 5:44 am, rahul jain <jainwolver...@gmail.com> wrote:
>
> > > Hi there,
>
> > > I have some filters set-up on admin page. As soon as I perform admin
> > > action. All filters are getting reset.
>
> > > Is this is a bug from framework ?
>
> > No.  There are work-arounds to get back to these; Google this group
> > for suggestions.
>
> Hi there,
>
> I'm trying to do the same (retain admin filters after action). I've
> searched this group for suggestions, but have failed to come up with
> anything. Can anyone give me some pointers?

Not sure how you searched or why you missed this:http://groups.google.com/group/django-users/browse_thread/thread/d403af7a8dcdc90e/d69717b0e9a1f075Derek

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#6 June 19, 2010 19:23:46

rahul j.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

admin filters getting reset after admin action


well I solved that problem with one line of statement.

before self.message_user

just use this

return HttpResponseRedirect(request.get_full_path())

Hope it helps.

--RJ



On Sat, Jun 19, 2010 at 11:09 AM, derek <gamesb...@gmail.com> wrote:
> On Jun 18, 9:18 pm, swinton <stevewin...@gmail.com> wrote:
>> On Jun 17, 4:13 pm, derek <gamesb...@gmail.com> wrote:
>>
>> > On Jun 17, 5:44 am, rahul jain <jainwolver...@gmail.com> wrote:
>>
>> > > Hi there,
>>
>> > > I have some filters set-up on admin page. As soon as I perform admin
>> > > action. All filters are getting reset.
>>
>> > > Is this is a bug from framework ?
>>
>> > No.  There are work-arounds to get back to these; Google this group
>> > for suggestions.
>>
>> Hi there,
>>
>> I'm trying to do the same (retain admin filters after action). I've
>> searched this group for suggestions, but have failed to come up with
>> anything. Can anyone give me some pointers?
>
> Not sure how you searched or why you missed this:
>http://groups.google.com/group/django-users/browse_thread/thread/d403af7a8dcdc90e/d69717b0e9a1f075>
> Derek
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » admin filters getting reset after admin action [RSS Feed]

Board footer

Moderator control

Enjoy the 15th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support