Permalink
Browse files

longest slug field for pin

split template tag bug
  • Loading branch information...
1 parent a5013ac commit dd4d1ca0289f35651b17fe9211c22384e46985fc @danieleguido committed Mar 5, 2013
Showing with 3 additions and 2 deletions.
  1. +1 −1 glue/models.py
  2. +2 −1 glue/templatetags/extras.py
View
@@ -51,7 +51,7 @@ class Pin( models.Model ):
PIN_STATUS_CHOICES = ( (published,"published"),(draft,"draft") )
- slug = models.SlugField()
+ slug = models.SlugField( max_length=160 )
title = models.CharField( max_length=160, default="", blank=True, null=True )
abstract = models.TextField( default="", blank=True, null=True )
content = models.TextField( default="", blank=True, null=True )
@@ -13,4 +13,5 @@
#
@register.filter
def split( value, pattern=',' ):
- return re.split( pattern, value)
+ return re.split( pattern, value) if value is not None else []
+

0 comments on commit dd4d1ca

Please sign in to comment.