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

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

now deals with Obs and ObsCollection? GUIDs properly in URLs

Line 
1'''
2Created on 13 Apr 2012
3
4@author: mnagni
5'''
6
7#from django.shortcuts import redirect
8
9from cedaMoles.MolesManager.views import cedaObservationView
10from cedaMoles.MolesManager.views import cedaObservationCollectionView
11
12from cedaMoles.MolesManager.ceda_guid import CedaGUID
13
14def cedacat(request, guid):
15    ceda_guid = request.moles3EPB.search(CedaGUID, guid)
16    if ceda_guid and ceda_guid.ceda_observation:
17        return cedaObservationView.objView(request, ceda_guid.ceda_observation)
18        #return redirect(cedaObservationView.objView, ceda_guid.ceda_observation)
19
20    if ceda_guid and ceda_guid.ceda_observationcollection:
21        return cedaObservationCollectionView.objView(request, ceda_guid.ceda_observationcollection)
22        #return redirect(cedaObservationCollectionView.FIXME_VIEW, ceda_guid.ceda_observationcollection)
23        #return cedaObservationCollectionView.objView(request, ceda_guid.ceda_observationcollection)
24        print "ObsCol"
25        pass
26#    if ceda_guid and ceda_guid.ceda_project:
27#       
28#        pass
29#    if ceda_guid and ceda_guid.ceda_process:
30#       
31#        pass
32#    if ceda_guid and ceda_guid.ceda_computation:
33#       
34#        pass
35#    if ceda_guid and ceda_guid.ceda_composite:
36#       
37#        pass
38#    if ceda_guid and ceda_guid.ceda_aquisition:
39#       
40#        pass
41#    if ceda_guid and ceda_guid.ceda_instrument:
42#       
43#        pass
44#    if ceda_guid and ceda_guid.ceda_platform:
45#       
46#        pass
47   
48    raise Exception("Cannot find object associated with: " + guid)
Note: See TracBrowser for help on using the repository browser.