thanks massimo, i will change the fieldname of text.
how can i test now this?



On 13 Jun., 17:39, mdipierro <[email protected]> wrote:
> def make_rss():
>     news = db(db.news.id>0).select()
>     d=dict(title='title',link=URL
> (r=request),description='description',
>                entries = [dict(title=r.betreff, description=r.text,
> link='no link') for r in news])
>     from gluon.serializers import rss
>     return rss(d)
>
> Mind that I am assuming betreff is the table.
> There is no page for individual news.
> 'text' is not a valid field name in SQL. Soon or later it will break
> something.
>
> Massimo
>
> On Jun 13, 10:03 am, pk <[email protected]> wrote:
>
> > #########################################################################
> > ## Tabelle News
> > #########################################################################
> > db.define_table('news',
> >                 SQLField('userid', default=auth.user.id if auth.user
> > else 0, writable=False, readable=False),
> >                 SQLField('uservorname', default=auth.user.first_name
> > if auth.user else 0, writable=False, readable=False),
> >                 SQLField('usernachname', default=auth.user.last_name
> > if auth.user else 0, writable=False, readable=False),
> >                 SQLField('cdate', 'datetime', default=now),
> >                 SQLField('betreff'),
> >                 SQLField('text', 'text'))
>
> > db.news.userid.requires=IS_IN_DB(db,'auth_user.id')
> > db.news.usernachname.requires=IS_IN_DB(db,'auth_user.last_name')
> > db.news.uservorname.requires=IS_IN_DB(db,'auth_user.first_name')
> > db.news.cdate.requires=IS_NOT_EMPTY()
> > db.news.betreff.requires=IS_NOT_EMPTY()
> > db.news.text.requires=IS_NOT_EMPTY()
>
> > thanks
>
> > On 13 Jun., 16:55, mdipierro <[email protected]> wrote:
>
> > > please post your model and I will send an example.
>
> > > Massimo
>
> > > On Jun 13, 9:52 am, pk <[email protected]> wrote:
>
> > > > hi together,
>
> > > > i can`t create a rss. i tried it with my table news. news has the rows
> > > > user, timestamp, header and text
> > > > and is a function calls: def news: in my controller menu.
> > > > how can i solve my problem for an easy way?
>
> > > > thanks for your help.
> > > > peter
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to