On Feb 10, 10:31 am, harryos <oswald.ha...@gmail.com> wrote: > I was trying out forms and created a class and its form
(snip code) > When the template is rendered it shows the helptext which I provided > in the model's slugfield.But unlike in the django admin 's edit > page ,the slug is not auto generated when I type in a new name for the > category. Indeed. This is an Admin feature - as you may have noticed, it's defined in the ModelAdmin class, not in the Model or ModelForm. > Similarly I tried an add category page.Here also the slug is not auto > generated,even though the helptext says that it will be. Yes, would be cool if we only had to document a feature in the helptext to have it automagically working. But I'm afraid this will require a bit more work. > I have enabled > javascript for my browser.Do I have to write a javascript for each of > these pages or can I use some script the admin uses? There are ways to reuse the Admin's js scripts, indeed - sorry, I don't have a link at hand but google is your friend (here at least). But bear in mind that relying on javascript for anything else than cosmetic is a sure road to failure, specially when it comes to forms. IOW, first make sure you'll have a correct slug _without_ javascript. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.