Commits

Anonymous committed e2471ac

Renamed a clean method to not interfere with Django. Version bump

  • Participants
  • Parent commits c114f08

Comments (0)

Files changed (3)

articles/__init__.py

-__version__ = '1.9.0'
+__version__ = '1.9.1'
 
 """
 The Pygments reStructuredText directive

articles/forms.py

     def clean_tags(self):
         """Turns the string of tags into a list"""
 
-        tag = lambda n: Tag.objects.get_or_create(name=Tag.clean(n))[0]
+        tag = lambda n: Tag.objects.get_or_create(name=Tag.clean_tag(n))[0]
         tags = [tag(t) for t in self.cleaned_data['tags'].split()]
         self.cleaned_data['tags'] = tags
         return self.cleaned_data['tags']

articles/models.py

         return self.name
 
     @staticmethod
-    def clean(name):
+    def clean_tag(name):
         """Replace spaces with dashes, in case someone adds such a tag manually"""
 
         name = name.replace(' ', '-')
     def save(self, *args, **kwargs):
         """Cleans up any characters I don't want in a URL"""
 
-        self.name = Tag.clean(self.name)
+        self.name = Tag.clean_tag(self.name)
         super(Tag, self).save(*args, **kwargs)
 
     @models.permalink