1. st4lk
  2. django-articles-transmeta


Josh VanderLinden  committed e2471ac

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

  • Participants
  • Parent commits c114f08
  • Branches default

Comments (0)

Files changed (3)

File articles/__init__.py

View file
-__version__ = '1.9.0'
+__version__ = '1.9.1'
 The Pygments reStructuredText directive

File articles/forms.py

View file
     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']

File articles/models.py

View file
         return self.name
-    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)