当用户单击开始按钮user_id_Temp_Responses表时,我想在Django中创建一个名为user_id的动态临时表。以下是我使用的代码
class Temp_Responses(models.Model):
question_id=models.ForeignKey('question_bank',on_delete=models.CASCADE)
user_id=models.ForeignKey(User,on_delete=models.CASCADE)
question_use_case=models.CharField(max_length=3000)
img_url=models.CharField(max_length=200)
section= models.CharField(max_length=100)
option1= models.CharField(max_length=100)
option2= models.CharField(max_length=100)
option3= models.CharField(max_length=100)
option4= models.CharField(max_length=100)
option5= models.CharField(max_length=100)
answer_given_usecase= models.CharField(max_length=100)
code_written_by_user= models.CharField(max_length=3000)
response_time= models.TimeField(max_length=100)
countown_time= models.FloatField()