58 |
58 |
59 #: Required many:1 relationship indicating the founding User of the |
59 #: Required many:1 relationship indicating the founding User of the |
60 #: Group (this relationship is needed to keep track of lifetime group |
60 #: Group (this relationship is needed to keep track of lifetime group |
61 #: creation limits, used to prevent spamming, etc.). |
61 #: creation limits, used to prevent spamming, etc.). |
62 founder = db.ReferenceProperty(reference_class=soc.models.user.User, |
62 founder = db.ReferenceProperty(reference_class=soc.models.user.User, |
63 required=True, collection_name="groups") |
63 required=True, collection_name="groups", |
64 #: Optional field storing a home page URL of the group. |
64 verbose_name=ugettext_lazy('Created by')) |
|
65 #: Required field storing a home page URL of the group. |
65 home_page = db.LinkProperty(required=True, |
66 home_page = db.LinkProperty(required=True, |
66 verbose_name=ugettext_lazy('Home Page URL')) |
67 verbose_name=ugettext_lazy('Home Page URL')) |
67 |
68 |
68 #: Optional email address used as the "public" contact mechanism for |
69 #: Required email address used as the "public" contact mechanism for |
69 #: the Group (as opposed to the founder.id email address which is kept |
70 #: the Group (as opposed to the founder.id email address which is kept |
70 #: secret, revealed only to Developers). |
71 #: secret, revealed only to Developers). |
71 email = db.EmailProperty(required=True, |
72 email = db.EmailProperty(required=True, |
72 verbose_name=ugettext_lazy('Email')) |
73 verbose_name=ugettext_lazy('Email')) |
73 |
74 |
74 #: Optional field storing description of the group. |
75 #: Required field storing description of the group. |
75 description = db.TextProperty(required=True, |
76 description = db.TextProperty(required=True, |
76 verbose_name=ugettext_lazy('Description')) |
77 verbose_name=ugettext_lazy('Description')) |
77 |
78 |
78 #: Optional field containing a group street address. |
79 #: Required field containing a group street address. |
79 #: Group street address can only be lower ASCII, not UTF-8 text, |
80 #: Group street address can only be lower ASCII, not UTF-8 text, |
80 #: because, if supplied, it is used as a shipping address. |
81 #: because, if supplied, it is used as a shipping address. |
81 street = db.StringProperty(required=True, |
82 street = db.StringProperty(required=True, |
82 verbose_name=ugettext_lazy('Street address')) |
83 verbose_name=ugettext_lazy('Street address')) |
83 street.help_text = ugettext_lazy( |
84 street.help_text = ugettext_lazy( |
84 'street number and name, lower ASCII characters only') |
85 'street number and name, lower ASCII characters only') |
85 |
86 |
86 #: Optional field containing group address city. |
87 #: Required field containing group address city. |
87 #: City can only be lower ASCII, not UTF-8 text, because, if |
88 #: City can only be lower ASCII, not UTF-8 text, because, if |
88 #: supplied, it is used as a shipping address. |
89 #: supplied, it is used as a shipping address. |
89 city = db.StringProperty(required=True, |
90 city = db.StringProperty(required=True, |
90 verbose_name=ugettext_lazy('City')) |
91 verbose_name=ugettext_lazy('City')) |
91 city.help_text = ugettext_lazy('lower ASCII characters only') |
92 city.help_text = ugettext_lazy('lower ASCII characters only') |
92 |
93 |
93 #: Optional field containing group address state or province. |
94 #: Required field containing group address state or province. |
94 #: Group state/province can only be lower ASCII, not UTF-8 |
95 #: Group state/province can only be lower ASCII, not UTF-8 |
95 #: text, because, if supplied, it is used as a shipping address. |
96 #: text, because, if supplied, it is used as a shipping address. |
96 state = db.StringProperty(required=True, |
97 state = db.StringProperty(required=True, |
97 verbose_name=ugettext_lazy('State/Province')) |
98 verbose_name=ugettext_lazy('State/Province')) |
98 state.help_text = ugettext_lazy( |
99 state.help_text = ugettext_lazy( |
99 'optional if country/territory does not have states or provinces, ' |
100 'optional if country/territory does not have states or provinces, ' |
100 'lower ASCII characters only') |
101 'lower ASCII characters only') |
101 |
102 |
102 #: Optional field containing address country or territory of the group. |
103 #: Required field containing address country or territory of the group. |
103 country = db.StringProperty(required=True, |
104 country = db.StringProperty(required=True, |
104 verbose_name=ugettext_lazy('Country/Territory'), |
105 verbose_name=ugettext_lazy('Country/Territory'), |
105 choices=countries.COUNTRIES_AND_TERRITORIES) |
106 choices=countries.COUNTRIES_AND_TERRITORIES) |
106 |
107 |
107 #: Optional field containing address postal code of the group (ZIP code in |
108 #: Required field containing address postal code of the group (ZIP code in |
108 #: the United States). Postal code can only be lower ASCII, not UTF-8 |
109 #: the United States). Postal code can only be lower ASCII, not UTF-8 |
109 #: text, because, if supplied, it is used as a shipping address. |
110 #: text, because, if supplied, it is used as a shipping address. |
110 postalcode = db.StringProperty(required=True, |
111 postalcode = db.StringProperty(required=True, |
111 verbose_name=ugettext_lazy('ZIP/Postal Code')) |
112 verbose_name=ugettext_lazy('ZIP/Postal Code')) |
112 postalcode.help_text=ugettext_lazy('lower ASCII characters only') |
113 postalcode.help_text=ugettext_lazy('lower ASCII characters only') |
113 |
114 |
114 #: Optional contact phone number that will be, amongst other uses, |
115 #: Required contact phone number that will be, amongst other uses, |
115 #: supplied to shippers along with the shipping address; kept private. |
116 #: supplied to shippers along with the shipping address; kept private. |
116 phone = db.PhoneNumberProperty(required=True, |
117 phone = db.PhoneNumberProperty(required=True, |
117 verbose_name=ugettext_lazy('Phone Number')) |
118 verbose_name=ugettext_lazy('Phone Number')) |
118 phone.help_text = ugettext_lazy( |
119 phone.help_text = ugettext_lazy( |
119 'include complete international calling number with country code') |
120 'include complete international calling number with country code') |