I don't know if that is possible, maybe I have to come up with a particular design but I am struggling with the following:
These are my models
class Rectangle(models.Model):
height = models.CharField(max_length=255)
width = models.CharField(max_length=255)
class Variable(models.Model):
name = models.CharField(max_length=255)
value = models.CharField(max_length=255)
I would like the width and the height to be either a value, or a variable that has the value. For instance, if the user nputs a height that starts with a special character, say "@variablename" it should be able to find and reference the variable, otherwise just save the value if the input was "350" for instance.
Can anyone help me? Thanks in advance