I'm running two django application in same server. Server setup and multi settings file are created.
But I have DJANGO_SETTINGS_MODULE env variable as dynamic and I need to set two different values.
If I change DJANGO_SETTINGS_MODULE variable name to something else, i'm getting error.
Can anyone suggest some solution for this problem.
我正在django中创建测验应用,我的django模型中的问题是这样的,
class Question(models.Model):
questions = models.CharField(max_length=50, unique=True)
choice1 = models.CharField(max_length=50, unique=True)
choice2 = models.CharField(max_length=50, unique=True)
choice3 = models.CharField(max_length=50, unique=True)
choice4 = models.CharField(max_length=50, unique=True)
correct_answer = models.CharField(max_length=50, unique=True)
Run Code Online (Sandbox Code Playgroud)
很好还是将这四个选项保存在postgres数组中,或者将选择保存在单独的表中。