source: mauRepo/MolesManager/trunk/src/MolesManager/views/cedacat.py @ 8445

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

Complete - # 22489: CEDA Observation Collection - phenomenonTime
 http://team.ceda.ac.uk/trac/ceda/ticket/22489
Complete - # 22488: CEDA Observation Collection - Geographical Extent
 http://team.ceda.ac.uk/trac/ceda/ticket/22488

Line 
1'''
2Created on 13 Apr 2012
3
4@author: mnagni
5'''
6
7from django.shortcuts import redirect
8
9from MolesManager.views import cedaObservationView
10from 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.