We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6598c61 + 375d8df commit 99f5bdbCopy full SHA for 99f5bdb
1 file changed
corpus/newsletter/views.py
@@ -33,6 +33,10 @@ def calendar_view(request):
33
month = int(request.GET.get("month", today.month))
34
if not (1 <= month <= 12):
35
month = today.month
36
+ messages.error(request, "Month out of range")
37
+ if year < 1900 or year > today.year+100 :
38
+ year = today.year
39
+ messages.error(request, "Year out of range")
40
first_of_month = date(year, month, 1)
41
except (ValueError, TypeError):
42
year = today.year
@@ -285,4 +289,4 @@ def delete_announcement(request, pk):
285
289
return redirect("newsletter_manage_announcements")
286
290
else:
287
291
messages.warning(request, "Incorrect Request Method. Contact Administrator")
288
- return redirect("newsletter_manage_announcements")
292
+ return redirect("newsletter_manage_announcements")
0 commit comments