As I understand it, if you do not supply a route_name then the view
callable is a fallback:

"If route_name is not supplied, the view callable will only have a chance
of being invoked if no other route was matched. This is when the
request/context pair found via *resource
location*<http://docs.pylonsproject.org/projects/pyramid/en/latest/glossary.html#term-resource-location>
does
not indicate it matched any configured route. "

http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/viewconfig.html#predicate-arguments


In your case, you have two view callable without route_names, so they
conflict with each other. If you use, for example:

@view_config(permission='edit', route_name='view_2')

then you should be fine I think.

On 20 February 2012 09:44, wshaman <rakoth.andr...@gmail.com> wrote:

> Hello!
> I got some weird(for me at least) error in this case:
> http://pastebin.com/hDuhavdJ
> #this is a simplified code from my project
> error message:
> http://pastebin.com/z2fNEx3V
> p.s.: I've started from alchemy+dispatch tutorial, and got afar from it.
> Also if I have only one function decorated with
> @view_config(permission='edit')
> there is no such error thrown.
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/pylons-discuss/-/YPhG6iAvkXwJ.
> To post to this group, send email to pylons-discuss@googlegroups.com.
> To unsubscribe from this group, send email to
> pylons-discuss+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to