8000 Moved placeholders from Page to Title model by Aiky30 · Pull Request #6442 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

Moved placeholders from Page to Title model #6442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Jul 12, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8000
Prev Previous commit
Next Next commit
Move th eplaceholder field from the page to the title model
  • Loading branch information
Andrew Aikman authored and czpython committed Jul 11, 2018
commit 18b8870301232b656682c385f832033274c220d0
3 changes: 0 additions & 3 deletions cms/models/pagemodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,6 @@ class Page(models.Model):
application_urls = models.CharField(_('application'), max_length=200, blank=True, null=True, db_index=True)
application_namespace = models.CharField(_('application instance name'), max_length=200, blank=True, null=True)

# Placeholders (plugins)
placeholders = models.ManyToManyField('cms.Placeholder', editable=False)

# Publisher fields
publisher_is_draft = models.BooleanField(default=True, editable=False, db_index=True)
# This is misnamed - the one-to-one relation is populated on both ends
Expand Down
3 changes: 2 additions & 1 deletion cms/models/titlemodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class Title(models.Model):
redirect = models.CharField(_("redirect"), max_length=2048, blank=True, null=True)
page = models.ForeignKey(Page, on_delete=models.CASCADE, verbose_name=_("page"), related_name="title_set")
creation_date = models.DateTimeField(_("creation date"), editable=False, default=timezone.now)

# Placeholders (plugins)
placeholders = models.ManyToManyField('cms.Placeholder', editable=False)
# Publisher fields
published = models.BooleanField(_("is published"), blank=True, default=False)
publisher_is_draft = models.BooleanField(default=True, editable=False, db_index=True)
Expand Down
0