Changeset 4486 for MILK


Ignore:
Timestamp:
24/11/08 17:11:49 (11 years ago)
Author:
cbyrom
Message:

Tidy up imports and use proper config object for ndgObject initialisation.

Location:
MILK/trunk/milk_server/milk_server/controllers/atom_editor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/controllers/atom_editor/editatom.py

    r4478 r4486  
    55 @author: C Byrom, Tessella Sep 2008 
    66''' 
    7 from milk_server.lib.base import * 
    8 from milk_server.models.form import * 
    9 from ndgUtils import ndgObject 
     7import logging, traceback, sys 
    108from paste.request import parse_querystring 
    11 from milk_server.lib import mailer 
    12 from milk_server.lib.ndgInterface import interface  
    139from xml.parsers.expat import ExpatError 
    14 import logging, traceback, sys 
    15 from ndgUtils.models.Atom import Atom, Person, Link, Category, ValidationError 
    1610from formencode import Invalid 
    1711from genshi.filters import HTMLFormFiller 
    1812from genshi import HTML 
     13from milk_server.lib.base import * 
     14from milk_server.models.form import * 
     15from milk_server.lib import mailer 
     16from milk_server.lib.ndgInterface import interface  
     17import milk_server.lib.htmlUtilities as utils 
     18from milk_server.lib.atomutilities import savePageAndRender 
     19from ndgUtils import ndgObject 
     20from ndgUtils.models.Atom import Atom, Person, Link, Category, ValidationError 
    1921import ndgUtils.models.existdbclient as edc 
    2022from ndgUtils.models.MolesEntity import MolesEntity as ME 
    2123from ndgUtils.models.utilities import escapeSpecialCharacters 
    2224from ndgUtils.vocabtermdata import VocabTermData as VTD 
    23 import milk_server.lib.htmlUtilities as utils 
    2425from granulatorTool.granulite import granulite as granulite 
    25 from milk_server.lib.atomutilities import savePageAndRender 
    2626 
    2727class EditatomController(BaseController): 
     
    3939        if uri: 
    4040            try: 
    41                 self.ndgObject = ndgObject(uri, config=self.cf.config) 
     41                self.ndgObject = ndgObject(uri, config=self.cf) 
    4242            except ValueError,e: 
    4343                return e 
     
    311311        ''' 
    312312        logging.info("Setting up atom edit template") 
    313  
    314313        self.prepareEditForm(uri) 
    315314 
  • MILK/trunk/milk_server/milk_server/controllers/atom_editor/listatom.py

    r4478 r4486  
    55 @author: C Byrom, Tessella Sep 2008 
    66''' 
    7 from milk_server.lib.base import * 
    8 from ndgUtils import ndgObject 
     7import logging 
    98from paste.request import parse_querystring 
    10 from milk_server.lib.ndgInterface import interface  
    119from xml.parsers.expat import ExpatError 
    12 import logging 
    13 from ndgUtils.models.Atom import Atom 
    1410from formencode import Schema, validators, Invalid 
    1511from genshi.filters import HTMLFormFiller 
    1612from genshi import HTML 
     13from ndgUtils import ndgObject 
     14from ndgUtils.models.Atom import Atom 
    1715from ndgUtils import DocumentRetrieve 
    1816from ndgUtils.eXistInterface import ndg_eXist 
     
    2018from ndgUtils.models.MolesEntity import MolesEntity as ME 
    2119from ndgUtils.vocabtermdata import VocabTermData as VTD, VocabTermItem as VTI 
     20from milk_server.lib.base import * 
     21from milk_server.lib.ndgInterface import interface  
    2222import milk_server.lib.htmlUtilities as utils 
     23from milk_server.lib.atomutilities import savePageAndRender 
    2324from editatom import EditatomController as ec 
    24 from milk_server.lib.atomutilities import savePageAndRender 
    2525 
    2626 
     
    3636        if uri: 
    3737            try: 
    38                 self.ndgObject = ndgObject(uri, config=self.cf.config) 
     38                self.ndgObject = ndgObject(uri, config=self.cf) 
    3939            except ValueError,e: 
    4040                return e 
Note: See TracChangeset for help on using the changeset viewer.