I completely forgot to run is_valid() on the receiving view, so
cleaned_data wasn't being populated. This was the problem.

Thanks!

On Jul 30, 4:00 pm, RajeshD <[EMAIL PROTECTED]> wrote:
> > Is it not possible to use Newforms with GET requests?
>
> It is. You can pass it any "dictionary-like" object instance as its
> submitted data (request.GET and request.POST are both dictionary-like
> objects.)
>
> > I'm trying to
> > figure out how to paginate results from a search form, and I'm passing
> > GET values to the pagination view, instantiating an instance of the
> > Form object with request.GET as an argument (instead of the typical
> > request.POST). I can't find any mention of GET support in the
> > documentation, is this something that will eventually be added or has
> > it been decided against?
>
> It should work as you have it. Are you seeing a problem with this?
>
> > Also, does anyone know of any very clean way to paginate search
> > results?
>
> Are your search results simply a query set?
>
> Generic Views do provide pagination support. See the "paginate_by"
> argument:http://www.djangoproject.com/documentation/generic_views/#django-view...
>
> If you need custom pagination in your own views 
> see:http://www.djangoproject.com/documentation/models/pagination/
>
> > I really can't believe there's no way to do this with generic
> > views, it's a common thing to have to do. It's no good if you lose
> > your search query every time you change pages :)
>
> Well, that depends. Is your search result going to potentially return
> thousands of hits? Are dozens of users going to be able to perform
> different searches at the same time?
>
> If so, it's no good for the application to hang on to the search
> results. Consider many users launching searches and never going to
> page #2. The cached querysets will have to linger on wasting away
> precious server resources. In other words, it would be a scalability
> issue.
>
> If your search results are limited to say a few pages or if
> scalability is not a problem or if the search query is very complex
> and time-consuming to perform, you could turn your queryset into a
> list and cache it (using Django's caching framework) and then feed it
> to your view from the cache if found.


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to