I went through the Django tutorial with in mind to go through it again using it to set up my small app.
So now I am making a simple app where users can search a large set of strings and get a subset as a result. The only relevant search criteria is the first and last character of the string.
So the table is static, meaning I'll fully populate it before app deployment and it will be read only, since the data set doesn't change ever.
A record will consist of a field containing the actual string, a field containing the first character and a field containing the last character, a field containing a json representation of the record (I believe postgres has funcitons to generate that for me) and some fields containing metadata concerning the string. The index will be a composite of the first and last character of the string.
In any case, I research and do as I go, so I need guidance as to the correct approach (as this is use case will be very common for me).
I can either research creating this exact table in postgres an then use a django facility to generate the model from the table (https://docs.djangoproject.com/en/dev/ref/django-admin/#inspectdb).
Or I can research how to get Django to create this exact table and write the model accordingly and have Django create the table for me. Bear in mind that I will in either case need to hit the table directly to pre-populate it (or so I believe, please let me know if there is a Django way to do that?).
I would think the former more natural but the docs seem to imply that it's for 'legacy' databases.
What do you recommend as the appropriate approach to start from scratch with.