On 14 Mar 2013, at 1:21 PM, Kevin Bethke <[email protected]> wrote:
> when I visit the funktion showArticle?id=1 , I want the URL to say 
> www.mydomain.de/showArticle/TitletextofdbArticlewithid1
> table article
> Fields{id,title,content}

That's up to you when you call URL().

Suppose you're now asking for URL('showArticle', vars={'id':article_id}). 
You'll need to change that to URL('showArticle', 
args=[slugForArticleID(article_id)])

You can use IS_SLUG() for the title-to-slug conversion (note that you'll need 
to check that you don't have collisions) and keep the slug as well as the title 
in the article table, so you can convert both ways.

> 
> On Thu, Mar 14, 2013 at 8:42 PM, Jonathan Lundell <[email protected]> wrote:
> On 14 Mar 2013, at 12:32 PM, Kevin Bethke <[email protected]> wrote:
>> #!/usr/bin/python
>> # -*- coding: utf-8 -*-
>> 
>> 
>> routers = dict(
>>   BASE  = dict(
>>       domains = {
>>           'mydomain.de' : 'App1',
>>           'www.mydomain.de' : 'App1',
>>           'ip' : 'App2',
>>           'ip/Test' : 'TestEnv',
>>           'ip/MA' : 'dbmigratetest',
>>       }
>>   ),
>> )
>> logging = 'debug'
>> def __routes_doctest():
>> ...
>> I just noticed I never set the default controler. I only did that in my old 
>> routes.example based file. but it still has the effect: the controler is 
>> removed from the URL 
>> 
>> 
> 
> So, what's happening now that's different from what you want?
> 
> 


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to