Filtering by month doesn't work

2013-11-25 Thread Vojtěch Tranta
Hi, do you have any clue why this does not work? def index(request): if request.method == 'POST' and request.POST: event_form = EventForm(request.POST) event = event_form.save() today = datetime.date.today(); year = int(today.strftime('%Y')) month = int(today.strftime('%m')) events = Event.object

Re: Filtering by month doesn't work

2013-11-26 Thread Vojtěch Tranta
.strftime('%Y')).* > And in django docs says that it necessary to validate your form before use > it: > > *if event_form.is_valid():* > *event = event_form.save()* > > > вторник, 26 ноября 2013 г., 5:24:21 UTC+6 пользователь Vojtěch Tranta > написал: &g

Re: Filtering by month doesn't work

2013-11-26 Thread Vojtěch Tranta
field end in Event table contains November dates? >> >> Also, you can use *today.month* instead of *int(today.strftime('%m')*) >> and* today.year *instead of *int(today.strftime('%Y')).* >> And in django docs says that it necessary to validate your for