well, that could be done via javascript. :)

http://localhost:8000/admin/testapp/testmodel/2/ - means i'm updating
http://localhost:8000/admin/testapp/testmodel/add/ - means i'm adding

if (document.location.href.indexOf("/add/") != -1) {

}

On Apr 18, 2:50 pm, Sithembewena Lloyd Dube <zebr...@gmail.com> wrote:
> @Mengu, yes, precisely :)
>
>
>
>
>
>
>
>
>
> On Mon, Apr 18, 2011 at 1:20 PM, Mengu <whalb...@gmail.com> wrote:
> > you mean like if a new object is being added or edited in the admin?
>
> > On Apr 18, 1:58 pm, Sithembewena Lloyd Dube <zebr...@gmail.com> wrote:
> > > Hi all,
>
> > > I wish to find out how I can detect current form mode in admin.py. What I
> > am
> > > trying to do is to stop users changing a dropdown's selection when in
> > edit
> > > mode.
>
> > > Any ideas?
>
> > > Thanks.
>
> > > --
> > > Regards,
> > > Sithembewena Lloyd Dube
>
> > --
> > 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
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> --
> Regards,
> Sithembewena Lloyd Dube

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to