Bugfixes to the latest revision
Some pages did not work due to missing imports, or wrongly
imported modules.
Patch by: Chen Lunpeng
Reviewd by: Sverre Rabbelier
--- a/app/soc/views/site/docs/edit.py Mon Oct 13 04:34:14 2008 +0000
+++ b/app/soc/views/site/docs/edit.py Mon Oct 13 06:19:43 2008 +0000
@@ -28,6 +28,7 @@
from django import newforms as forms
from django.utils.translation import ugettext_lazy
+from soc.logic import models
from soc.logic.models import document
from soc.logic import out_of_band
from soc.logic import path_link_name
--- a/app/soc/views/site/docs/list.py Mon Oct 13 04:34:14 2008 +0000
+++ b/app/soc/views/site/docs/list.py Mon Oct 13 06:19:43 2008 +0000
@@ -23,7 +23,7 @@
import soc.logic
-from soc.logic import models
+from soc.logic.models import work
import soc.models.document
from soc.views import simple
from soc.views import helper
@@ -61,7 +61,7 @@
offset=request.GET.get('offset'), limit=request.GET.get('limit'))
# Fetch one more to see if there should be a 'next' link
- docs = models.work.logic.getForLimitAndOffset(limit + 1, offset=offset)
+ docs = work.logic.getForLimitAndOffset(limit + 1, offset=offset)
context['pagination_form'] = helper.lists.makePaginationForm(request, limit)
--- a/app/soc/views/site/sponsor/profile.py Mon Oct 13 04:34:14 2008 +0000
+++ b/app/soc/views/site/sponsor/profile.py Mon Oct 13 06:19:43 2008 +0000
@@ -32,6 +32,7 @@
from soc.logic import out_of_band
from soc.logic.site import id_user
from soc.logic import models
+from soc.logic.models import sponsor
import soc.models.sponsor
from soc.views import helper
from soc.views.helper import access
@@ -112,7 +113,7 @@
# try to fetch Sponsor entity corresponding to link_name if one exists
try:
- existing_sponsor = models.sponsor.logic.getIfFields(link_name=link_name)
+ existing_sponsor = sponsor.logic.getIfFields(link_name=link_name)
except out_of_band.ErrorResponse, error:
# show custom 404 page when link name doesn't exist in Datastore
error.message = error.message + DEF_CREATE_NEW_SPONSOR_MSG