My web2py app will offer RSS feeds for many organizations. How will
consumers subscribe to the right one; is the following correct?
Create table:
db.define_table('rss_entry',
Field('organization_fk', 'integer'),
Field('title'),
Field('link'),
Field('created_on', 'datetime'),
Field('description'))
Then, in controller:
def feed():
from gluon.serializers import rss
response.view = 'generic.rss'
correct_org_rows = db(db.rss_entry.organization_fk ==
whatever_organization_ID_user_selected_in_previous_function).select(title,
link, blah, blah, blah)
return
dict(title=db.Organization(correct_org_rowsorganization.fk).name,
link=db.Organization(correct_org_rowsorganization.fk).link,
description=db.Organization(correct_org_rowsorganization.fk).rss_description,
entries=[dict(title=correct_org_rows.title, link=correct_org_rowslink,
description=correct_org_rows.description")])
going in right general direction?
thanks,
Alex Glaros
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.