source: mauRepo/MolesManager/trunk/cedaMoles/MolesManager/views/cedacat.py @ 8486

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/cedaMoles/MolesManager/views/cedacat.py@8486
Revision 8486, 664 bytes checked in by mnagni, 7 years ago (diff)

Incomplete - # 22534: Add versiojn number to the gui page
 http://team.ceda.ac.uk/trac/ceda/ticket/22534

Line 
1'''
2Created on 13 Apr 2012
3
4@author: mnagni
5'''
6
7from django.shortcuts import redirect
8
9from cedaMoles.MolesManager.views import cedaObservationView
10from cedaMoles.MolesManager.ceda_guid import CedaGUID
11
12def cedacat(request, guid):
13    ceda_guid = request.moles3EPB.search(CedaGUID, guid)
14    if ceda_guid and ceda_guid.ceda_observation:
15        return redirect(cedaObservationView.objView, ceda_guid.ceda_observation)
16
17    if ceda_guid and ceda_guid.ceda_observationcollection:
18        #return redirect(cedaObservationCollectionView.FIXME_VIEW, ceda_guid.ceda_observationcollection)
19        pass
20
21    raise Exception("Cannot find object associated with: " + guid)
Note: See TracBrowser for help on using the repository browser.