mirror of
https://github.com/GFDRR/sms-lapli.git
synced 2026-10-31 11:56:28 +00:00
Add the market place application Start Improving the dashboard Edit the data model to make it more suited to the reality of the CNSA Add Support for Alert and notification Add Import-Export functionality Achieve many minor changes to make the application more ergonomic
41 lines
1.1 KiB
Python
41 lines
1.1 KiB
Python
from django.shortcuts import render
|
|
from base.models import Limite
|
|
from hydromet.models import Observation
|
|
import datetime
|
|
|
|
# Create your views here.
|
|
|
|
def home(request):
|
|
return render(request, "public/index.html", {'menu_active':'accueil'})
|
|
|
|
|
|
def faq(request):
|
|
return render(request, "public/faq.html", {'menu_active':'faq'})
|
|
|
|
|
|
def pluviometrie(request):
|
|
departement_lst = Limite.objects.filter(typelimite__nom='Département');
|
|
month_lst = []
|
|
selDate = datetime.date.today()
|
|
|
|
for x in range(0,12):
|
|
first = selDate.replace(day=1)
|
|
last_month = first - datetime.timedelta(days=1)
|
|
month_lst.append({'key': last_month.strftime("%Y-%m-01"), 'val': last_month.strftime("%B %Y")})
|
|
selDate = last_month
|
|
|
|
return render(request, "public/pluviometrie.html", {'menu_active': 'pluviometrie','dep_lst': departement_lst, 'month_lst': month_lst })
|
|
|
|
|
|
def imp(request):
|
|
recupAll = Observation.objects.select_related('idStation')
|
|
dd = []
|
|
for e in recupAll:
|
|
dd.append(e)
|
|
return render(request, "public/test.html", {'val': dd})
|
|
|
|
|
|
|
|
|
|
|