Hi everyone, I'm trying to get a particular formset, but i'm stuck on it.
In my database, I have some information stored around external data, represented by this kind of model : LiveInfo(models.Model): external_id = models.IntegerField() live_url = models.URLField() description = models.TextField() (I receive data from an external API, and I store the above information around it, external_id refers to the external element) Not all external elements have local information associated, depending of the needs for a "live" or not. What I need to do is, from a list of external ids, to construct a set of forms representing the data I may have around them. For exemple, from the external ids [12, 20, 48, 50, 55, 58, ], I need to construct a set of forms for each element, filled with the local LiveInfo data if present, empty forms for the others. The problem is that I need them in the exact order that I receive the ids. This means that my formset will alternate empty and filled forms. On global save, of course, I update the already present LiveInfo, and create new ones for the others. But I can't find any way to do this properly with formsets. Maybe it's simply not possible, and I have to construct my own set of individual forms, an manage my own global validation. I don't know if I'm clear enough, hope so. Any idea please ? :D -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.