On 5/6/07, gsmith <[EMAIL PROTECTED]> wrote: > > I have a table called Stories that contains two fields 'Title' and > 'Body'. We'll I want the page to be accessed by a SlugField. I have > added a SlugField to my table. However, I want it so that whenever I > enter a title for a story in my admin then the SlugField gets auto- > populated with the contents of the title. > > So if I enter a title of 'The weather has been severe'. Then the want > the SlugField to be populated with something like 'weather-severe'. I > think I'm going to have to implement some type of JavaScript file to > accomplish this.
Django can already do this for you. See the SlugField documentation: http://www.djangoproject.com/documentation/model-api/#slugfield Jay P. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

