-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there,

running Pyramid 1.4.1 with the following two routes:

   config.add_route(
        'journal_entry_api',
        '/api/user/{username}/journal/{entryid}',
        factory=UserFactory,
        traverse='/{username}/dailyjournal/{entryid}')

   config.add_route(
        'journal_delete_entry_api',
        '/api/user/{username}/journal/{entryid}',
        factory=UserFactory,
        traverse='/{username}/dailyjournal/{entryid}')

The related views are defined as

    @view_config(route_name='journal_entry_api', renderer="json",
request_method="GET", permission=VIEW_DAILY_JOURNAL)
    def daily_journal_entry_api(self):.....

    @view_config(route_name='journal_delete_entry_api',
permission=MANAGE_DAILY_JOURNAL, request_method='DELETE', renderer='json')
    def api_delete_blog_entry(self):

Both views are called through the same URL - only the request method
GET vs. DELETE differs...in theory this is supposed to work.
But in real life a GET request to

 http://localhost:8080/api/user/my-id/journal/i2uz3i13zi123z1i

leads to a 404 error.

Changing the path configuration of the first route from


'/api/user/{username}/journal/{entryid}'

to let's say

'/api/user/{username}/journal2/{entryid}'

fixes the problem....there must be some problem in the route
configuration resolver for routes having the same path specs...
or am I missing something?

Andreas




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJRfj11AAoJEADcfz7u4AZjlZALvibw5NoNEA2GL3QSoHDIe6Kt
Fa7sKev2I8UDl4Fm0iv0oxIsYB6TgHIdP3LCAMxScEZCgeE8ZXZ4P709X2ZgGxP3
ld0uAlmfyKgWsKk//E1J/4i4LJ1vKY3pNuY9ngA8LDK7KyiUjwiHLlhG1y7z3bmJ
48rI22nbcdSedQau2+kvwAfVtTu2YncAHTQjN0OYVKYv4tEaLDAMkmWIWSJ4mrIX
kRwBdI9Mphg/GYVXRNe+ofLlk2lGZVkOgbinvzcACLGyBAd6iptuGIjqazuVMcEc
g+U3TnDDAxQfGTxhjTrf98eXGOAEGhhaUMA+E1c8DzXHpBmly4stG+gU/TPhlDiW
zJJEeeX2OoweQCON68luj5H3fTinrqNT03Q1IJbzXe3kT4qHpDsUacGj10Mpkfkt
nJNY/N33ZagRnRlUNRhxfj5XLMb0yaOV4ZkTxeQ8hxu4zcD1cEv5rtdBYwEGNe+7
zjmYpkcofMW8/6peN3iha5X/I6y/Zk8=
=KpVr
-----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


<<attachment: lists.vcf>>

Reply via email to