euscan-ng/euscanwww/euscan_accounts/feeds.py
volpino c31076ddb4 euscanwww: Moving all account related stuff to a separate app
Note: This commit could break things, the userprofile model has been
moved so the db layout must change (some alter table commands are
needed to don't lose data)

Signed-off-by: volpino <fox91@anche.no>
2012-11-02 20:15:51 +01:00

27 lines
628 B
Python

from djeuscan.feeds import BaseFeed
from euscan_accounts.helpers import get_profile, get_account_versionlogs
class UserFeed(BaseFeed):
link = "/"
def description(self, data):
return "%s - last euscan changes" % data["user"]
def title(self, data):
return "%s - watched packages" % data["user"]
def get_object(self, request):
return {
"user": request.user,
"options": request.GET,
}
def _items(self, data):
user = data["user"]
profile = get_profile(user)
vlogs = get_account_versionlogs(profile)
return vlogs, 100