Ignore:
Timestamp:
1 Feb 2010, 16:18:44 (15 years ago)
Author:
uli
Message:

Remove quick-import page.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py

    r4941 r4956  
    1515                           WAeUPDisplayFormPage, NullValidator)
    1616from waeup.sirp.catalog import search, search_context
    17 from waeup.sirp.datacenter import Import
    1817from waeup.sirp.interfaces import (IUniversity, IWAeUPObject, IUserContainer,
    1918                              IUserAccount, IFacultyContainer, IDataCenter,
     
    308307        base, ext = os.path.splitext(filename)
    309308        return '%s_%s%s' % (base, filtered_username, ext.lower())
    310 
    311 class DataCenterImportCSVPage(WAeUPPage):
    312     """A view for importing things.
    313 
    314     """
    315     grok.require('waeup.manageUniversity')
    316     grok.name('importcsv')
    317     grok.template('datacenterimportcsvpage')
    318     grok.context(IDataCenter)
    319     title = u'Import CSV'
    320     pnav = 0
    321 
    322     def getImports(self):
    323         result = []
    324         imports = self.context.getPossibleImports()
    325         result = [Import(x, y) for x, y in imports]
    326         return result
    327 
    328     def update(self, csvfile=None, clear=None, overwrite=None,
    329                receiverid=None, CANCEL=None, SUBMIT=None):
    330         if CANCEL is not None:
    331             self.redirect(self.url(self.context))
    332             return
    333         if not csvfile:
    334             return
    335         if not SUBMIT:
    336             return
    337         try:
    338             self.context.doImport(csvfile, receiverid, clear=clear)
    339         except ValueError:
    340             self.flash('Could not import: %s' % os.path.basename(csvfile))
    341             return
    342         except:
    343             self.flash('Import failed: %s %s' % (sys.exc_info()[0],
    344                                                  sys.exc_info()[1]))
    345             return
    346         self.flash('Successfully imported: %s' % os.path.basename(csvfile))
    347         self.redirect(self.url(self.context))
    348         return
    349309
    350310class DatacenterImportStep1(WAeUPPage):
Note: See TracChangeset for help on using the changeset viewer.