-
Notifications
You must be signed in to change notification settings - Fork 544
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
Add Generic and Site settings models. Fix #395 #419
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,4 @@ | ||
[ | ||
{ | ||
"model": "base.person", | ||
"pk": 1, | ||
"fields": { | ||
"latest_revision": null, | ||
"live": true, | ||
"has_unpublished_changes": false, | ||
"first_published_at": null, | ||
"last_published_at": null, | ||
"live_revision": null, | ||
"go_live_at": null, | ||
"expire_at": null, | ||
"expired": false, | ||
"locked": false, | ||
"locked_at": null, | ||
"locked_by": null, | ||
"first_name": "Roberta", | ||
"last_name": "Johnson", | ||
"job_title": "Editorial Manager", | ||
"image": 8 | ||
} | ||
}, | ||
{ | ||
"model": "base.person", | ||
"pk": 2, | ||
"fields": { | ||
"latest_revision": null, | ||
"live": true, | ||
"has_unpublished_changes": false, | ||
"first_published_at": null, | ||
"last_published_at": null, | ||
"live_revision": null, | ||
"go_live_at": null, | ||
"expire_at": null, | ||
"expired": false, | ||
"locked": false, | ||
"locked_at": null, | ||
"locked_by": null, | ||
"first_name": "Olivia", | ||
"last_name": "Ava", | ||
"job_title": "Director", | ||
"image": 52 | ||
} | ||
}, | ||
{ | ||
"model": "base.person", | ||
"pk": 3, | ||
"fields": { | ||
"latest_revision": null, | ||
"live": true, | ||
"has_unpublished_changes": false, | ||
"first_published_at": null, | ||
"last_published_at": null, | ||
"live_revision": null, | ||
"go_live_at": null, | ||
"expire_at": null, | ||
"expired": false, | ||
"locked": false, | ||
"locked_at": null, | ||
"locked_by": null, | ||
"first_name": "Lightnin'", | ||
"last_name": "Hopkins", | ||
"job_title": "Designer", | ||
"image": 53 | ||
} | ||
}, | ||
{ | ||
"model": "base.person", | ||
"pk": 4, | ||
"fields": { | ||
"latest_revision": null, | ||
"live": true, | ||
"has_unpublished_changes": false, | ||
"first_published_at": null, | ||
"last_published_at": null, | ||
"live_revision": null, | ||
"go_live_at": null, | ||
"expire_at": null, | ||
"expired": false, | ||
"locked": false, | ||
"locked_at": null, | ||
"locked_by": null, | ||
"first_name": "Muddy", | ||
"last_name": "Waters", | ||
"job_title": "Assistant Editor", | ||
"image": 51 | ||
} | ||
}, | ||
{ | ||
"model": "base.footertext", | ||
"pk": 1, | ||
|
@@ -180,6 +92,15 @@ | |
"page": 69 | ||
} | ||
}, | ||
{ | ||
"model": "base.genericsettings", | ||
"pk": 1, | ||
"fields": { | ||
"twitter_url": "https://twitter.com/wagtailcms", | ||
"github_url": "https://github.com/wagtail/wagtail", | ||
"organisation_url": "https://wagtail.org/" | ||
} | ||
}, | ||
{ | ||
"model": "blog.blogpersonrelationship", | ||
"pk": 2, | ||
|
@@ -1278,21 +1199,6 @@ | |
"person": 4 | ||
} | ||
}, | ||
{ | ||
"model": "wagtailforms.formsubmission", | ||
"pk": 1, | ||
"fields": { | ||
"form_data": { | ||
"purpose": "Feedback", | ||
"subject": "What's up?", | ||
"body": "Love what you guys are doing with the site so far.", | ||
"your_name": "Scot Hacker", | ||
"your_email": "[email protected]" | ||
}, | ||
"page": 69, | ||
"submit_time": "2019-02-15T16:56:48.939Z" | ||
} | ||
}, | ||
{ | ||
"model": "wagtailembeds.embed", | ||
"pk": 1, | ||
|
@@ -1379,6 +1285,21 @@ | |
"hits": 1 | ||
} | ||
}, | ||
{ | ||
"model": "wagtailforms.formsubmission", | ||
"pk": 1, | ||
"fields": { | ||
"form_data": { | ||
"purpose": "Feedback", | ||
"subject": "What's up?", | ||
"body": "Love what you guys are doing with the site so far.", | ||
"your_name": "Scot Hacker", | ||
"your_email": "[email protected]" | ||
}, | ||
"page": 69, | ||
"submit_time": "2019-02-15T16:56:48.939Z" | ||
} | ||
}, | ||
{ | ||
"model": "wagtailcore.locale", | ||
"pk": 1, | ||
|
@@ -1444,6 +1365,13 @@ | |
"workflow": 1 | ||
} | ||
}, | ||
{ | ||
"model": "wagtailcore.workflowcontenttype", | ||
"pk": 4, | ||
"fields": { | ||
"workflow": 1 | ||
} | ||
}, | ||
{ | ||
"model": "wagtailcore.workflowtask", | ||
"pk": 1, | ||
|
@@ -3587,6 +3515,22 @@ | |
"file_hash": "" | ||
} | ||
}, | ||
{ | ||
"model": "wagtailusers.userprofile", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure why this was added, doesn't seem to break anything but can't figure out how I managed to add it in either. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems that for some reason we didn’t have a Wagtail user profile instance in the fixtures until now. Perhaps this gets created only when accessed the first time – which we now do on every page as part of determining which theme to show the UI in. |
||
"pk": 1, | ||
"fields": { | ||
"user": ["admin"], | ||
"submitted_notifications": true, | ||
"approved_notifications": true, | ||
"rejected_notifications": true, | ||
"updated_comments_notifications": true, | ||
"preferred_language": "", | ||
"current_time_zone": "", | ||
"avatar": "", | ||
"dismissibles": {}, | ||
"theme": "system" | ||
} | ||
}, | ||
{ | ||
"model": "recipes.recipeindexpage", | ||
"pk": 80, | ||
|
@@ -3918,6 +3862,14 @@ | |
"date_published": "2019-02-24" | ||
} | ||
}, | ||
{ | ||
"model": "base.sitesettings", | ||
"pk": 1, | ||
"fields": { | ||
"site": ["127.0.0.1", 8000], | ||
"title_suffix": "The Wagtail Bakery" | ||
} | ||
}, | ||
{ | ||
"model": "base.formpage", | ||
"pk": 69, | ||
|
@@ -3968,5 +3920,93 @@ | |
"image": 41, | ||
"body": "[{\"type\": \"paragraph_block\", \"value\": \"<h2>Welcome to the Wagtail Demo Site!</h2><p>If you've gotten this far, congratulations - you're running an instance of a killer content management system written for and on top of Django, <i>the framework for perfectionists with deadlines.</i></p><p>What does Wagtail get you that Django alone does not?\\u00a0</p><p></p><ul><li>Focus on content creators/managers, rather than developers (but developer-friendly!)</li><li>\\\"Page-centric\\\" content modeling</li><li>Beautiful, modern, intuitive user interface optimized for content people</li><li>Super-powerful hierarchical content management (\\\"content trees\\\")</li><li>User- and group-based permissions system attached to content hierarchies</li><li>Flexible image resizing with a ton of image display helpers</li><li>Innovative \\\"<a href=\\\"https://torchbox.com/blog/rich-text-fields-and-faster-horses/\\\">StreamFields</a>\\\" as an alternative to traditional \\\"anything goes\\\" rich text fields</li><li>Intuitive choosers for embedded Pages, Images, Documents and other content</li><li>Native integration with ElasticSearch to help you build powerful search features</li><li>Template tags to help create image renditions, smart links, and to navigate content trees</li></ul><p>If you're new to Wagtail, there are two primary paths to learning:</p><p></p><ul><li>The source code that powers this demo site</li><li>The official <a href=\\\"https://docs.wagtail.org/en/stable/getting_started/index.html\\\">tutorial</a></li></ul><p></p><p></p>\", \"id\": \"c6629b9b-3e70-4e30-a00c-b1ab878c8df9\"}]" | ||
} | ||
}, | ||
{ | ||
"model": "base.person", | ||
"pk": 1, | ||
"fields": { | ||
"latest_revision": null, | ||
"live": true, | ||
"has_unpublished_changes": false, | ||
"first_published_at": null, | ||
"last_published_at": null, | ||
"live_revision": null, | ||
"go_live_at": null, | ||
"expire_at": null, | ||
"expired": false, | ||
"locked": false, | ||
"locked_at": null, | ||
"locked_by": null, | ||
"first_name": "Roberta", | ||
"last_name": "Johnson", | ||
"job_title": "Editorial Manager", | ||
"image": 8 | ||
} | ||
}, | ||
{ | ||
"model": "base.person", | ||
"pk": 2, | ||
"fields": { | ||
"latest_revision": null, | ||
"live": true, | ||
"has_unpublished_changes": false, | ||
"first_published_at": null, | ||
"last_published_at": null, | ||
"live_revision": null, | ||
"go_live_at": null, | ||
"expire_at": null, | ||
"expired": false, | ||
"locked": false, | ||
"locked_at": null, | ||
"locked_by": null, | ||
"first_name": "Olivia", | ||
"last_name": "Ava", | ||
"job_title": "Director", | ||
"image": 52 | ||
} | ||
}, | ||
{ | ||
"model": "base.person", | ||
"pk": 3, | ||
"fields": { | ||
"latest_revision": null, | ||
"live": true, | ||
"has_unpublished_changes": false, | ||
"first_published_at": null, | ||
"last_published_at": null, | ||
"live_revision": null, | ||
"go_live_at": null, | ||
"expire_at": null, | ||
"expired": false, | ||
"locked": false, | ||
"locked_at": null, | ||
"locked_by": null, | ||
"first_name": "Lightnin'", | ||
"last_name": "Hopkins", | ||
"job_title": "Designer", | ||
"image": 53 | ||
} | ||
}, | ||
{ | ||
"model": "base.person", | ||
"pk": 4, | ||
"fields": { | ||
"latest_revision": null, | ||
"live": true, | ||
"has_unpublished_changes": false, | ||
"first_published_at": null, | ||
"last_published_at": null, | ||
"live_revision": null, | ||
"go_live_at": null, | ||
"expire_at": null, | ||
"expired": false, | ||
"locked": false, | ||
"locked_at": null, | ||
"locked_by": null, | ||
"first_name": "Muddy", | ||
"last_name": "Waters", | ||
"job_title": "Assistant Editor", | ||
"image": 51 | ||
} | ||
} | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Generated by Django 4.2.2 on 2023-06-21 15:31 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("wagtailcore", "0083_workflowcontenttype"), | ||
("base", "0017_footertext_enforce_not_null"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="GenericSettings", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"twitter_url", | ||
models.URLField(blank=True, verbose_name="Twitter URL"), | ||
), | ||
("github_url", models.URLField(blank=True, verbose_name="GitHub URL")), | ||
( | ||
"organisation_url", | ||
models.URLField(blank=True, verbose_name="Organisation URL"), | ||
), | ||
], | ||
options={ | ||
"abstract": False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name="SiteSettings", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"title_suffix", | ||
models.CharField( | ||
default="The Wagtail Bakery", | ||
help_text="The suffix for the title meta tag e.g. ' | The Wagtail Bakery'", | ||
max_length=255, | ||
verbose_name="Title suffix", | ||
), | ||
), | ||
( | ||
"site", | ||
models.OneToOneField( | ||
editable=False, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="wagtailcore.site", | ||
), | ||
), | ||
], | ||
options={ | ||
"abstract": False, | ||
}, | ||
), | ||
] |
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.
From what I can tell this is a new model from a minor wagtail release that just hasn't been included until now