from django import forms
from django.core.exceptions import ValidationError

from .models import NewsLink, Startup, Tag


class NewsLinkForm(forms.ModelForm):
    class Meta:
        model = NewsLink
        fields = '__all__'


class StartupForm(forms.ModelForm):
    class Meta:
        model = Startup
        fields = '__all__'


class TagForm(forms.ModelForm):
    class Meta:
        model = Tag
        fields = '__all__'

    def clean_name(self):
        return self.cleaned_data['name'].lower()

    def clean_slug(self):
        new_slug = (
            self.cleaned_data['slug'].lower())
        if new_slug == 'create':
            raise ValidationError(
                'Slug may not be "create".')
        return new_slug

@@ -322,24 +322,256 @@
  '__all__'%0A%0A
+    def clean_slug(self):%0A        new_slug = (%0A            self.cleaned_data%5B'slug'%5D.lower())%0A        if new_slug == 'create':%0A            raise ValidationError(%0A                'Slug may not be %22create%22.')%0A        return new_slug%0A%0A
 %0Aclass TagFo

Implement StartupForm clean_slug method.