come celebrate the independence of Ameristralia
", + "cost": "Free" } }, @@ -276,6 +307,16 @@ ] } }, +{ + "pk": 6, + "model": "auth.group", + "fields": { + "name": "Admin non-editors", + "permissions": [ + ["access_admin", "wagtailadmin", "admin"] + ] + } +}, { "pk": 1, "model": "wagtailcore.grouppagepermission", @@ -411,6 +452,24 @@ "email": "siteeditor@example.com" } }, +{ + "pk": 6, + "model": "auth.user", + "fields": { + "username": "admin_only_user", + "first_name": "", + "last_name": "", + "is_active": true, + "is_superuser": false, + "is_staff": false, + "groups": [ + ["Admin non-editors"] + ], + "user_permissions": [], + "password": "md5$seasalt$1e9bf2bf5606aa5c39852cc30f0f6f22", + "email": "admin_only_user@example.com" + } +}, { "pk": 1, @@ -429,5 +488,23 @@ "page": 8, "submit_time": "2014-01-01T12:00:00.000Z" } +}, +{ + "pk": 1, + "model": "wagtaildocs.Document", + "fields": { + "title": "test document", + "created_at": "2014-01-01T12:00:00.000Z" + } +}, +{ + "pk": 1, + "model": "wagtailimages.Image", + "fields": { + "title": "test image", + "created_at": "2014-01-01T12:00:00.000Z", + "width": 0, + "height": 0 + } } ] diff --git a/wagtail/tests/models.py b/wagtail/tests/models.py index ca6d411da..ff6dc2dcc 100644 --- a/wagtail/tests/models.py +++ b/wagtail/tests/models.py @@ -1,6 +1,9 @@ from django.db import models from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger +from django.utils.encoding import python_2_unicode_compatible + from modelcluster.fields import ParentalKey + from wagtail.wagtailcore.models import Page, Orderable from wagtail.wagtailcore.fields import RichTextField from wagtail.wagtailadmin.edit_handlers import FieldPanel, MultiFieldPanel, InlinePanel, PageChooserPanel @@ -259,6 +262,7 @@ FormPage.content_panels = [ # Snippets +@python_2_unicode_compatible class Advert(models.Model): url = models.URLField(null=True, blank=True) text = models.CharField(max_length=255) @@ -268,7 +272,7 @@ class Advert(models.Model): FieldPanel('text'), ] - def __unicode__(self): + def __str__(self): return self.text @@ -281,18 +285,20 @@ register_snippet(Advert) # to ensure specific [in]correct register ordering # AlphaSnippet is registered during TestSnippetOrdering +@python_2_unicode_compatible class AlphaSnippet(models.Model): text = models.CharField(max_length=255) - def __unicode__(self): + def __str__(self): return self.text # ZuluSnippet is registered during TestSnippetOrdering +@python_2_unicode_compatible class ZuluSnippet(models.Model): text = models.CharField(max_length=255) - def __unicode__(self): + def __str__(self): return self.text diff --git a/wagtail/tests/templates/tests/event_page.html b/wagtail/tests/templates/tests/event_page.html index b60bc6058..795b7bf0a 100644 --- a/wagtail/tests/templates/tests/event_page.html +++ b/wagtail/tests/templates/tests/event_page.html @@ -1,4 +1,5 @@ -{% load pageurl %} +{% load wagtailcore_tags %} + diff --git a/wagtail/tests/templates/tests/form_page.html b/wagtail/tests/templates/tests/form_page.html index 5fbd2ae9f..d908c60a2 100644 --- a/wagtail/tests/templates/tests/form_page.html +++ b/wagtail/tests/templates/tests/form_page.html @@ -1,4 +1,5 @@ -{% load pageurl %} +{% load wagtailcore_tags %} + diff --git a/wagtail/tests/templates/tests/form_page_landing.html b/wagtail/tests/templates/tests/form_page_landing.html index e29a6a942..d9a6369d4 100644 --- a/wagtail/tests/templates/tests/form_page_landing.html +++ b/wagtail/tests/templates/tests/form_page_landing.html @@ -1,4 +1,5 @@ -{% load pageurl %} +{% load wagtailcore_tags %} + diff --git a/wagtail/tests/templates/tests/includes/event_listing.html b/wagtail/tests/templates/tests/includes/event_listing.html index 31c0b1b3b..02f880ec4 100644 --- a/wagtail/tests/templates/tests/includes/event_listing.html +++ b/wagtail/tests/templates/tests/includes/event_listing.html @@ -1,4 +1,4 @@ -{% load pageurl %} +{% load wagtailcore_tags %}{{ field.help_text }}
- {% endif %} - - {% if field.errors %} - - {% endif %} -{{ field.help_text }}
+ {% endif %} + + {% if field.errors %} + + {% endif %} +{{ field.help_text }}
- {% endif %} - - {% if field.errors %} - - {% endif %} -