Answer the question
In order to leave comments, you need to log in
How to fix Did not find any relation named "General_education_system_category_education" error?
#models
class General_education_system(models.Model):
image = models.ImageField(upload_to='photo/')
name = models.CharField(max_length=100)
address = models.CharField(max_length=100)
date_of_foundation = models.DateTimeField(auto_now_add=True, )
filial = models.CharField(max_length=100, verbose_name='Филиал университета', blank=True)
category=models.ForeignKey('Category_education',on_delete=models.CASCADE)
history_of_university=models.TextField()
def __str__(self):
return self.name
class Category_education(models.Model):
name=models.CharField(max_length=100,verbose_name='Общеобразовательная система')
def get_absolute_url(self):
return reverse('category', kwargs={'category_id'})
def __str__(self):
return self.name
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