Hi djangonauts,
I've just upgraded from Django0.90 to Django0.91 my production server
(running a django app on a LAN). Everything works well except the
representation of fields with raw_id_admin=True when using admin
interface. My application strongly relies on automatically generated
admin interface so even small changes from admin to new-admin are
relevant. And this one is not so small to me.

Let me describe the problem with an example taken from the usual Poll
and Choice.

Assume my model is made of a class Choice that refers to Poll and
Author. Assume the Choice.poll's ForeignKey is editable inline and
Choice.author's ForeignKey has raw_id_admin=True:

class Poll(meta.Model):
    question = ...
    pub_date = ...
class Author(meta.Model):
    name = ...
    def __str(self)__: return name
class Choice(meta.Model):
    poll = meta.ForeignKey(Poll, edit_inline=meta....)
    choice = ...
    author = meta.ForeignKey(Author, raw_id_admin=True)

The 'detail' admin interface of a Poll object will show one entry of
Choice that has the author field represented by a text entry where
users can insert authors'IDs. After inserting an ID and saving the
form, if you go back to the detail page you'll see the ID value
previously inserted, BUT:
- in Django0.90 there will be a piece of text showing the __str()__
representation on that Author just over that ID
- in Django0.91 that string disappears, so the user cannot know if the
author's ID he inserted was correct. The same happens in SVN version.

Now my users ask me to go back to the situation of Django0.90, where
they could see that piece of text explains the meaning of the ID. I
don't want to go back to 0.90, but instead I prefer to hack Django a
bit and use 0.91 (or svnversion). I'm currently studying Django code,
but if you can help me and give suggestions for a solution I will
appreciate it very much.

Thanks in advance,

Emanuele

P.S.: changing author field and removing raw_id_admin=True is not a
good solution in my case.

Reply via email to