mirror of
https://github.com/evennia/evennia.git
synced 2026-04-03 06:27:17 +02:00
Fixed an issue where saving an attribute/tag would make duplicates.
This commit is contained in:
parent
a6187ed997
commit
a1b596a847
3 changed files with 41 additions and 24 deletions
|
|
@ -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',)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue