10000 Fil 190: Adding Generic Foreign Key to Placeholder model by anirbanlahiri-fidelity · Pull Request #6452 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 15 commits into from
Jul 25, 2018

Conversation

anirbanlahiri-fidelity
Copy link
Contributor

No description provided.

@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
Copy link
Contributor

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

@@ -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,
Copy link
Contributor

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

@czpython
Copy link
Contributor

@anirbanlahiri-fidelity Make sure to rebase this with latest release/4.0.x branch

@czpython czpython self-assigned this Jul 23, 2018
@czpython czpython added this to the 4.0.0 milestone Jul 23, 2018
@coveralls
Copy link
coveralls commented Jul 24, 2018

Coverage Status

Coverage remained the same at 78.189% when pulling 99ffbac on FidelityInternational:fil-190 into 9905ca6 on divio:release/4.0.x.

@@ -8,7 +8,8 @@
class Migration(migrations.Migration):

dependencies = [
('cms', '0024_title_placeholders_data_migration'),
('cms', '0023_auto_20180719_1638'),
Copy link
Contributor

Choose a reason for hiding this comment

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

remove 0023 from here

@@ -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,
Copy link
Contributor

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'),
Copy link
Contributor

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'),
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@czpython czpython merged commit 0aedfbb into django-cms:release/4.0.x Jul 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0