Answer the question
In order to leave comments, you need to log in
Pass array through environment variables?
Let's say there is a certain model in django with a field of this type:
class SomeModel(models.Model):
...
some_field = models.CharField(max_length=4, choices=some_choices)
...
some_choices = os.getenv('SOME_CHOICES', some_default_choices)
SOME_CHOICES_KEY1=
SOME_CHOICES_VALUE1=
SOME_CHOICES_KEY2=
SOME_CHOICES_VALUE2=
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question