Hi!

I a routing system that looks like this:

# a view that renders a group of objects:

@expose('/doska/', defaults={'group_name' : None})
@expose('/doska/', defaults={'group_name' : 'stuff'})
@expose('/auto/doska/<string(minlength=2):mark>/',
defaults={'group_name' : 'auto'})
@expose('/auto/doska/<string(minlength=2):mark>/<string:model>/',
defaults={'group_name': 'auto'})
def group_show(request, group_name, parent_url=None, mark=None,
model=None...)
    ...

*parent_url allows me to put the view to another url "folder": /doska/
mitsubishi/pajero/ -> /auto/doska/mitsubishi/pajero/

The problem is that I need to have sitemap.xml (or sitemap0.xml,
sitemap1.xml etc.) inside /auto/doska/, but when I try to get it i get
404. The view for that looks like this:

@expose('/doska/sitemap<int:n>.xml')
@expose('/<string:sitemap_group>/doska/sitemap<int:n>.xml')
def show_sitemap(request, sitemap_group='stuff', n=0): ...

QUESTION:
I understand that it is about routing and werkzeug thinks that
sitemap0.xml is a mark param in /auto/, but how can I say to werkzeug
that it if rule matches show_sitemap's rule ('/<string:sitemap_group>/
doska/sitemap<int:n>.xml') there is no need to match group_show's
rules.

Is there a priority in url-patterns

I would be very much obliged to you if you help me to solve the
problem one way or another.

-- 
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" 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/pocoo-libs?hl=en.

Reply via email to