-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Fil 190: Adding Generic Foreign Key to Placeholder model #6452
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
Fil 190: Adding Generic Foreign Key to Placeholder model #6452
Conversation
@@ -0,0 +1,27 @@ | |||
# -*- coding: utf-8 -*- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use 0023 instead of 22 and move the others (>=0023) one number up
cms/models/placeholdermodel.py
Outdated
@@ -38,6 +40,10 @@ class Placeholder(models.Model): | |||
cache_placeholder = True | |||
is_static = False | |||
is_editable = True | |||
content_type = models.ForeignKey(ContentType, blank=True, null=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put each arg on its own line
@anirbanlahiri-fidelity Make sure to rebase this with latest release/4.0.x branch |
@@ -8,7 +8,8 @@ | |||
class Migration(migrations.Migration): | |||
|
|||
dependencies = [ | |||
('cms', '0024_title_placeholders_data_migration'), | |||
('cms', '0023_auto_20180719_1638'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove 0023 from here
cms/models/placeholdermodel.py
Outdated
@@ -35,6 +37,12 @@ class Placeholder(models.Model): | |||
""" | |||
slot = models.CharField(_("slot"), max_length=255, db_index=True, editable=False) | |||
default_width = models.PositiveSmallIntegerField(_("width"), null=True, editable=False) | |||
content_type = models.ForeignKey(ContentType, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
content_type = models.ForeignKey(
ContentType,
blank=True,
null=True,
on_delete=models.SET_NULL,
)
|
||
dependencies = [ | ||
('contenttypes', '0002_remove_content_type_name'), | ||
('cms', '0021_auto_20180507_1432'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should depend on 0022
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('cms', '0022_auto_20180620_1551'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contenttypes should be added as dependency here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Krzysztof asked me to remove it and have a purely linear dependency flow. I will put it back in if you say.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only talked about cms migrations depending on each other in linear fashion. This migration uses contenttypes, so it also needed to be in the dependency list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I misunderstood you then, since 0010_migrate_use_structure.py had a dependency on contenttypes.
No description provided.