On Wed, Aug 15, 2012 at 8:51 PM, Callum Bonnyman <bonnym...@gmail.com>wrote:

> I've tried a few things but i cannot get the correct date formats to
> calculate the difference, so far i have this:
>
>     popular_posts = Post.objects.extra(select={
>     'popularity': '(' + datetime.datetime.now() + ' - created) * views'
>     })
>
It shows an error, i've tried googling it but not had much luck so far


Where error are you getting?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to