Class for models, class name book, model for django framework, includes variables: name, author, short description, genre and language. Class for models, class name language, model for django framework, includes language variable. Variable with type many to many. Also includes a function that returns a string in string format.
class MyBook(models.Model): name = models.CharField(max_length=100) author = models.CharField(max_length=100) short_description = models.TextField() genre = models.CharField(max_length=100) language = models.ManyToManyField(Language) def __str__(self): return self.name_text class Language(models.Model): language = models.CharField(max_length=100) def __str__(self): return self.language_text