Cassie Meharry
Cassie Meharry

Reputation: 2683

Access User object when generating a feed in Django

I'm working on a website that keeps track of upcoming homework assignments. I'd like to provide an RSS/Atom Feed that shows their upcoming assignments. However, I have no idea how I'm going to limit the items in the feed to their own, as not many feed readers support cookie-based sessions.

Basically, I need to access the request object inside the feed class and accept HTTP basic/digest auth. Is this even possible?

I'm using Django 1.1, Python 2.5.4, and mod_python 3.3.1

Upvotes: 0

Views: 164

Answers (1)

Dave W. Smith
Dave W. Smith

Reputation: 24966

The approach that's compatible with the widest range of feed readers is to encode the user ID (or user name) in the feed URL. That's "security by obscurity", which is way less than ideal, but for people using, say, Google Reader, it may be the best you can do.

Upvotes: 2

Related Questions