Re: recieving GET from generic views - arrrrgh

2009-04-20 Thread SoCow
cheers again for the response. However the code i used to get the wrapper working is given below def searchwrap(request): error = False if 'q' in request.GET: q = request.GET['q'] if not q: error = True else: articles = Mymodel.objects.filte

Re: recieving GET from generic views - arrrrgh

2009-04-19 Thread Anatoliy
Try this: return date_based.archive_index( request, Mymodel.objects.filter(status=1), 'date_field': 'pub_date', template_name = 'search_form.html', extra_context = { 'error': error, } ) On 20 апр, 02:01, SoCow wrote: >

Re: recieving GET from generic views - arrrrgh

2009-04-19 Thread Greg
> return django.views.generic.date_based.archive_index( > request, > queryset = set, > template_name = 'search_results.html', > extra_context = {'set': set} > ) ... > I'm now getting the error: > > archive_inde

Re: recieving GET from generic views - arrrrgh

2009-04-19 Thread SoCow
ok, i'm getting there. i figured out that i need to wrap the generic view in my own function. To make the problem clear i'm trying to get a simple search to live in the base.html template of a blog which uses the date_based generic view. My wrapper function consists of: def searchwrap(request):

recieving GET from generic views - arrrrgh

2009-04-19 Thread SoCow
Hi all, thanks for reading. I've implemented search for my site following the example in the http://www.djangobook.com/en/2.0/chapter07/. My search view receives the search term from a GET event. I want to use this same method in a generic view, but don't know how Any ideas? Many thanks --~--~-