app/soc/models/base.py
changeset 274 56e1c1721299
parent 110 e310681d5509
child 316 9efdc7bc3565
equal deleted inserted replaced
273:b97d08ebac0e 274:56e1c1721299
    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.helpers import forms_helpers
    30 from soc.views import helper
       
    31 import soc.views.helper.forms
    31 
    32 
    32 
    33 
    33 class ModelWithFieldAttributes(db.Model):
    34 class ModelWithFieldAttributes(db.Model):
    34   """A db.Model extension that provides access to Model properties attributes.
    35   """A db.Model extension that provides access to Model properties attributes.
    35   
    36   
    67       A (created-on-first-use) unbound Form object that can be used to
    68       A (created-on-first-use) unbound Form object that can be used to
    68       access Property attributes that are not accessible from the
    69       access Property attributes that are not accessible from the
    69       Property itself via the Model entity.
    70       Property itself via the Model entity.
    70     """
    71     """
    71     if not cls._fields_cache or (cls != cls._fields_cache.__class__.Meta.model):
    72     if not cls._fields_cache or (cls != cls._fields_cache.__class__.Meta.model):
    72       class FieldsProxy(forms_helpers.DbModelForm):
    73       class FieldsProxy(helper.forms.DbModelForm):
    73         """Form used as a proxy to access User model properties attributes.
    74         """Form used as a proxy to access User model properties attributes.
    74         """
    75         """
    75       
    76       
    76         class Meta:
    77         class Meta:
    77           """Inner Meta class that pairs the User Model with this "form".
    78           """Inner Meta class that pairs the User Model with this "form".