Skip to content

Commit

Permalink
shrinking slug
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscauley committed Nov 5, 2015
1 parent 4ab6006 commit 09100fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion store/models.py
Expand Up @@ -58,7 +58,7 @@ def get_domain(self,attr):
purchase_domain = property(lambda self: self.get_domain('purchase_url'))
purchase_domain2 = property(lambda self: self.get_domain('purchase_url2'))
def save(self,*args,**kwargs):
self.slug = slugify(self.name)
self.slug = slugify(self.name)[:50]
super(Consumable,self).save(*args,**kwargs)
get_absolute_url = lambda self: reverse('product_detail',args=[self.pk,self.slug])
class Meta:
Expand Down

0 comments on commit 09100fa

Please sign in to comment.