Closed jwjacobson closed 8 months ago
So I just stuck
ballad = Tag(name='ballad')
ballad.save()
in my models.py and it now shows up and can be added but of course it's going to make a new ballad tag every time the app reloads
You don't want to have this in models.py because indeed it will run everytime the app starts.
I did not spec this out sufficiently I think: https://github.com/jwjacobson/jazz_repertoire/issues/174
What I showed there is merely the matching of existing tags, but there should also be logic to save the selected tags which will then create + retrieve them and map them to the tune via its M2M relation.
I am happy to work a bit more on this tomorrow as it has various moving pieces and seems htmx does not support it ...
There doesn't seem to be a way to enter tags either via the app or the admin app. Do I have to instantiate some tag objects beforehand? Where would that happen?