Remove unused imports and variables in different soc.views.models modules.
Patch by: Pawel Solyga
--- a/app/soc/views/models/base.py Mon Dec 15 01:13:07 2008 +0000
+++ b/app/soc/views/models/base.py Mon Dec 15 01:15:32 2008 +0000
@@ -516,7 +516,8 @@
if 'scope_path' not in fields:
return
- scope = self._params['scope_logic'].logic.getFromKeyName(fields['scope_path'])
+ scope = self._params['scope_logic'].logic.getFromKeyName(
+ fields['scope_path'])
fields['scope'] = scope
def _public(self, request, entity, context):
--- a/app/soc/views/models/group.py Mon Dec 15 01:13:07 2008 +0000
+++ b/app/soc/views/models/group.py Mon Dec 15 01:15:32 2008 +0000
@@ -28,12 +28,9 @@
from soc.logic import dicts
from soc.logic.models import user as user_logic
-from soc.views import helper
+from soc.views.helper import widgets
from soc.views.models import base
-import soc.views.helper
-import soc.views.helper.widgets
-
class View(base.View):
"""View methods for the Group model.
@@ -51,7 +48,7 @@
new_params['extra_dynaexclude'] = ['founder', 'home']
new_params['edit_extra_dynafields'] = {
- 'founded_by': forms.CharField(widget=helper.widgets.ReadOnlyInput(),
+ 'founded_by': forms.CharField(widget=widgets.ReadOnlyInput(),
required=False),
}
--- a/app/soc/views/models/host.py Mon Dec 15 01:13:07 2008 +0000
+++ b/app/soc/views/models/host.py Mon Dec 15 01:15:32 2008 +0000
@@ -26,7 +26,6 @@
from soc.logic import dicts
from soc.logic.models import host as host_logic
from soc.logic.models import user as user_logic
-from soc.logic.models import sponsor as sponsor_logic
from soc.views import helper
from soc.views.models import role
from soc.views.models import sponsor as sponsor_view
--- a/app/soc/views/models/organization.py Mon Dec 15 01:13:07 2008 +0000
+++ b/app/soc/views/models/organization.py Mon Dec 15 01:15:32 2008 +0000
@@ -22,8 +22,6 @@
]
-from google.appengine.api import users
-
from django import forms
from soc.logic import cleaning
--- a/app/soc/views/models/program.py Mon Dec 15 01:13:07 2008 +0000
+++ b/app/soc/views/models/program.py Mon Dec 15 01:15:32 2008 +0000
@@ -22,14 +22,10 @@
]
-from google.appengine.api import users
-
from django import forms
-from django.utils.translation import ugettext_lazy
from soc.logic import cleaning
from soc.logic import dicts
-from soc.logic.models import sponsor as sponsor_logic
from soc.views import helper
from soc.views.helper import access
from soc.views.helper import redirects
--- a/app/soc/views/models/role.py Mon Dec 15 01:13:07 2008 +0000
+++ b/app/soc/views/models/role.py Mon Dec 15 01:15:32 2008 +0000
@@ -32,7 +32,6 @@
from soc.views.helper import access
from soc.views.helper import redirects
from soc.views.models import base
-from soc.views.models import sponsor as sponsor_view
from soc.views.models import user as user_view
import soc.models.request
--- a/app/soc/views/models/user.py Mon Dec 15 01:13:07 2008 +0000
+++ b/app/soc/views/models/user.py Mon Dec 15 01:15:32 2008 +0000
@@ -70,7 +70,6 @@
raise forms.ValidationError("This link ID is in wrong format.")
properties = {'link_id': link_id}
- user = soc.logic.models.user.logic.getForFields(properties, unique=True)
link_id_user = soc.logic.models.user.logic.getForFields(properties,
unique=True)
--- a/app/soc/views/models/user_self.py Mon Dec 15 01:13:07 2008 +0000
+++ b/app/soc/views/models/user_self.py Mon Dec 15 01:15:32 2008 +0000
@@ -235,7 +235,7 @@
# fill in the email field with the data from the entity
form.fields['email'].initial = entity.account.email()
- super(View, self)._editGet(request ,entity, form)
+ super(View, self)._editGet(request, entity, form)
def _editPost(self, request, entity, fields):
"""See base.View._editPost().