Fixed an issue where saving an attribute/tag would make duplicates.

This commit is contained in:
Kelketek Rritaa 2014-06-28 18:01:00 -05:00
parent a6187ed997
commit a1b596a847
3 changed files with 41 additions and 24 deletions

View file

@ -1,14 +1,9 @@
from django.contrib import admin
from django.contrib.admin import ModelAdmin
from django.core.urlresolvers import reverse
from django.forms import Textarea
from src.typeclasses.models import Attribute, Tag
class PickledWidget(Textarea):
pass
class TagAdmin(admin.ModelAdmin):
fields = ('db_key', 'db_category', 'db_data')
@ -26,7 +21,7 @@ class AttributeInline(admin.TabularInline):
"""
# Set this to the through model of your desired M2M when subclassing.
model = None
extra = 3
extra = 1
#form = AttributeForm
fields = ('attribute', 'key', 'value', 'strvalue')
raw_id_fields = ('attribute',)