source: mauRepo/MolesManager/trunk/src/MolesManager/views/cedaObservationView.py @ 8015

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

implemented a prototype for the cedaObservation.
Further implementation for the Moles2 migration

Line 
1'''
2Created on 1 Nov 2011
3
4@author: mnagni
5'''
6from MolesManager.dataaccess import getCEDA_ObservationById
7from MolesManager.forms.date import createForm
8from django.shortcuts import render_to_response
9from django.core.context_processors import csrf
10
11
12def __getSample(request):
13    '''
14    sampleForm = createForm(request.POST or None)
15    if sampleForm and sampleForm.is_valid():
16        dp = getDatePrecisionById(1)
17        sampleForm = createForm(dp[0])
18    return sampleForm
19    '''
20    dp = getCEDA_ObservationById(1)
21    return createForm(dp[0])
22def coView(request):
23    c = {}
24    form = __getSample(request)
25    c['coObs'] = form
26   
27    c.update(csrf(request))
28    return render_to_response('cedaObservation.html', c)
Note: See TracBrowser for help on using the repository browser.