How do I store version number strings in a django database so they are correctly comparable/sortable
I'm developing/maintaining/curating a database of test results gathered from various wearable research devices. Each device has three main components, each of which has two version numbers (firmware and hardware). I'm using a django app to provide a web interface to the database. The version numbers represented either as straight integers, or as triplets (Major, minor, build). The integers are easy enough to handle, and I can obviously store the triplets as strings, but as strings they won't sort correctly or compare correctly, for example if I want only test results produced by devices with