Django form with ManyToMany field with 500,000 objects times out

前端 未结 4 2207
走了就别回头了
走了就别回头了 2021-02-13 05:03

Lets say for example I have a Model called \"Client\" and a model called \"PhoneNumbers\"

class PhoneNumbers(models.Model):
    number = forms.IntegerField()

cl         


        
4条回答
  •  无人及你
    2021-02-13 05:39

    We use this 3rd party widget for this:

    https://github.com/crucialfelix/django-ajax-selects

    Btw, your 'example' above is really bad DB design for a bunch of reasons. You should just have the phone number as a text field on the Client model and then you would have none of these issues. ;-)

提交回复
热议问题