app/soc/models/group.py
changeset 2162 03ed2fa5ccc8
parent 2053 a614b9d4821e
equal deleted inserted replaced
2161:3b5e0e0880cd 2162:03ed2fa5ccc8
    86   #====================================================================
    86   #====================================================================
    87   # (private) contact information
    87   # (private) contact information
    88   #====================================================================
    88   #====================================================================
    89 
    89 
    90   #: Required field containing a group street address.
    90   #: Required field containing a group street address.
    91   #: Group street address can only be lower ASCII, not UTF-8 text, 
    91   #: Group street address can only be ASCII, not UTF-8 text,
    92   #: because, if supplied, it might be used as a shipping address.
    92   #: because, if supplied, it might be used as a shipping address.
    93   contact_street = db.StringProperty(required=True,
    93   contact_street = db.StringProperty(required=True,
    94       verbose_name=ugettext('Street address'))
    94       verbose_name=ugettext('Street address'))
    95   contact_street.help_text = ugettext(
    95   contact_street.help_text = ugettext(
    96       'street number and name, lower ASCII characters only')
    96       'street number and name, '
       
    97       '<a href="http://en.wikipedia.org/wiki/ASCII">ASCII</a> characters only')
    97 
    98 
    98   #: Required field containing group address city.
    99   #: Required field containing group address city.
    99   #: City can only be lower ASCII, not UTF-8 text, because, if
   100   #: City can only be ASCII, not UTF-8 text, because, if
   100   #: supplied, it might be used as a shipping address.
   101   #: supplied, it might be used as a shipping address.
   101   contact_city = db.StringProperty(required=True,
   102   contact_city = db.StringProperty(required=True,
   102       verbose_name=ugettext('City'))
   103       verbose_name=ugettext('City'))
   103   contact_city.help_text = ugettext('lower ASCII characters only')
   104   contact_city.help_text = ugettext(
       
   105       '<a href="http://en.wikipedia.org/wiki/ASCII">ASCII</a> characters only')
   104 
   106 
   105   #: Required field containing group address state or province.
   107   #: Required field containing group address state or province.
   106   #: Group state/province can only be lower ASCII, not UTF-8
   108   #: Group state/province can only be ASCII, not UTF-8
   107   #: text, because, if supplied, it might be used as a shipping address.
   109   #: text, because, if supplied, it might be used as a shipping address.
   108   contact_state = db.StringProperty(
   110   contact_state = db.StringProperty(
   109       verbose_name=ugettext('State/Province'))
   111       verbose_name=ugettext('State/Province'))
   110   contact_state.help_text = ugettext(
   112   contact_state.help_text = ugettext(
   111       'optional if country/territory does not have states or provinces, '
   113       'optional if country/territory does not have states or provinces, '
   112       'lower ASCII characters only')
   114       '<a href="http://en.wikipedia.org/wiki/ASCII">ASCII</a> characters only')
   113 
   115 
   114   #: Required field containing address country or territory of the group.
   116   #: Required field containing address country or territory of the group.
   115   contact_country = db.StringProperty(required=True,
   117   contact_country = db.StringProperty(required=True,
   116       verbose_name=ugettext('Country/Territory'),
   118       verbose_name=ugettext('Country/Territory'),
   117       choices=countries.COUNTRIES_AND_TERRITORIES)
   119       choices=countries.COUNTRIES_AND_TERRITORIES)
   118 
   120 
   119   #: Required field containing address postal code of the group (ZIP code in
   121   #: Required field containing address postal code of the group (ZIP code in
   120   #: the United States).Postal code can only be lower ASCII, not UTF-8 
   122   #: the United States).Postal code can only be ASCII, not UTF-8
   121   #: text, because, if supplied, it might be used as a shipping address.
   123   #: text, because, if supplied, it might be used as a shipping address.
   122   contact_postalcode = db.StringProperty(required=True,
   124   contact_postalcode = db.StringProperty(required=True,
   123       verbose_name=ugettext('ZIP/Postal Code'))
   125       verbose_name=ugettext('ZIP/Postal Code'))
   124   contact_postalcode.help_text = ugettext('lower ASCII characters only')
   126   contact_postalcode.help_text = ugettext(
       
   127       '<a href="http://en.wikipedia.org/wiki/ASCII">ASCII</a> characters only')
   125 
   128 
   126   #: Required contact phone number that will be, amongst other uses,
   129   #: Required contact phone number that will be, amongst other uses,
   127   #: supplied to shippers along with the shipping address; kept private.
   130   #: supplied to shippers along with the shipping address; kept private.
   128   phone = db.PhoneNumberProperty(required=True,
   131   phone = db.PhoneNumberProperty(required=True,
   129       verbose_name=ugettext('Phone Number'))
   132       verbose_name=ugettext('Phone Number'))
   135   #====================================================================
   138   #====================================================================
   136   # (private) shipping information
   139   # (private) shipping information
   137   #====================================================================
   140   #====================================================================
   138 
   141 
   139   #: Optional field containing a group street address.
   142   #: Optional field containing a group street address.
   140   #: Group street address can only be lower ASCII, not UTF-8 text, 
   143   #: Group street address can only be ASCII, not UTF-8 text,
   141   #: because, if supplied, it is used as a shipping address.
   144   #: because, if supplied, it is used as a shipping address.
   142   shipping_street = db.StringProperty(required=False,
   145   shipping_street = db.StringProperty(required=False,
   143       verbose_name=ugettext('Shipping Street address'))
   146       verbose_name=ugettext('Shipping Street address'))
   144   shipping_street.help_text = ugettext(
   147   shipping_street.help_text = ugettext(
   145       'street number and name, lower ASCII characters only')
   148       'street number and name, '
       
   149       '<a href="http://en.wikipedia.org/wiki/ASCII">ASCII</a> characters only')
   146 
   150 
   147   #: Optional field containing group address city.
   151   #: Optional field containing group address city.
   148   #: City can only be lower ASCII, not UTF-8 text, because, if
   152   #: City can only be ASCII, not UTF-8 text, because, if
   149   #: supplied, it is used as a shipping address.
   153   #: supplied, it is used as a shipping address.
   150   shipping_city = db.StringProperty(required=False,
   154   shipping_city = db.StringProperty(required=False,
   151       verbose_name=ugettext('Shipping City'))
   155       verbose_name=ugettext('Shipping City'))
   152   shipping_city.help_text = ugettext('lower ASCII characters only')
   156   shipping_city.help_text = ugettext(
       
   157       '<a href="http://en.wikipedia.org/wiki/ASCII">ASCII</a> characters only')
   153 
   158 
   154   #: Optional field containing group address state or province.
   159   #: Optional field containing group address state or province.
   155   #: Group state/province can only be lower ASCII, not UTF-8
   160   #: Group state/province can only be ASCII, not UTF-8
   156   #: text, because, if supplied, it is used as a shipping address.
   161   #: text, because, if supplied, it is used as a shipping address.
   157   shipping_state = db.StringProperty(
   162   shipping_state = db.StringProperty(
   158       verbose_name=ugettext('Shipping State/Province'))
   163       verbose_name=ugettext('Shipping State/Province'))
   159   shipping_state.help_text = ugettext(
   164   shipping_state.help_text = ugettext(
   160       'optional if country/territory does not have states or provinces, '
   165       'optional if country/territory does not have states or provinces, '
   161       'lower ASCII characters only')
   166       '<a href="http://en.wikipedia.org/wiki/ASCII">ASCII</a> characters only')
   162 
   167 
   163   #: Optional field containing address postal code of the group (ZIP code in
   168   #: Optional field containing address postal code of the group (ZIP code in
   164   #: the United States). Postal code can only be lower ASCII, not UTF-8 
   169   #: the United States). Postal code can only be ASCII, not UTF-8
   165   #: text, because, if supplied, it is used as a shipping address.
   170   #: text, because, if supplied, it is used as a shipping address.
   166   shipping_postalcode = db.StringProperty(required=False,
   171   shipping_postalcode = db.StringProperty(required=False,
   167       verbose_name=ugettext('Shipping ZIP/Postal Code'))
   172       verbose_name=ugettext('Shipping ZIP/Postal Code'))
   168   shipping_postalcode.help_text = ugettext('lower ASCII characters only')
   173   shipping_postalcode.help_text = ugettext(
       
   174       '<a href="http://en.wikipedia.org/wiki/ASCII">ASCII</a> characters only')
   169 
   175 
   170   #: Optional field containing address country or territory of the group.
   176   #: Optional field containing address country or territory of the group.
   171   shipping_country = db.StringProperty(required=False,
   177   shipping_country = db.StringProperty(required=False,
   172       verbose_name=ugettext('Shipping Country/Territory'),
   178       verbose_name=ugettext('Shipping Country/Territory'),
   173       choices=countries.COUNTRIES_AND_TERRITORIES)
   179       choices=countries.COUNTRIES_AND_TERRITORIES)