If you're using a ForeignKey for this field, you'll get this behavior by default in the Django admin.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/wSJXqEJkYzoJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Oh, yeah, sorry about that, it's an admin parameter that you must use, can't recall the exact name, but it's something like id only.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/gsOd9uZzCUgJ.
It's raw_id_fields! (see the docs for more detail : ) )
On your modeladmin, set that to a list including the name (as string) of your field, and you should have what you want.
Let me know if I misunderstood.
I might be off, but I believe that they want to get a list of objects from the database, a ForeignKey seems more appropriate here, or am I missing something?
(again) did you try using raw_id_fields?
Can you please tell me how to add the Buttom on admin form in django?
I want to add the button beside the field.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/WACTMw1ykxMJ.
Then there must be something I don't understand in what you need, could you describe a bit more?
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/7CrtkDOzAycJ.
So you would want to have a link to the url that was entered?
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Ov0QyqEbsCQJ.
I'm sorry, I really have a hard time understanding what you need, but you might want to try overriding the form template to add your button?
If so, try the change_form_template parameter.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/LVBJArH-RH8J.