If you don't specify an extension, the URL() function assumes the extension 
of the current request (unless it is .html). If you don't want an 
extension, you can specify URL(..., extension=False). See the end of this 
section: http://web2py.com/books/default/chapter/29/04#URL.

Anthony

On Saturday, March 30, 2013 11:36:44 PM UTC-4, Sebastian Ortiz Vasquez 
wrote:
>
> Hi, I was following the book 
> http://web2py.com/books/default/chapter/29/03#A-simple-wiki in order to 
> build a rss feed for http://hackbo.co/hackboweb/default/eventos_veniderosbut 
> i found 2 big problems.
>
> 1. If the title or description of the event contains non ascii characters 
> web2py is unable to process it. About this problem i already posted an 
> issue #1420 on the web2py google code site, i passed this doing a 
> encoding('ascii',errors='ignore') on those fields.
>
> 2. As follows on the example of the book, each item of the feed contain a 
> link to the site, this is the line on the example
>
> def news():
>     """generates rss feed form the wiki pages"""
>     response.generic_patterns = ['.rss']
>     pages = db().select(db.page.ALL, orderby=db.page.title)
>     return dict(
>        title = 'mywiki rss feed',
>        link = 'http://127.0.0.1:8000/mywiki/default/index',
>        description = 'mywiki news',
>        created_on = request.now,
>        items = [
>           dict(title = row.title,
> *               link = URL('show', args=row.id),*
>                description = MARKMIN(row.body).xml(),
>                created_on = row.created_on
>                ) for row in pages])
>
>
> In my code, this is exactly the same but changes the action from 'show' to 
> 'evento', as you can see on http://hackbo.co/hackboweb/default/evento/230but 
> the link that is generated contains the .rss extension added magicaly, 
> so the link that is exported to the rss feed is something like 
> http://hackbo.co/hackboweb/default/evento.rss/230 and it doesn't work 
> because that action is not using the .rss generic_pattern.
>

-- 

--- 
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/groups/opt_out.


Reply via email to