Attribute cache is working, lots of other updates, but still not a cleanly updatable system. It seems the Attribute-migrations are not coming through properly. Fixed a misnamed table in the comm app.
This commit is contained in:
parent
033344ad2c
commit
2b332c3b9a
16 changed files with 229 additions and 179 deletions
|
|
@ -11,7 +11,8 @@ from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
|
|||
from django.contrib.admin import widgets
|
||||
from django.contrib.auth.forms import UserChangeForm, UserCreationForm
|
||||
from django.contrib.auth.models import User
|
||||
from src.players.models import PlayerDB, PlayerAttribute
|
||||
from src.players.models import PlayerDB
|
||||
from src.typeclasses.models import Attribute
|
||||
from src.utils import logger, create
|
||||
|
||||
# remove User itself from admin site
|
||||
|
|
@ -49,20 +50,20 @@ class CustomUserCreationForm(UserCreationForm):
|
|||
|
||||
|
||||
# # The Player editor
|
||||
# class PlayerAttributeForm(forms.ModelForm):
|
||||
# class AttributeForm(forms.ModelForm):
|
||||
# "Defines how to display the atttributes"
|
||||
# class Meta:
|
||||
# model = PlayerAttribute
|
||||
# model = Attribute
|
||||
# db_key = forms.CharField(label="Key",
|
||||
# widget=forms.TextInput(attrs={'size':'15'}))
|
||||
# db_value = forms.CharField(label="Value",
|
||||
# widget=forms.Textarea(attrs={'rows':'2'}))
|
||||
|
||||
# class PlayerAttributeInline(admin.TabularInline):
|
||||
# class AttributeInline(admin.TabularInline):
|
||||
# "Inline creation of player attributes"
|
||||
# model = PlayerAttribute
|
||||
# model = Attribute
|
||||
# extra = 0
|
||||
# form = PlayerAttributeForm
|
||||
# form = AttributeForm
|
||||
# fieldsets = (
|
||||
# (None, {'fields' : (('db_key', 'db_value'))}),)
|
||||
|
||||
|
|
|
|||
|
|
@ -58,26 +58,6 @@ _DA = object.__delattr__
|
|||
|
||||
_TYPECLASS = None
|
||||
|
||||
#------------------------------------------------------------
|
||||
#
|
||||
# PlayerAttribute
|
||||
#
|
||||
#------------------------------------------------------------
|
||||
|
||||
#class PlayerAttribute(Attribute):
|
||||
# """
|
||||
# PlayerAttributes work the same way as Attributes on game objects,
|
||||
# but are intended to store OOC information specific to each user
|
||||
# and game (example would be configurations etc).
|
||||
# """
|
||||
# db_obj = models.ForeignKey("PlayerDB")
|
||||
#
|
||||
# class Meta:
|
||||
# "Define Django meta options"
|
||||
# verbose_name = "Player Attribute"
|
||||
#
|
||||
#post_init.connect(attr_post_init, sender=PlayerAttribute, dispatch_uid="playerattrcache")
|
||||
#pre_delete.connect(attr_pre_delete, sender=PlayerAttribute, dispatch_uid="playerattrcache")
|
||||
|
||||
#------------------------------------------------------------
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue