If it’s not easy to delay a little, it will hinder the user experience. Second, when the data changes, it’s refreshed and displayed directly on the page. The default template of modelform is not enough. Itemselections = models.ManyToManyField(InspectionType)ĬargoThe corresponding is select (signal), which directly uses the default template of modelform When the cargo selection changes due to the requirements of inspection record, the front-end automatically updates the choices menu of itemselections (when create | update post, the back-end also needs to verify the matching between the uploaded cargo and itemselections, but this is not the focus of this article)Ĭargo = models.ForeignKey(Cargo, on_delete=models.CASCADE).Name = models.CharField(max_length=16, default=NOT_PROVIDED)Īvailableinspections = models.ManyToManyField(InspectionType) Models.py has two model classes: cargo and inspectiontype.How to implement jsondata autoupdating multi select dropdown with semantic UI in Django projectīased on version: pyton 3.6, Django 2.0, semantic 2.2 demandīecause individuals are more inclined to semantic UI, and there are more knowledge points involved, including Django’s template, template tag, the style in semantic UI, and part of jQuery, so write it down for beginners to refer to how to combine semantic UI with Django
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |