One more way would be to have a javascript function which changes
<input type="text" /> to <input type="hidden" /> for the slug field.
Something like this:
window.onload = function() {
document.getElementById("id_slug").type="hidden";
}
Good luck!
Aidas Bendoraitis [aka Archatas]
On 7/27/06, Sean <[EMAIL PROTECTED]> wrote:
>
> Maybe you would want the "editable=False" parameter in your model, which
> hides the field from the admin. Then simply populate the field in the
> save method.
>
> Tamara D. Snyder wrote:
> > Hi all,
> >
> > In my "Event" model I have a slug field that is automatically
> > generated from another field. I would like to hide the slug field
> > from admin users, but still allow it to be automatically generated.
> > I know I can hide it by using the "fields" parameter in the admin
> > class of my model. But if I do this then the slug field is not
> > automatically generated when I create a new event. Is there a way to
> > hide the slug field, but still have it be filled in when I create a
> > new event?
> >
> > Thanks!
> >
> > Tamara
> >
> > >
> >
> >
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---