django_reverse_admin
django_reverse_admin copied to clipboard
Is it possible to display the standard select dropdown for foreign key
I am working on a ticketing system.
` class Customer(models.Model): name = models.CharField() address email, etc
class Ticket(): customer = models.ForeignKey(Customer)
`
In django admin, i would like to have both the possibilities to either select an existing customer or to enter new customer data along with ticket data. How can i achieve this ?
Thank you
I think you will be better off using just a regular inline. Please see screenshot here - https://github.com/daniyalzade/django_reverse_admin/raw/master/images/admin_without_reverse_inline.png
Regular inline would allow you to select existing customer, or create a new customer in a separate pop up and select that customer. Does that not work?
What can be done today is to delete the associated object and recreate a new one, but not select an existing one.
I believe this could become a future feature. But today it is not possible to do so.
I miss this feature too. When an existing object is already referenced, I like having all the FK fields editable in the change view. When adding a new one, I'd like a dropdown (or a select2) to select an existing FK record.
Am I right in saying that right now you can't use the admin to create a new record that points to existing FK records, while using the reverse inlines?