forked from DGNum/gestioCOF
Limite le datepicker pour ne pas demander plus de temps que possible dans l'historique
This commit is contained in:
parent
fbafdb7134
commit
559b36b6f0
2 changed files with 7 additions and 1 deletions
|
@ -62,6 +62,7 @@ $(document).ready(function() {
|
||||||
format : 'YYYY-MM-DD HH:mm',
|
format : 'YYYY-MM-DD HH:mm',
|
||||||
stepping : 5,
|
stepping : 5,
|
||||||
locale : 'fr',
|
locale : 'fr',
|
||||||
|
minDate : '{{ week_ago }}',
|
||||||
showTodayButton: true,
|
showTodayButton: true,
|
||||||
widgetPositioning: {
|
widgetPositioning: {
|
||||||
horizontal: "left",
|
horizontal: "left",
|
||||||
|
|
|
@ -1588,7 +1588,12 @@ def kpsul_articles_data(request):
|
||||||
|
|
||||||
@teamkfet_required
|
@teamkfet_required
|
||||||
def history(request):
|
def history(request):
|
||||||
data = {"filter_form": FilterHistoryForm()}
|
week_ago = timezone.now() - settings.KFET_HISTORY_DATE_LIMIT
|
||||||
|
data = {
|
||||||
|
"filter_form": FilterHistoryForm(),
|
||||||
|
"week_ago": week_ago.strftime("%Y-%m-%d %H:%M"),
|
||||||
|
}
|
||||||
|
print(data["week_ago"])
|
||||||
return render(request, "kfet/history.html", data)
|
return render(request, "kfet/history.html", data)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue