Answer the question
In order to leave comments, you need to log in
How to register a field for loading a document in models?
There is a model
class New(models.Model):
class Meta():
db_table = 'news'
news_title = models.CharField(max_length=200, verbose_name='Заголовок:')
news_text = RichTextUploadingField(verbose_name='Текстовое поле:')
news_date = models.DateField(verbose_name='Дата:')
Answer the question
In order to leave comments, you need to log in
class Meta():
written at the end of the class db_table = 'news'
beginners should not use this at all
class Topic(models.Model):
title = models.CharField(max_length=200, verbose_name='Заголовок:')
text = RichTextUploadingField(verbose_name='Текстовое поле:')
created = models.DateField(verbose_name='Дата:')
upload = models.FileField(upload_to='uploads/')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question