[Answer]-Django: using the URL request as the name of a model's field

1👍

Use getattr and setattr to access an attribute using a variable name.

In your case, it would be:

word = Word.objects.get(...)
setattr(word, fieldName, True)

Leave a comment