On Thursday, March 1, 2012 3:21:41 PM UTC+2, Tony Kyriakides wrote:
How can I use order_by and filter at the same time? (drives me
nuts..!!!)
This is what i tried:
from django.shortcuts import render_to_response
from vidupdate.posts.models import Entry
from datetime import datetime #( I even imported the date only)
def entry_view(request):
entries = Entry.objects.all().filter(posted.date ==
today).order_by('pushes')
def entry_view(request):
entries =
Entry.objects.all().filter(date.today()).order_by(' pushes')
def entry_view(request):
entries =
Entry.objects.all().filter(datetime.date.today()).order_ by('pushes')
I think I am wrong at the .filter()...
Thanks in advance..!!
On Thursday, March 1, 2012 3:21:41 PM UTC+2, Tony Kyriakides wrote:
How can I use order_by and filter at the same time? (drives me
nuts..!!!)
This is what i tried:
from django.shortcuts import render_to_response
from vidupdate.posts.models import Entry
from datetime import datetime #( I even imported the date only)
def entry_view(request):
entries = Entry.objects.all().filter(posted.date ==
today).order_by('pushes')
def entry_view(request):
entries =
Entry.objects.all().filter(date.today()).order_by(' pushes')
def entry_view(request):
entries =
Entry.objects.all().filter(datetime.date.today()).order_ by('pushes')
I think I am wrong at the .filter()...
Thanks in advance..!!
On Thursday, March 1, 2012 3:21:41 PM UTC+2, Tony Kyriakides wrote:
How can I use order_by and filter at the same time? (drives me
nuts..!!!)
This is what i tried:
from django.shortcuts import render_to_response
from vidupdate.posts.models import Entry
from datetime import datetime #( I even imported the date only)
def entry_view(request):
entries = Entry.objects.all().filter(posted.date ==
today).order_by('pushes')
def entry_view(request):
entries =
Entry.objects.all().filter(date.today()).order_by(' pushes')
def entry_view(request):
entries =
Entry.objects.all().filter(datetime.date.today()).order_ by('pushes')
I think I am wrong at the .filter()...
Thanks in advance..!!
On Thursday, March 1, 2012 3:21:41 PM UTC+2, Tony Kyriakides wrote:
How can I use order_by and filter at the same time? (drives me--
nuts..!!!)
This is what i tried:
from django.shortcuts import render_to_response
from vidupdate.posts.models import Entry
from datetime import datetime #( I even imported the date only)
def entry_view(request):
entries = Entry.objects.all().filter(posted.date ==
today).order_by('pushes')
def entry_view(request):
entries =
Entry.objects.all().filter(date.today()).order_by(' pushes')
def entry_view(request):
entries =
Entry.objects.all().filter(datetime.date.today()).order_ by('pushes')
I think I am wrong at the .filter()...
Thanks in advance..!!
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/PPj7HHWGGuYJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment