Answer the question
In order to leave comments, you need to log in
How to organize similar structure of models in Django?
Good day!
For study, it is necessary to implement a project on Django on a free topic, I chose a catalog of universities with information about specialties and passing scores.
At the moment I am working on the structure of information storage and have encountered some difficulties.
I originally intended to do this:
class University(models.Model): #модель университета
shortTitle = models.CharField(max_length=200)
fullTitle = models.TextField()
specialty = models.ForeignKey(Specialty) #объект специальности
class Specialty(models.Model): #модель учебной специальности
code = models.CharField(max_length=9)
title = models.CharField(max_length=200)
points = models.CharField(max_length=3) #Проходные баллы по специальности
Answer the question
In order to leave comments, you need to log in
SpecialtyScoreForUniversity:
university
specialty
score
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question