equal
deleted
inserted
replaced
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.helper import forms |
30 from soc.views.helper import forms as forms_helper |
31 |
31 |
32 |
32 |
33 class ModelWithFieldAttributes(db.Model): |
33 class ModelWithFieldAttributes(db.Model): |
34 """A db.Model extension that provides access to Model properties attributes. |
34 """A db.Model extension that provides access to Model properties attributes. |
35 |
35 |
67 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 |
68 access Property attributes that are not accessible from the |
68 access Property attributes that are not accessible from the |
69 Property itself via the Model entity. |
69 Property itself via the Model entity. |
70 """ |
70 """ |
71 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): |
72 class FieldsProxy(forms.DbModelForm): |
72 class FieldsProxy(forms_helper.DbModelForm): |
73 """Form used as a proxy to access User model properties attributes. |
73 """Form used as a proxy to access User model properties attributes. |
74 """ |
74 """ |
75 |
75 |
76 class Meta: |
76 class Meta: |
77 """Inner Meta class that pairs the User Model with this "form". |
77 """Inner Meta class that pairs the User Model with this "form". |