Skip to content

Instantly share code, notes, and snippets.

@pedrohsbarbosa99
Created December 16, 2020 01:57
Show Gist options
  • Save pedrohsbarbosa99/729194e6d7bd5a6d51d63af4dcc464fc to your computer and use it in GitHub Desktop.
Save pedrohsbarbosa99/729194e6d7bd5a6d51d63af4dcc464fc to your computer and use it in GitHub Desktop.
def rep_class(request):
dateclasses = DateClass.objects.order_by('date_hour')
start_date = datetime.today()
end_date = datetime.today() + timedelta(days=15)
dateclasses = dateclasses.filter(
date_hour__range=[start_date, end_date]
)
return render(request, 'report/class.html', {
'dateclasses': dateclasses
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment