Do you know this:
unique_together = ("name", "date")
Is there something similar for required fields?
I have 2 fields: ipv4 and ipv6. There are different wireless networks on the map, we call them βislandsβ because they are not physically connected, but through a VPN tunnel.
Some islands use ipv4, and they implement ipv6, while others only use ipv6. If I installed ipv4 to the required one, it would be problematic for those that are only ipv6, and if I install ipv6 to the required ones, then basically ipv4 will have problems.
There are two things that I could do: set both fields as not required or set them in such a way that at least one of them is filled.
The first solution is easy, but not very pleasant, and the second is pleasant, but I do not know if this is possible without hacking django.
The application is open source.
Source: https://github.com/ninuxorg/nodeshot/
Demo: http://map.ninux.org
nemesisdesign
source share