Answer the question
In order to leave comments, you need to log in
The git diff command writes krakozyabry instead of Cyrillic. How to fix?
Hello. Here is a screenshot.
How to fix it?
Answer the question
In order to leave comments, you need to log in
Finally I solved this problem! I want to share my solution with you. Here it is:
https://stackoverflow.com/questions/41139067/git-l...
There are two options
CHCP номер_кодировки
(probably you need 65001)The main problem with your option is that the number of drugs in the course is limited - what if you need 100 or 1000 of them? Will the table have the same number of columns? This is solved by three tables. Here's the pseudocode:
# Это курс - он связан с моделью юзера
class Course(models.Model):
days = models.IntegerField()
start_date = models.DateField()
user = models.ForeignKey(User)
# Это лекарство - оно само по себе
class Med(models.Model):
med = models.ChoiceField()
time = models.ChoiceField()
med_amount = models.CharField()
med_type = models.ChoiceField()
descr = models.TextField()
video = modesl.URLField()
week = models.ChoiceField()
# Это связывает курс с лекарством (и позволяет присваивать их неограниченное число раз)
class CourseMed(models.Model):
course = models.ForeignKey(Course)
med = models.ForeignKey(Med)
It is better to read about the third normal form and not ask such questions anymore.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question