L
L
Lone_Wanderer2020-02-11 18:26:47
Django
Lone_Wanderer, 2020-02-11 18:26:47

How to display a complex data model in django?

I have a model:

class librarys(models.Model):
    language = models.ForeignKey(languages, on_delete = models.CASCADE, verbose_name='Язык')
class directorys(models.Model):
    language = models.ForeignKey(languages, on_delete = models.CASCADE, verbose_name='Язык')
    description = models.CharField('описание', max_length=1000, db_index=True)
class file_directory(models.Model):
    directory = models.ForeignKey(directorys, on_delete = models.CASCADE, verbose_name='Католог')
    description = models.CharField('описание', max_length=1000, db_index=True)

How can I display it in a django template?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2020-02-11
@Lone_Wanderer

Look here and here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question