From adb12c48b287a812f63aec2b81d1e589294b14ed Mon Sep 17 00:00:00 2001 From: gfawcett Date: Fri, 16 Jul 2010 17:38:20 +0000 Subject: [PATCH] minor import cleanups git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@926 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- conifer/syrup/views/_common.py | 5 ++--- conifer/syrup/views/admin.py | 3 +-- conifer/syrup/views/feeds.py | 1 - conifer/syrup/views/general.py | 8 ++------ conifer/syrup/views/genshi_namespace.py | 4 +--- conifer/syrup/views/items.py | 7 +++---- conifer/syrup/views/sites.py | 3 +-- 7 files changed, 10 insertions(+), 21 deletions(-) diff --git a/conifer/syrup/views/_common.py b/conifer/syrup/views/_common.py index 612393e..00fba9a 100644 --- a/conifer/syrup/views/_common.py +++ b/conifer/syrup/views/_common.py @@ -35,14 +35,13 @@ from django.http import (HttpResponse, HttpResponseRedirect, HttpResponseForbidden) from django.shortcuts import get_object_or_404 from django.utils import simplejson -from django.utils.translation import ugettext as _ +from django.utils import translation from _generics import * # TODO: should not import-star from conifer.libsystems.marcxml import (marcxml_to_dictionary, marcxml_dictionary_to_dc) -from django.utils.translation import ugettext as _ - +__builtins__['_'] = translation.ugettext #----------------------------------------------------------------------------- # Authorization diff --git a/conifer/syrup/views/admin.py b/conifer/syrup/views/admin.py index 490159c..3ec2fe1 100644 --- a/conifer/syrup/views/admin.py +++ b/conifer/syrup/views/admin.py @@ -1,5 +1,4 @@ -from _common import * -from django.utils.translation import ugettext as _ +from _common import * from datetime import date #----------------------------------------------------------------------------- diff --git a/conifer/syrup/views/feeds.py b/conifer/syrup/views/feeds.py index 5c5b136..ac3ce2c 100644 --- a/conifer/syrup/views/feeds.py +++ b/conifer/syrup/views/feeds.py @@ -1,5 +1,4 @@ from _common import * -from django.utils.translation import ugettext as _ #----------------------------------------------------------------------------- # Site feeds diff --git a/conifer/syrup/views/general.py b/conifer/syrup/views/general.py index e354212..8b053cb 100644 --- a/conifer/syrup/views/general.py +++ b/conifer/syrup/views/general.py @@ -1,10 +1,6 @@ -from _common import * -from django.utils.translation import ugettext as _ -from search import * -#from lxml import etree -#import libxml2 -#import libxslt import os +from _common import * +from search import * #----------------------------------------------------------------------------- diff --git a/conifer/syrup/views/genshi_namespace.py b/conifer/syrup/views/genshi_namespace.py index 5af6a7d..5186685 100644 --- a/conifer/syrup/views/genshi_namespace.py +++ b/conifer/syrup/views/genshi_namespace.py @@ -13,6 +13,4 @@ import urllib from conifer.plumbing.hooksystem import gethook, callhook from conifer.syrup import models -from django.utils import translation - -_ = translation.ugettext +from django.utils.translation import ugettext as _ diff --git a/conifer/syrup/views/items.py b/conifer/syrup/views/items.py index 179a2e5..e88717e 100644 --- a/conifer/syrup/views/items.py +++ b/conifer/syrup/views/items.py @@ -1,7 +1,6 @@ -from _common import * -from conifer.syrup import integration -from django.utils.translation import ugettext as _ -from xml.etree import ElementTree as ET +from _common import * +from conifer.syrup import integration +from xml.etree import ElementTree as ET @members_only def item_detail(request, site_id, item_id): diff --git a/conifer/syrup/views/sites.py b/conifer/syrup/views/sites.py index 3485b2d..ffc95b0 100644 --- a/conifer/syrup/views/sites.py +++ b/conifer/syrup/views/sites.py @@ -1,6 +1,5 @@ from _common import * -from django.utils.translation import ugettext as _ -from search import * +from search import * #----------------------------------------------------------------------------- # Creating a new site -- 2.11.0