Hey thats it.  Is there a way to user url_for to get the proper path?
Thats how I got the original broken path...

Thanks!
jw


On Dec 28, 8:26 pm, Wyatt Baldwin <[email protected]> wrote:
> On Dec 28, 4:12 pm, "programmer.py" <[email protected]> wrote:
>
>
>
> > Hi everyone.  I'm sure I'm overlooking something very simple, but I
> > can't get the `format` parameter to work correctly.
>
> > Can anyone verify that this is / is not working?
>
> > Here is how I create the problem (or what I think is the problem):
>
> > 1.  Create a simple pylons (0.9.7rc4).
>
> > 2.  Add user restful controller:
> >     paster restcontroller  user users
>
> > 3.  Add map.resource to config/routing.py:
> >     # CUSTOM ROUTES HERE
> >     map.resource('user', 'users')
>
> > 4.  Modify user controller
>
> >     def index(self, format='html'):
> >         """GET /users: All items in the collection."""
> >         # url('users')
> >         return 'Format -> %s' % format
>
> > 5.  Fetch the resource.
>
> >http://127.0.0.1:5000/users?format=json
>
> > After fetching the resource, I expected to see the string 'json', but
> > instead I see HTML.  Ideas?
>
> Tryhttp://127.0.0.1:5000/users.json. Passing format as a query param
> means you'd need to access it via `request.params`.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to