One reason is because I believe string allows to store bigger amounts of data, since IDs wouldn't be counted in base 10. E.g. YouTube videos which are identified by random generated strings. Another reason is because I want to keep things a bit more transparent to the users. Instead of having a url like www.example.com/projects/3/, I'd have something like www.example.com/projects/iuyf876ertg/ I don't really want the user to know that his project is number 3...
On Mar 31, 8:11 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 31-Mar-08, at 2:30 PM, Julien wrote: > > > I just thought I'd try to make it clearer what I'm after. Instead of > > having numbers as ID for my objects, I'd like to have random strings > > (e.g. "sadfwetbtyvt32452" or "fd70982876adhfd"...). Those strings have > > to be unique across the table. > > Is that easily achievable? Am I on the right track with the code > > above? > > why? what do you hope to achieve by doing this? > > -- > > regards > kghttp://lawgon.livejournal.comhttp://nrcfosshelpline.in/code/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---