Created
December 13, 2012 19:13
-
-
Save jjangdm/4278884 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. <input type="date" name="date" /> | |
2. views.py | |
def search(request): | |
today = datetime.datetime.now() | |
if 'date' in request.POST and request.POST['date']: | |
date = request.POST['date'] | |
date_sallary = Sallary.objects.filter(date=today.date) | |
date_asset = Asset.objects.filter(date=today.date) | |
... | |
date_sallary_sum = sum(Sallary.objects.filter(date=today.date).values_list('money', flat='true')) | |
date_asset_sum = sum(Asset.objects.filter(date=today.date).values_list('money', flat='true')) | |
... | |
return render_to_response("search_day.html", dict(...)) | |
else: | |
... | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment