Re: Overriding admin save event
On Tue, Oct 16, 2012 at 1:44 PM, Lachlan Musicman <datakid@gmail.com> wrote:
>> Hola,
>>
>> I wanted to override the save event in the admin so that users were
>> redirected to a different page.
>
> Of course, further reading has turned up signals. Is this the current
> recommended method?
>
> eg:
>
> from django.db.models.signals import pre_save
> from django.dispatch import receiver
> from myapp.models import MyModel
>
> @receiver(post_save)
> def redirect(sender, **kwargs):
> HttpResponseRedirect('/my/prefered/url/')
For reference, the above doesn't work
I'll try the IBM example
Cheers
L.
>
> ?
>
> Cheers
> L.
>
> --
> ...we look at the present day through a rear-view mirror. This is
> something Marshall McLuhan said back in the Sixties, when the world
> was in the grip of authentic-seeming future narratives. He said, "We
> look at the present through a rear-view mirror. We march backwards
> into the future."
>
> http://www.warrenellis.com/?p=14314
--
...we look at the present day through a rear-view mirror. This is
something Marshall McLuhan said back in the Sixties, when the world
was in the grip of authentic-seeming future narratives. He said, "We
look at the present through a rear-view mirror. We march backwards
into the future."
http://www.warrenellis.com/?p=14314
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home