I want to manage a dictionary inline over the admin interface. These are my models. What I got working is of course a separated management of request and dictionary. But I want to add key value pairs in the request admin interface with a TabularInline. Do I have to skip the dictionary in some way or what do I have to do?
class Dictionary(models.Model):
name = models.CharField(max_length=255)
class KeyValuePair(models.Model):
container = models.ForeignKey(Dictionary, db_index=True)
key = models.CharField(max_length=240, db_index=True)
value = models.CharField(max_length=240, db_index=True)
class Request(models.Model):
params = models.ForeignKey(Dictionary, related_name="params_map", blank=True, null=True)