# HG changeset patch # User Pawel Solyga # Date 1236187682 0 # Node ID 425dccf4f6524aa2f5a6cc35bcb89d2b27c0e9de # Parent fe455c93cbf65b7098ed44b11f61bbdd425fe89e Style and too long lines fixes in soc.models.role module. Patch by: Pawel Solyga Reviewed by: to-be-reviewed diff -r fe455c93cbf6 -r 425dccf4f652 app/soc/models/role.py --- a/app/soc/models/role.py Wed Mar 04 17:24:19 2009 +0000 +++ b/app/soc/models/role.py Wed Mar 04 17:28:02 2009 +0000 @@ -87,7 +87,7 @@ given_name = db.StringProperty(required=True, verbose_name=ugettext('First (given) name')) given_name.help_text = ugettext('lower ASCII characters only') - given_name.group=ugettext("1. Public Info") + given_name.group = ugettext("1. Public Info") #: Required field storing the parts of the Role's name #: corresponding to the field names; displayed publicly. @@ -97,7 +97,7 @@ required=True, verbose_name=ugettext('Last (family) name')) surname.help_text = ugettext('lower ASCII characters only') - surname.group=ugettext("1. Public Info") + surname.group = ugettext("1. Public Info") #: Optional field used as a display name, such as for awards #: certificates. Should be the entire name in the format @@ -112,7 +112,7 @@ 'the person would like it displayed (could be family name followed ' 'by given name in some cultures, for example). Name on documents can be ' 'any valid UTF-8 text.') - name_on_documents.group=ugettext("1. Public Info") + name_on_documents.group = ugettext("1. Public Info") #==================================================================== # (public) contact information @@ -124,31 +124,31 @@ email = db.EmailProperty( required=True, verbose_name=ugettext('Email Address')) - email.group=ugettext("1. Public Info") + email.group = ugettext("1. Public Info") #: Optional field storing Instant Messaging network; displayed publicly. im_network = db.StringProperty( verbose_name=ugettext('IM Network')) im_network.help_text = ugettext( 'examples: irc:irc.freenode.net xmpp:gmail.com/Home') - im_network.group=ugettext("1. Public Info") + im_network.group = ugettext("1. Public Info") #: Optional field storing Instant Messaging handle; displayed publicly. im_handle = db.StringProperty( verbose_name=ugettext('IM Handle')) im_handle.help_text = ugettext( 'personal identifier, such as: screen name, IRC nick, user name') - im_handle.group=ugettext("1. Public Info") + im_handle.group = ugettext("1. Public Info") #: Optional field storing a home page URL; displayed publicly. home_page = db.LinkProperty( verbose_name=ugettext('Home Page URL')) - home_page.group=ugettext("1. Public Info") + home_page.group = ugettext("1. Public Info") #: Optional field storing a blog URL; displayed publicly. blog = db.LinkProperty( verbose_name=ugettext('Blog URL')) - blog.group=ugettext("1. Public Info") + blog.group = ugettext("1. Public Info") #: Optional field storing a URL to an image, expected to be a #: personal photo (or cartoon avatar, perhaps); displayed publicly. @@ -156,7 +156,7 @@ verbose_name=ugettext('Thumbnail Photo URL')) photo_url.help_text = ugettext( 'URL of 64x64 pixel thumbnail image') - photo_url.group=ugettext("1. Public Info") + photo_url.group = ugettext("1. Public Info") #: Optional field storing the latitude provided by the Role; displayed #: publicly. @@ -164,7 +164,7 @@ verbose_name=ugettext('Latitude')) latitude.help_text = ugettext( 'decimal degrees northerly (N), use minus sign (-) for southerly (S)') - latitude.group=ugettext("1. Public Info") + latitude.group = ugettext("1. Public Info") #: Optional field storing the longitude provided by the Role; displayed #: publicly. @@ -172,7 +172,7 @@ verbose_name=ugettext('Longitude')) longitude.help_text = ugettext( 'decimal degrees easterly (E), use minus sign (-) for westerly (W)') - longitude.group=ugettext("1. Public Info") + longitude.group = ugettext("1. Public Info") #==================================================================== # (private) contact information @@ -185,7 +185,7 @@ verbose_name=ugettext('Street address')) res_street.help_text = ugettext( 'street number and name, lower ASCII characters only') - res_street.group=ugettext("2. Contact Info (Private)") + res_street.group = ugettext("2. Contact Info (Private)") #: Required field containing residence address city; kept private. #: Residence city can only be lower ASCII, not UTF-8 text, because it @@ -193,7 +193,7 @@ res_city = db.StringProperty(required=True, verbose_name=ugettext('City')) res_city.help_text = ugettext('lower ASCII characters only') - res_city.group=ugettext("2. Contact Info (Private)") + res_city.group = ugettext("2. Contact Info (Private)") #: Optional field containing residence address state or province; kept #: private. Residence state/province can only be lower ASCII, not UTF-8 @@ -203,14 +203,14 @@ res_state.help_text = ugettext( 'optional if country/territory does not have states or provinces, ' 'lower ASCII characters only') - res_state.group=ugettext("2. Contact Info (Private)") + res_state.group = ugettext("2. Contact Info (Private)") #: Required field containing residence address country or territory; kept #: private. res_country = db.StringProperty(required=True, verbose_name=ugettext('Country/Territory'), choices=countries.COUNTRIES_AND_TERRITORIES) - res_country.group=ugettext("2. Contact Info (Private)") + res_country.group = ugettext("2. Contact Info (Private)") #: Required field containing residence address postal code (ZIP code in #: the United States); kept private. Residence postal code can only be @@ -218,7 +218,7 @@ res_postalcode = db.StringProperty(required=True, verbose_name=ugettext('ZIP/Postal Code')) res_postalcode.help_text = ugettext('lower ASCII characters only') - res_postalcode.group=ugettext("2. Contact Info (Private)") + res_postalcode.group = ugettext("2. Contact Info (Private)") #: Required field containing a phone number that will be used to #: contact the user, also supplied to shippers; kept private. @@ -227,14 +227,14 @@ verbose_name=ugettext('Phone Number')) phone.help_text = ugettext( 'include complete international calling number with country code') - phone.group=ugettext("2. Contact Info (Private)") + phone.group = ugettext("2. Contact Info (Private)") #: field storing whether the User has agreed to publish his location publish_location = db.BooleanProperty(required=False, default=False, verbose_name=ugettext('Publish my location')) publish_location.help_text = ugettext( 'Indicates whether the user agreed to publish location.') - publish_location.group=ugettext("2. Contact Info (Private)") + publish_location.group = ugettext("2. Contact Info (Private)") #: Optional field containing a separate shipping street address; kept #: private. If shipping address is not present in its entirety, the @@ -246,7 +246,7 @@ ship_street.help_text = ugettext( 'street number and name, lower ASCII characters only, ' 'fill in only if not same as above') - ship_street.group=ugettext("3. Shipping Info (Private and Optional)") + ship_street.group = ugettext("3. Shipping Info (Private and Optional)") #: Optional field containing shipping address city; kept private. #: Shipping city can only be lower ASCII, not UTF-8 text, because, if @@ -255,7 +255,7 @@ verbose_name=ugettext('Shipping City')) ship_city.help_text = ugettext('lower ASCII characters only' 'fill in only if not same as above') - ship_city.group=ugettext("3. Shipping Info (Private and Optional)") + ship_city.group = ugettext("3. Shipping Info (Private and Optional)") #: Optional field containing shipping address state or province; kept #: private. Shipping state/province can only be lower ASCII, not UTF-8 @@ -265,15 +265,15 @@ ship_state.help_text = ugettext( 'optional if country/territory does not have states or provinces, ' 'lower ASCII characters only, fill in only if not same as above') - ship_state.group=ugettext("3. Shipping Info (Private and Optional)") + ship_state.group = ugettext("3. Shipping Info (Private and Optional)") #: Optional field containing shipping address country or territory; kept #: private. ship_country = db.StringProperty( verbose_name=ugettext('Shipping Country/Territory'), choices=countries.COUNTRIES_AND_TERRITORIES) - ship_country.help_text=ugettext('fill in only if not same as above') - ship_country.group=ugettext("3. Shipping Info (Private and Optional)") + ship_country.help_text = ugettext('fill in only if not same as above') + ship_country.group = ugettext("3. Shipping Info (Private and Optional)") #: Optional field containing shipping address postal code (ZIP code in #: the United States); kept private. Shipping postal code can only be @@ -283,7 +283,7 @@ verbose_name=ugettext('Shipping ZIP/Postal Code')) ship_postalcode.help_text = ugettext('lower ASCII characters only' 'fill in only if not same as above') - ship_postalcode.group=ugettext("3. Shipping Info (Private and Optional)") + ship_postalcode.group = ugettext("3. Shipping Info (Private and Optional)") #==================================================================== @@ -297,20 +297,20 @@ verbose_name=ugettext('Birth Date')) birth_date.help_text = ugettext( 'required for determining program eligibility') - birth_date.group=ugettext("4. Private Info") + birth_date.group = ugettext("4. Private Info") #: Optional field indicating choice of t-shirt, from XXS to XXXL; #: kept private. tshirt_size = db.StringProperty( verbose_name=ugettext('T-shirt Size'), choices=('XXS', 'XS', 'S', 'M', 'L', 'XL', 'XXL', 'XXXL')) - tshirt_size.group=ugettext("4. Private Info") + tshirt_size.group = ugettext("4. Private Info") #: Optional field indicating choice of t-shirt fit; kept private. tshirt_style = db.StringProperty( verbose_name=ugettext('T-shirt Style'), choices=('male', 'female')) - tshirt_style.group=ugettext("4. Private Info") + tshirt_style.group = ugettext("4. Private Info") #: field storing wheter the User has agreed to the site-wide Terms of Service. #: (Not a required field because the Terms of Service might not be present @@ -319,7 +319,7 @@ verbose_name=ugettext('I Agree to the Terms of Service')) agreed_to_tos.help_text = ugettext( 'Indicates whether the user agreed to this role Terms of Service.') - agreed_to_tos.group=ugettext("5. Terms of Service") + agreed_to_tos.group = ugettext("5. Terms of Service") #: field storing when the User has agreed to the site-wide Terms of Service. #: (Not a required field because the Terms of Service might not be present @@ -328,7 +328,7 @@ verbose_name=ugettext('Has agreed to the Terms of Service on')) agreed_to_tos_on.help_text = ugettext( 'Indicates when the user agreed to this role Terms of Service.') - agreed_to_tos.group=ugettext("5. Terms of Service") + agreed_to_tos.group = ugettext("5. Terms of Service") #: field storing the status of this role #: Active means that this role can exercise all it's privileges. @@ -340,8 +340,8 @@ status = db.StringProperty(default='active', choices=['active','invalid','inactive'], verbose_name=ugettext('Status of this Role')) - status.help_text = ugettext( - 'Indicates the status of the role concerning which privileges may be used.') + status.help_text = ugettext('Indicates the status of the role ' + 'concerning which privileges may be used.') def name(self): """Property as 'name' for use in common templates. @@ -349,4 +349,4 @@ if self.name_on_documents: return self.name_on_documents else: - return '%s %s' %(self.given_name, self.surname) + return '%s %s' % (self.given_name, self.surname)