app/soc/models/base.py
changeset 385 6d410bf49a82
parent 316 9efdc7bc3565
child 391 849aa913e9c8
equal deleted inserted replaced
384:45d6a1b492d6 385:6d410bf49a82
    25 ]
    25 ]
    26 
    26 
    27 
    27 
    28 from google.appengine.ext import db
    28 from google.appengine.ext import db
    29 
    29 
    30 from soc.views import helper
    30 from soc.views.helper import forms
    31 
       
    32 import soc.views.helper.forms
       
    33 
    31 
    34 
    32 
    35 class ModelWithFieldAttributes(db.Model):
    33 class ModelWithFieldAttributes(db.Model):
    36   """A db.Model extension that provides access to Model properties attributes.
    34   """A db.Model extension that provides access to Model properties attributes.
    37   
    35   
    69       A (created-on-first-use) unbound Form object that can be used to
    67       A (created-on-first-use) unbound Form object that can be used to
    70       access Property attributes that are not accessible from the
    68       access Property attributes that are not accessible from the
    71       Property itself via the Model entity.
    69       Property itself via the Model entity.
    72     """
    70     """
    73     if not cls._fields_cache or (cls != cls._fields_cache.__class__.Meta.model):
    71     if not cls._fields_cache or (cls != cls._fields_cache.__class__.Meta.model):
    74       class FieldsProxy(helper.forms.DbModelForm):
    72       class FieldsProxy(forms.DbModelForm):
    75         """Form used as a proxy to access User model properties attributes.
    73         """Form used as a proxy to access User model properties attributes.
    76         """
    74         """
    77       
    75       
    78         class Meta:
    76         class Meta:
    79           """Inner Meta class that pairs the User Model with this "form".
    77           """Inner Meta class that pairs the User Model with this "form".