Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

[46] Adjust Custom Fields #47

Merged
merged 1 commit into from
Feb 12, 2014
Merged

[46] Adjust Custom Fields #47

merged 1 commit into from
Feb 12, 2014

Conversation

daaray
Copy link
Contributor

@daaray daaray commented Feb 11, 2014

Fixes #46

Due to the way Mezzanine incorporates custom fields via the settings file, the migration for this PR requires special attention:

To run the migrations, in project.settings.base.EXTRA_MODEL_FIELDS, you'll need to temporarily include the removed fields:

    (
        "mezzanine.pages.models.Page.closing",
        "TextField",  # 'django.db.models.' is implied if path is omitted.
        ("Closing Paragraph",),
        {"default": '', "blank": True},
    ),
     (
        "mezzanine.pages.models.Page.subtitle",
        "CharField",  # 'django.db.models.' is implied if path is omitted.
        ("Subtitle",),
        {"max_length": 128, "default": '', "blank": True},
    )

Then execute:

python manage.py migrate sandstone

Once that is complete, remove the temp fields from project.settings.base.EXTRA_MODEL_FIELDS.

We likely should collapse the migrations at some point after these are run for fxoss, as the migration instructions for a new site or not straightforward either.

@mlavin
Copy link
Contributor

mlavin commented Feb 12, 2014

Migrations are a little awkward as noted but that can be fixed later. 🍔

daaray pushed a commit that referenced this pull request Feb 12, 2014
@daaray daaray merged commit 24d3074 into master Feb 12, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alter Custom Page Fields
2 participants