Monday, August 20, 2012

Re: deprecation warning from HttpResponseRedirect(reverse(...))

Just importing a function from django.views.generic will trigger the
warning. So I'd check your code for imports.

I made tracking down the source of these warnings a little easier by
putting stacklevel into simple.py:

https://code.djangoproject.com/ticket/18780

On Sat, 2012-08-18 at 05:58 -0700, Mike wrote:
>
>
> On Saturday, August 18, 2012 1:31:42 PM UTC+2, Paul Backhouse wrote:
> > I seem to be getting a DeprecationWarning when my view hits
> this line of
> > code:
> >
> > return HttpResponseRedirect(reverse(results,
> args=[query.jobid]))
> >
>
> What does the depreciation warning say?
>
>
>
> Here's the full text:
> /Users/mike/sieve-django/SIEVEENV/lib/python2.6/site-packages/django/views/generic/simple.py:8: DeprecationWarning: Function-based generic views have been deprecated; use class-based views instead.
> DeprecationWarning
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/KvKw7JosFbIJ.
> 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.


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


Real Estate