On Sun, Mar 15, 2009 at 2:31 PM, Dougal Matthews <[email protected]> wrote:

> Hi,
> I've used a similar approach once - works fine. Although, you might want to
> sacrifice such a short url for something that is easier to read/understand
> that 'u' and 'g'.
>
> Cheers,
> Dougal
>
> ---
> Dougal Matthews - @d0ugal
> http://www.dougalmatthews.com/
>
>
>
>
> 2009/3/15 ldm999 <[email protected]>
>
>
>> I'm using Django Auth and would like to include username in my urls.
>> So, eg, I might have urls like the following:
>>
>> - mysite.com/tom/books/moby-dick
>> - mysite.com/dick/books/moby-dick
>> - mysite.com/harry/books/catch-22
>>
>> To further complicate things, I'd like to support groups too. So that
>> first url param could be a group name (eg seattle-reading-club)
>>
>> So now I'm thinking of using a letter to designate if the url is for a
>> user or a group. Something like:
>>
>> - mysite.com/u/tom/books/moby-dick
>> - mysite.com/g/seattle-reading-group/moby-dick
>>
>> Anyone else done something like this? Any problems with this approach?
>>
>>
>
> >
>
Most people structure their URLs that way since Django makes it nice to have
these pretty urls.  That being said I'd probably write out the full
user/group just because it makes the urls a little more self explanitory and
it's not like it exposes some internal of your app.

Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to