예제 #1
0
        def save(self, *args, **kwargs):
            """Cleans up any characters I don't want in a URL"""

            log.debug('Ensuring that tag "%s" has a slug' % (self,))
            self.slug = Tag.clean_tag(self.name)
            super(Tag, self).save(*args, **kwargs)
예제 #2
0
        def cleaned(self):
            """Returns the clean version of the tag"""

            return self.slug or Tag.clean_tag(self.name)
예제 #3
0
 def cleaned(self):
     return self.slug or Tag.clean_tag(self_name)