Skip to content

Allow Select2 dropdown for ForeignKeys in the reversed Model #281

@ghost

Description

Let's say you have the following model structure, modified from the README example:

class Street(models.Model):
    street_name = models.CharField(max_length=255)

class Address(models.Model):
    street = models.ForeignKey(Street)

class Person(models.Model):
    name = models.CharField(max_length=255)
    home_addr = models.OneToOneField(Address, related_name='home_addr')

If the amount of "Street" objects you have is too large, a Select2 dropdown is preferred, and currently there's no way of having them. Adding the fields to autocomplete_fields does nothing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions