django accessing class variables in a view

Posted by dana on Stack Overflow See other posts from Stack Overflow or by dana
Published on 2010-06-04T09:33:42Z Indexed on 2010/06/05 8:32 UTC
Read the original article Hit count: 176

Filed under:
|
|
|
|

hello, i want to make a notification function, and i need fields from 2 different models. how can i access those fields? in my notification view i wrote this

  data = Notices.objects.filter(last_login<date_follow)

where last_login belongs to the model class User , and date_follow to Follow but it is not a proper and correct way of accessing those variables. How can i access them? I need to compare the two dates for realising the notifications that one did not see since his last login.

Thanks!

© Stack Overflow or respective owner

Related posts about django

Related posts about beginner