Remove not used imports in models. Fix missing spaces in models when operator not preceded by a space. Add missing ugettext_lazy import to Proposal model.
Patch by: Pawel Solyga
Review by: to-be-reviewed
--- a/app/soc/models/administrator.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/administrator.py Sat Oct 18 21:54:13 2008 +0000
@@ -22,10 +22,6 @@
]
-from google.appengine.ext import db
-
-from soc.models import organization
-
import soc.models.reviewer
--- a/app/soc/models/base.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/base.py Sat Oct 18 21:54:13 2008 +0000
@@ -27,9 +27,7 @@
from google.appengine.ext import db
-from soc.views import helper
-
-import soc.views.helper.forms
+from soc.views.helper import forms
class ModelWithFieldAttributes(db.Model):
@@ -71,7 +69,7 @@
Property itself via the Model entity.
"""
if not cls._fields_cache or (cls != cls._fields_cache.__class__.Meta.model):
- class FieldsProxy(helper.forms.DbModelForm):
+ class FieldsProxy(forms.DbModelForm):
"""Form used as a proxy to access User model properties attributes.
"""
--- a/app/soc/models/club.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/club.py Sat Oct 18 21:54:13 2008 +0000
@@ -23,10 +23,6 @@
from django.utils.translation import ugettext_lazy
-from google.appengine.ext import db
-
-from soc.models import base
-
import soc.models.group
--- a/app/soc/models/contributor.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/contributor.py Sat Oct 18 21:54:13 2008 +0000
@@ -22,8 +22,6 @@
]
-from google.appengine.ext import db
-
import soc.models.role
--- a/app/soc/models/document.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/document.py Sat Oct 18 21:54:13 2008 +0000
@@ -21,10 +21,6 @@
]
-from google.appengine.ext import db
-
-from django.utils.translation import ugettext_lazy
-
import soc.models.work
--- a/app/soc/models/group.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/group.py Sat Oct 18 21:54:13 2008 +0000
@@ -114,7 +114,7 @@
#: text, because, if supplied, it is used as a shipping address.
postalcode = db.StringProperty(required=True,
verbose_name=ugettext_lazy('ZIP/Postal Code'))
- postalcode.help_text=ugettext_lazy('lower ASCII characters only')
+ postalcode.help_text = ugettext_lazy('lower ASCII characters only')
#: Required contact phone number that will be, amongst other uses,
#: supplied to shippers along with the shipping address; kept private.
--- a/app/soc/models/mentor.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/mentor.py Sat Oct 18 21:54:13 2008 +0000
@@ -21,8 +21,6 @@
]
-from google.appengine.ext import db
-
import soc.models.reviewer
--- a/app/soc/models/organization.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/organization.py Sat Oct 18 21:54:13 2008 +0000
@@ -23,10 +23,6 @@
from django.utils.translation import ugettext_lazy
-from google.appengine.ext import db
-
-from soc import models
-
import soc.models.group
--- a/app/soc/models/person.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/person.py Sat Oct 18 21:54:13 2008 +0000
@@ -99,13 +99,13 @@
#: Optional field storing Instant Messaging network; displayed publicly.
im_network = db.StringProperty(
verbose_name=ugettext_lazy('IM Network'))
- im_network.help_text=ugettext_lazy(
+ im_network.help_text = ugettext_lazy(
'examples: irc:irc.freenode.org xmpp:gmail.com/Home')
#: Optional field storing Instant Messaging handle; displayed publicly.
im_handle = db.StringProperty(
verbose_name=ugettext_lazy('IM Handle'))
- im_handle.help_text=ugettext_lazy(
+ im_handle.help_text = ugettext_lazy(
'personal identifier, such as: screen name, IRC nick, user name')
#: Optional field storing a home page URL; displayed publicly.
@@ -176,7 +176,7 @@
#: lower ASCII, not UTF-8 text, because it may be used as a shipping address.
res_postalcode = db.StringProperty(required=True,
verbose_name=ugettext_lazy('ZIP/Postal Code'))
- res_postalcode.help_text=ugettext_lazy('lower ASCII characters only')
+ res_postalcode.help_text = ugettext_lazy('lower ASCII characters only')
#: Optional field containing a separate shipping street address; kept
#: private. If shipping address is not present in its entirety, the
@@ -216,7 +216,7 @@
#: shipping address.
ship_postalcode = db.StringProperty(
verbose_name=ugettext_lazy('ZIP/Postal Code'))
- ship_postalcode.help_text=ugettext_lazy('lower ASCII characters only')
+ ship_postalcode.help_text = ugettext_lazy('lower ASCII characters only')
#: Required field containing a phone number that will be supplied
#: to shippers; kept private.
--- a/app/soc/models/proposal.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/proposal.py Sat Oct 18 21:54:13 2008 +0000
@@ -24,6 +24,8 @@
from google.appengine.ext import db
+from django.utils.translation import ugettext_lazy
+
import soc.models.work
import soc.models.quiz
import soc.models.response
--- a/app/soc/models/quiz.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/quiz.py Sat Oct 18 21:54:13 2008 +0000
@@ -22,10 +22,6 @@
import reflistprop
-from google.appengine.ext import db
-
-from django.utils.translation import ugettext_lazy
-
import soc.models.answer
import soc.models.question
import soc.models.work
--- a/app/soc/models/response.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/response.py Sat Oct 18 21:54:13 2008 +0000
@@ -25,8 +25,6 @@
from google.appengine.ext import db
-from django.utils.translation import ugettext_lazy
-
import soc.models.quiz
import soc.models.user
--- a/app/soc/models/review.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/review.py Sat Oct 18 21:54:13 2008 +0000
@@ -23,9 +23,8 @@
from google.appengine.ext import db
-from soc import models
-
-import soc.models.survey
+# TODO: Uncomment when Survey model is committed
+#import soc.models.survey
import soc.models.work
import soc.models.reviewer
--- a/app/soc/models/role.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/role.py Sat Oct 18 21:54:13 2008 +0000
@@ -21,8 +21,6 @@
]
-from google.appengine.ext import db
-
import soc.models.person
--- a/app/soc/models/school.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/school.py Sat Oct 18 21:54:13 2008 +0000
@@ -23,10 +23,6 @@
from django.utils.translation import ugettext_lazy
-from google.appengine.ext import db
-
-from soc.models import base
-
import soc.models.group
--- a/app/soc/models/site_settings.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/site_settings.py Sat Oct 18 21:54:13 2008 +0000
@@ -21,10 +21,6 @@
]
-from google.appengine.ext import db
-
-from django.utils.translation import ugettext_lazy
-
import soc.models.home_settings
--- a/app/soc/models/sponsor.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/sponsor.py Sat Oct 18 21:54:13 2008 +0000
@@ -23,10 +23,6 @@
from django.utils.translation import ugettext_lazy
-from google.appengine.ext import db
-
-from soc import models
-
import soc.models.group
--- a/app/soc/models/task.py Sat Oct 18 17:49:46 2008 +0000
+++ b/app/soc/models/task.py Sat Oct 18 21:54:13 2008 +0000
@@ -23,7 +23,6 @@
from google.appengine.ext import db
-from soc import models
from soc.models import base
import soc.models.proposal
@@ -48,7 +47,7 @@
#: Task is based. A Task may be based on only a single Proposal,
#: but a Proposal can be the foundation for multiple Tasks. The
#: back-reference in the Proposal model is a Query named 'tasks'.
- proposal = db.ReferenceProperty(reference_class=models.proposal.Proposal,
+ proposal = db.ReferenceProperty(reference_class=soc.models.proposal.Proposal,
required=True,
collection_name="tasks")