In my case I've a string as a custom primary key and I'd like
to enter this string instead of a raw numeric ID (currently
not present). So if I specify "raw_id_admin=True" in my case
the admin interface becomes a bit inconsistent, avoiding me to
enter the primary key value because it's not numeric.
Is it possible to have a sort of "raw_pk_admin=True" option
to insert custom primary keys in admin interface (and not only
numeric stuff)?
Thanks in advance,
Emanuele
Wouldn't it be nice (useful?) if just after inserting the pk value (in
case of "raw_id_admin=True" I mean) we could see aside the __repr__()
of the corresponding record? Just as a double check. Using manual
insertion of pk values is a good alternative when dealing with big
drop-down lists, but it is not as easy as selecting from a list of
meaningful names...
Some sort of javascript (forgive me, I don't know javascript) should do
that.
Django automatic admin interface + models is going to become my
favorite web RAD tool :)
Emanuele
Yup... I noticed this bug, too. This was on my "list of small bugs that
I need to fix and submit patches for". :-)
Don't forget also... if the pop up selector is used to select the code,
it should update the __repr__ *and* the code displayed in the form.
Right now, it updates the selected, but does update the __repr__ until
the page is saved... It's quite confusing.
-jason
Thank you very much, this solves an important problem in my
application.
Emanuele