The taggit app is optional, so should the tag field be

This commit is contained in:
Les Orchard 2012-12-29 23:19:06 -05:00
Родитель 3f1cb940f8
Коммит fdd37d51c2
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -7,7 +7,6 @@ from django import forms
from django.db import models
from django.contrib.auth.models import User, AnonymousUser
from django.forms import FileField, CharField, Textarea, ValidationError
from django.forms.widgets import ClearableFileInput
from django.utils.translation import ugettext as _
from django.core.validators import validate_email
@ -151,8 +150,13 @@ class BadgeEditForm(MyModelForm):
class Meta:
model = Badge
try:
import taggit
fields = ('title', 'image', 'description', 'tags', 'unique',
'nominations_accepted',)
except ImportError, e:
fields = ('title', 'image', 'description', 'unique',
'nominations_accepted',)
required_css_class = "required"
error_css_class = "error"