Thank you so much! It's funny because I had originally tried
category__slug, not sure why it didn't occur to me to use
self.category.slug ! Also, I'm glad to have learned about
select_related() -- that's exactly what I was looking for!
On Mon, Feb 23, 2009 at 6:36 PM, Malcolm Tredinnick <
m
On Tue, 2009-02-24 at 11:33 +1100, Malcolm Tredinnick wrote:
[...]
> You can certainly simplify get_absolute_url() a bit:
>
> def get_absolute_url(self):
>category_slug = self.category__slug
Sorry, this is a typo. Should be self.category.slug -- normal attribute
reference stu
On Mon, Feb 23, 2009 at 7:33 PM, Malcolm Tredinnick <
malc...@pointy-stick.com> wrote:
>
> On Mon, 2009-02-23 at 16:21 -0800, bendavis78 wrote:
> > I have products within categories. The url for a product is /store/
> > category-slug/product-slug. My question is about the best way to get
> > t
On Mon, Feb 23, 2009 at 7:21 PM, bendavis78 wrote:
>
> I have products within categories. The url for a product is /store/
> category-slug/product-slug. My question is about the best way to get
> the url for this product while looping through a product listing
> page. My view simply defines
On Mon, 2009-02-23 at 16:21 -0800, bendavis78 wrote:
> I have products within categories. The url for a product is /store/
> category-slug/product-slug. My question is about the best way to get
> the url for this product while looping through a product listing
> page. My view simply defines a
I have products within categories. The url for a product is /store/
category-slug/product-slug. My question is about the best way to get
the url for this product while looping through a product listing
page. My view simply defines a context variable called products,
assigned to the results of
6 matches
Mail list logo