Thanks Ben, and Mike, for your replies.  I like the idea of using
routes, mainly because its more familiar and middleware is a bit of a
black box to me still.
I think at this point i'll set up a test and see if i can get it
working then come back here if I have any problems.  You've given me
enough to go on, which is great.

Thanks guys.

Michael

On Aug 17, 2:27 am, Ben Bangert <[email protected]> wrote:
> On Aug 15, 2009, at 4:08 PM, mickgardner wrote:
>
> > I was about to start a new project, and a feature i want to implement
> > has me scratching my head on how to do it.
>
> > I'd like to implement the ability of website users to write content,
> > and then define, using form fields (not config/routes.py) the url
> > location of that content.
>
> > In Drupal (php cms) there is a feature like this that i'd like to
> > somewhat replicate, if not in a simple way.
>
> > Does anyone have any pointers as to whether this is a routes /
> > middleware solution or perhaps a combination of the two?
>
> Pretty easy, figure out what part of the URL they should be able to  
> customize, or if its the rest of the URL, and have a route like this:
>
> map.connect('/usercontent/{url:.*}', controller='contentcontroller',  
> action='content')
>
> Then your content method should use the URL, look it up in the db, and  
> see if it should be a 404 or something else.
>
> Cheers,
> Ben
--~--~---------~--~----~------------~-------~--~----~
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