Add missing import in soc/views/site/sponsor/list.py which caused exception when app was deployed and first site you visited was "List Site Sponsors". Update files according to recent django update and django backwards incompatibility (for example newforms is changed to forms).
Patch by: Pawel Solyga
Review by: to-be-reviewed
--- a/app/main.py Tue Oct 14 16:00:59 2008 +0000
+++ b/app/main.py Tue Oct 14 16:10:07 2008 +0000
@@ -47,20 +47,17 @@
import django.core.handlers.wsgi
import django.core.signals
import django.db
-import django.dispatch.dispatcher
-
# Log errors.
def log_exception(*args, **kwds):
logging.exception('Exception in request:')
-django.dispatch.dispatcher.connect(
- log_exception, django.core.signals.got_request_exception)
+# Log all exceptions detected by Django.
+django.core.signals.got_request_exception.connect(log_exception)
# Unregister the rollback event handler.
-django.dispatch.dispatcher.disconnect(
- django.db._rollback_on_exception,
- django.core.signals.got_request_exception)
+django.core.signals.got_request_exception.disconnect(
+ django.db._rollback_on_exception)
def main():
--- a/app/soc/views/helper/forms.py Tue Oct 14 16:00:59 2008 +0000
+++ b/app/soc/views/helper/forms.py Tue Oct 14 16:10:07 2008 +0000
@@ -25,7 +25,7 @@
from google.appengine.ext.db import djangoforms
-from django import newforms as forms
+from django import forms
from django.utils import safestring
--- a/app/soc/views/helper/widgets.py Tue Oct 14 16:00:59 2008 +0000
+++ b/app/soc/views/helper/widgets.py Tue Oct 14 16:10:07 2008 +0000
@@ -24,9 +24,9 @@
import copy
-from django import newforms as forms
-from django.newforms import util
-from django.newforms import widgets
+from django import forms
+from django.forms import util
+from django.forms import widgets
from django.utils import html
from django.utils import simplejson
from django.utils import safestring
--- a/app/soc/views/person/profile.py Tue Oct 14 16:00:59 2008 +0000
+++ b/app/soc/views/person/profile.py Tue Oct 14 16:10:07 2008 +0000
@@ -30,9 +30,9 @@
from google.appengine.api import users
+from django import forms
from django import http
from django import shortcuts
-from django import newforms as forms
from soc.models import person
from soc.views import helper
--- a/app/soc/views/site/docs/edit.py Tue Oct 14 16:00:59 2008 +0000
+++ b/app/soc/views/site/docs/edit.py Tue Oct 14 16:10:07 2008 +0000
@@ -24,8 +24,8 @@
from google.appengine.api import users
+from django import forms
from django import http
-from django import newforms as forms
from django.utils.translation import ugettext_lazy
from soc.logic import models
@@ -50,7 +50,7 @@
class EditForm(helper.forms.DbModelForm):
"""Django form displayed when Developer edits a Document.
"""
- doc_key_name = forms.CharField(widget=forms.HiddenInput)
+ doc_key_name = forms.fields.CharField(widget=forms.HiddenInput)
content = forms.fields.CharField(widget=helper.widgets.TinyMCE())
class Meta:
--- a/app/soc/views/site/home.py Tue Oct 14 16:00:59 2008 +0000
+++ b/app/soc/views/site/home.py Tue Oct 14 16:10:07 2008 +0000
@@ -30,9 +30,9 @@
from google.appengine.api import users
from google.appengine.ext import db
+from django import forms
from django import http
from django import shortcuts
-from django import newforms as forms
from soc.logic import models
from soc.logic import out_of_band
--- a/app/soc/views/site/sponsor/list.py Tue Oct 14 16:00:59 2008 +0000
+++ b/app/soc/views/site/sponsor/list.py Tue Oct 14 16:10:07 2008 +0000
@@ -23,6 +23,7 @@
from soc.logic import models
+from soc.logic.models import sponsor
from soc.views import helper
from soc.views import simple
from soc.views.helper import access
--- a/app/soc/views/site/sponsor/profile.py Tue Oct 14 16:00:59 2008 +0000
+++ b/app/soc/views/site/sponsor/profile.py Tue Oct 14 16:10:07 2008 +0000
@@ -24,8 +24,8 @@
from google.appengine.api import users
+from django import forms
from django import http
-from django import newforms as forms
from soc.logic import models
from soc.logic import out_of_band
--- a/app/soc/views/site/user/profile.py Tue Oct 14 16:00:59 2008 +0000
+++ b/app/soc/views/site/user/profile.py Tue Oct 14 16:10:07 2008 +0000
@@ -24,8 +24,8 @@
from google.appengine.api import users
+from django import forms
from django import http
-from django import newforms as forms
from django.utils.translation import ugettext_lazy
from soc.logic import models
--- a/app/soc/views/user/profile.py Tue Oct 14 16:00:59 2008 +0000
+++ b/app/soc/views/user/profile.py Tue Oct 14 16:10:07 2008 +0000
@@ -24,8 +24,8 @@
from google.appengine.api import users
+from django import forms
from django import http
-from django import newforms as forms
from django import shortcuts
from django.utils.translation import ugettext_lazy