Skip to content

Автоматическая установка обложек проектов#151

Merged
VeryBigSad merged 9 commits into
devfrom
feature/auto-project-covers
Sep 7, 2023
Merged

Автоматическая установка обложек проектов#151
VeryBigSad merged 9 commits into
devfrom
feature/auto-project-covers

Conversation

@VeryBigSad
Copy link
Copy Markdown
Contributor

Автоматическая установка обложек проектов

Добавил модель дефолтной обложки, к которой будут обращаться проекты, у которых таковых обложек нет.
Перед миграцией с добавлением этого поля у проектов нужно будет сделать миграцию с самой этой моделькой и добавить пару таких файликов, иначе не получится, т.к. blank=false, null=false

@VeryBigSad VeryBigSad requested a review from yakser June 27, 2023 11:50
Comment thread procollab/settings.py Outdated

AUTOPOSTING_ON = config("AUTOPOSTING_ON", default=False, cast=bool)

TESTING = len(sys.argv) > 1 and sys.argv[1] == "test"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Для чего оно нужно?

Comment thread projects/models.py
draft = models.BooleanField(blank=False, default=True)

cover = models.ForeignKey(
UserFile,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не лучше сделать ForeignKey на модель обложки?

Copy link
Copy Markdown
Member

@yakser yakser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool

@VeryBigSad VeryBigSad changed the base branch from master to dev September 7, 2023 07:21
@VeryBigSad VeryBigSad merged commit 4e78a64 into dev Sep 7, 2023
@yakser yakser deleted the feature/auto-project-covers branch September 8, 2023 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants