Hello!,
I want to use *regular expressions* on my site to simplify and not have to 
add if it is with* '/' *example: *'/blog/'* or without* '/' *example: *
'/blog'*

> urls = (
>     '/', 'toindex',
>     '/publicaciones/(.*)', 'index', 

    '/publicaciones', 'toindex', 

 

    '/publicacion/(\d+)', 'view',
>     *'/publicacion/', 'toindex',
> **    '/publicacion', 'toindex',* 

 

    '/borrar/(\d+)', 'delete',
>     '/editar/(\d+)', 'edit',
>     '/descomentar/(\d+)', 'descomentar', 


>    * '/login', 'login',
> **    '/login/','login', *

 

    '/logout', 'logout',


>     '/nuevo', 'new',
>     '/nuevo/', 'new', 


>     *'/categorias', 'categories',
> **    '/categorias/','categories', *

 

    '/categoria/(\d+)', 'category',
>     *'/categoria/', 'categories',
> **    '/categoria', 'categories', *

 

    '/nueva/categoria', 'nueva_categoria',
>     '/editar/categoria/(\d+)', 'editar_categoria',
>     '/borrar/categoria/(\d+)', 'borrar_categoria', 


>     *'/buscar', 'search',
> **    '/buscar/','search', *


>     '/favicon.ico', 'favicon'
> )


Thanks!
 

<http://upload.wikimedia.org/wikipedia/commons/f/fb/718smiley.svg>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to