Updated the typeclasses/ directory modules to use Google style docstrings, as per #709.

This commit is contained in:
Griatch 2015-07-12 13:52:21 +02:00
parent b9043a9e95
commit 8e554ef8f6
5 changed files with 726 additions and 185 deletions

View file

@ -5,10 +5,18 @@ from evennia.typeclasses.models import Attribute, Tag
class TagAdmin(admin.ModelAdmin):
"""
A django Admin wrapper for Tags.
"""
fields = ('db_key', 'db_category', 'db_data')
class TagInline(admin.TabularInline):
"""
A handler for inline Tags.
"""
# Set this to the through model of your desired M2M when subclassing.
model = None
raw_id_fields = ('tag',)
@ -17,7 +25,8 @@ class TagInline(admin.TabularInline):
class AttributeInline(admin.TabularInline):
"""
Inline creation of player attributes
Inline creation of player attributes.j
"""
# Set this to the through model of your desired M2M when subclassing.
model = None
@ -50,7 +59,8 @@ class AttributeInline(admin.TabularInline):
class AttributeAdmin(ModelAdmin):
"""
Defines how to display the attributes
Defines how to display the attributes.
"""
search_fields = ('db_key', 'db_strvalue', 'db_value')
list_display = ('db_key', 'db_strvalue', 'db_value')