I have this model:
class Journals(models.Model):
jid = models.AutoField(primary_key=True)
code = models.CharField("Code", max_length=50)
name = models.CharField("Name", max_length=2000)
publisher = models.CharField("Publisher", max_length=2000)
price_euro = models.CharField("Euro", max_length=2000)
price_dollars = models.CharField("Dollars", max_length=2000)
Is there a way to let people fill out either price_euro
or price_dollars
?
I do know that the best way to solve the problem is to have only one field and another table that specify the currency, but I have constraints and I cannot modify the DB.
Thanks!