I wish to use a QueryString on my search page like so
/search?s=jupiter&page=2
So I have set up a single url pattern
(r'^search/$', 'mything.myapp.views.search_page.search_page'),
And I am then able to grab the parameters in my view, like so -
def search_page(request, search="", p
Oh, and my model
class Category(models.Model):
parent = models.ForeignKey('self', null=True)
slug = models.SlugField()
title = models.CharField(max_length=50)
def __unicode__(self):
return self.title
--~--~-~--~~~---~-
Lets say I have a bunch of categories which can optionally contain
subcategories... What would be the ideal way to go about a) preparing
this data for my templates, and b) displaying this data in m templates
Here is what I currently have.. it feels dirty
-
3 matches
Mail list logo