evennia/src/objects/admin.py
Greg Taylor 9f86a4c586 I've been meaning to do this for a while as well. Break CommChannel and CommChannelMessage out into a separate app. I had them lumped in with objects/models.py due to some funkage with the admin site registering that is now resolved.
NOTE: You will need to syncdb and re-create any channels you may have had. Sorry for the inconvenience, we're still early enough in development where breakages like this may happen once in a blue moon.
2009-04-17 04:15:54 +00:00

14 lines
No EOL
496 B
Python

from src.objects.models import Attribute, Object
from django.contrib import admin
class AttributeAdmin(admin.ModelAdmin):
list_display = ('attr_object', 'attr_name', 'attr_value',)
search_fields = ['attr_name']
admin.site.register(Attribute, AttributeAdmin)
class ObjectAdmin(admin.ModelAdmin):
list_display = ('id', 'name', 'type', 'date_created')
list_filter = ('type',)
search_fields = ['name']
save_on_top = True
admin.site.register(Object, ObjectAdmin)