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