diff --git a/examples/wagtaildemo/LICENSE b/examples/wagtaildemo/LICENSE deleted file mode 100644 index 8c6aacc5..00000000 --- a/examples/wagtaildemo/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014 Torchbox Ltd and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. Neither the name of Torchbox nor the names of its contributors may be used - to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/examples/wagtaildemo/Procfile b/examples/wagtaildemo/Procfile deleted file mode 100644 index 9f804e6f..00000000 --- a/examples/wagtaildemo/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: uwsgi --http :$PORT --module wagtaildemo.heroku_wsgi --master --processes 2 --static-map /media/=/app/media/ --offload-threads 1 diff --git a/examples/wagtaildemo/README.md b/examples/wagtaildemo/README.md deleted file mode 100644 index 927a9898..00000000 --- a/examples/wagtaildemo/README.md +++ /dev/null @@ -1,56 +0,0 @@ -[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/torchbox/wagtaildemo) - -Wagtail demo project -======================= - -This is a demonstration project for [Wagtail CMS](http://wagtail.io). - -*We do __not__ recommend using this project to start your own site*. This project is only to provide some examples of implementing common features, it is not an exemplar of Django or Wagtail best practice. - -If you're reasonably new to Python/Django, we suggest you run this project on a Virtual Machine using Vagrant, which helps resolve common software dependency issues. However for more experienced developers, instructions to start this project without Vagrant follow below. - -Once you're familiar with the examples in this project and you want to start a real site, we strongly recommend running the ``wagtail start`` command in a fresh virtual environment, explained in the [Wagtail CMS Documentation](http://wagtail.readthedocs.org/en/latest/getting_started/). - -Setup with Vagrant ------------------- - -### Dependencies -* [VirtualBox](https://www.virtualbox.org/) -* [Vagrant 1.5+](http://www.vagrantup.com) - -### Installation -Run the following commands: - - git clone https://github.com/torchbox/wagtaildemo.git - cd wagtaildemo - vagrant up - vagrant ssh - (then, within the SSH session:) - ./manage.py runserver 0.0.0.0:8000 - -The demo site will now be accessible at [http://localhost:8000/](http://localhost:8000/) and the Wagtail admin interface at [http://localhost:8000/admin/](http://localhost:8000/admin/) . Log into the admin with the credentials ``admin / changeme``. - -Setup without Vagrant ------ -Don't want to set up a whole VM to try out Wagtail? No problem. - -### Dependencies -* [PostgreSQL](http://www.postgresql.org) -* [PIP](https://github.com/pypa/pip) - -### Installation - -With PostgreSQL running (and configured to allow you to connect as the 'postgres' user - if not, you'll need to adjust the `createdb` line and the database settings in wagtaildemo/settings/base.py accordingly), run the following commands: - - git clone https://github.com/torchbox/wagtaildemo.git - cd wagtaildemo - pip install -r requirements.txt - createdb -Upostgres wagtaildemo - ./manage.py migrate - ./manage.py load_initial_data - ./manage.py createsuperuser - ./manage.py runserver - -### SQLite support - -SQLite is supported as an alternative to PostgreSQL. Before running the `pip install -r requirements.txt` step above, delete the `psycopg2` line in requirements.txt; then, in wagtaildemo/settings/base.py, update the `DATABASES` setting to use `'django.db.backends.sqlite3'` and set `NAME` to be the full path of your database file, as you would with a regular Django project. diff --git a/examples/wagtaildemo/Vagrantfile b/examples/wagtaildemo/Vagrantfile deleted file mode 100644 index b0792ccb..00000000 --- a/examples/wagtaildemo/Vagrantfile +++ /dev/null @@ -1,85 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -# All Vagrant configuration is done below. The "2" in Vagrant.configure -# configures the configuration version (we support older styles for -# backwards compatibility). Please don't change it unless you know what -# you're doing. -Vagrant.configure(2) do |config| - # The most common configuration options are documented and commented below. - # For a complete reference, please see the online documentation at - # https://docs.vagrantup.com. - - # Every Vagrant development environment requires a box. You can search for - # boxes at https://atlas.hashicorp.com/search. - config.vm.box = "torchbox/wagtail" - config.vm.box_version = "~> 1.0" - - # Disable automatic box update checking. If you disable this, then - # boxes will only be checked for updates when the user runs - # `vagrant box outdated`. This is not recommended. - # config.vm.box_check_update = false - - # Create a forwarded port mapping which allows access to a specific port - # within the machine from a port on the host machine. In the example below, - # accessing "localhost:8000" will access port 8000 on the guest machine. - config.vm.network "forwarded_port", guest: 8000, host: 8000 - - # Create a private network, which allows host-only access to the machine - # using a specific IP. - # config.vm.network "private_network", ip: "192.168.33.10" - - # Create a public network, which generally matched to bridged network. - # Bridged networks make the machine appear as another physical device on - # your network. - # config.vm.network "public_network" - - # Share an additional folder to the guest VM. The first argument is - # the path on the host to the actual folder. The second argument is - # the path on the guest to mount the folder. And the optional third - # argument is a set of non-required options. - # config.vm.synced_folder "../data", "/vagrant_data" - - config.vm.synced_folder ".", "/home/vagrant/wagtaildemo" - - # Provider-specific configuration so you can fine-tune various - # backing providers for Vagrant. These expose provider-specific options. - # Example for VirtualBox: - # - # config.vm.provider "virtualbox" do |vb| - # # Display the VirtualBox GUI when booting the machine - # vb.gui = true - # - # # Customize the amount of memory on the VM: - # vb.memory = "1024" - # end - # - # View the documentation for the provider you are using for more - # information on available options. - - # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies - # such as FTP and Heroku are also available. See the documentation at - # https://docs.vagrantup.com/v2/push/atlas.html for more information. - # config.push.define "atlas" do |push| - # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME" - # end - - # Enable provisioning with a shell script. Additional provisioners such as - # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the - # documentation for more information about their specific syntax and use. - # config.vm.provision "shell", inline: <<-SHELL - # sudo apt-get update - # sudo apt-get install -y apache2 - # SHELL - config.vm.provision :shell, :path => "vagrant/provision.sh" - - # Enable agent forwarding over SSH connections. - config.ssh.forward_agent = true - - # If a 'Vagrantfile.local' file exists, import any configuration settings - # defined there into here. Vagrantfile.local is ignored in version control, - # so this can be used to add configuration specific to this computer. - if File.exist? "Vagrantfile.local" - instance_eval File.read("Vagrantfile.local"), "Vagrantfile.local" - end -end diff --git a/examples/wagtaildemo/Vagrantfile.local.example b/examples/wagtaildemo/Vagrantfile.local.example deleted file mode 100644 index 6366f9a1..00000000 --- a/examples/wagtaildemo/Vagrantfile.local.example +++ /dev/null @@ -1,19 +0,0 @@ -# Creating a Vagrantfile.local file allows you to extend the Vagrant configuration -# with options specific to this local machine. - - -# The default setup is geared towards trying out the demo site, and building your -# own Wagtail-powered sites based on it. If you wish to develop Wagtail itself, -# you'll want to have an editable copy of the Wagtail code on your host machine, -# and share this with the virtual machine to be used instead of the packaged -# copy of Wagtail. -# -# Clone https://github.com/torchbox/wagtail somewhere convenient, and replace -# "../wagtail" below with the correct path: - -config.vm.synced_folder "../wagtail", "/home/vagrant/wagtail" - - -# You'll also need to configure your Python environment within the VM to pick up this -# instance of Wagtail rather than the packaged one; usually this is done by running -# `./setup.py develop` within the checked-out Wagtail codebase. diff --git a/examples/wagtaildemo/app.json b/examples/wagtaildemo/app.json deleted file mode 100644 index e4ceb028..00000000 --- a/examples/wagtaildemo/app.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "Wagtaildemo", - "description": "Wagtaildemo", - "repository": "https://github.com/torchbox/wagtaildemo", - "logo": "http://wagtail.io/static/wagtailsite/images/navlogo2.png", - "keywords": ["wagtail", "django"], - "env": { - "DJANGO_SETTINGS_MODULE": "wagtaildemo.settings.heroku" - }, - "scripts": { - "postdeploy": "django-admin.py migrate && django-admin.py load_initial_data && echo 'from wagtail.wagtailimages.models import Rendition; Rendition.objects.all().delete()' | django-admin.py shell" - }, - "addons": [ - "heroku-postgresql:hobby-dev" - ] -} diff --git a/examples/wagtaildemo/bin/post_compile b/examples/wagtaildemo/bin/post_compile deleted file mode 100644 index 366847d7..00000000 --- a/examples/wagtaildemo/bin/post_compile +++ /dev/null @@ -1,8 +0,0 @@ -# Copy image files into media folder -mkdir -p media/original_images -cp demo/fixtures/images/* media/original_images/ - -# dj shortcut -if ! command -v dj; then - ln -s /app/.heroku/python/bin/django-admin /app/.heroku/python/bin/dj -fi diff --git a/examples/wagtaildemo/demo/__init__.py b/examples/wagtaildemo/demo/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/examples/wagtaildemo/demo/fixtures/demo.json b/examples/wagtaildemo/demo/fixtures/demo.json deleted file mode 100644 index 4fe0d79d..00000000 --- a/examples/wagtaildemo/demo/fixtures/demo.json +++ /dev/null @@ -1,1066 +0,0 @@ -[ -{ - "pk": 1, - "model": "wagtailcore.page", - "fields": { - "title": "Root", - "numchild": 1, - "show_in_menus": false, - "live": true, - "seo_title": "", - "depth": 1, - "search_description": "", - "content_type": [ - "wagtailcore", - "page" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "0001", - "url_path": "/", - "slug": "root" - } -}, -{ - "pk": 2, - "model": "wagtailcore.page", - "fields": { - "title": "Home page", - "numchild": 5, - "show_in_menus": true, - "live": true, - "seo_title": "", - "depth": 2, - "search_description": "", - "content_type": [ - "demo", - "homepage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "00010002", - "url_path": "/home-page/", - "slug": "home-page" - } -}, -{ - "pk": 4, - "model": "wagtailcore.page", - "fields": { - "title": "Events index", - "numchild": 2, - "show_in_menus": true, - "live": true, - "seo_title": "", - "depth": 3, - "search_description": "", - "content_type": [ - "demo", - "eventindexpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "000100020001", - "url_path": "/home-page/events-index/", - "slug": "events-index" - } -}, -{ - "pk": 5, - "model": "wagtailcore.page", - "fields": { - "title": "Blog index", - "numchild": 3, - "show_in_menus": true, - "live": true, - "seo_title": "", - "depth": 3, - "search_description": "", - "content_type": [ - "demo", - "blogindexpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "000100020002", - "url_path": "/home-page/blog-index/", - "slug": "blog-index" - } -}, -{ - "pk": 6, - "model": "wagtailcore.page", - "fields": { - "title": "Standard index", - "numchild": 4, - "show_in_menus": true, - "live": true, - "seo_title": "", - "depth": 3, - "search_description": "", - "content_type": [ - "demo", - "standardindexpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "000100020003", - "url_path": "/home-page/standard-index/", - "slug": "standard-index" - } -}, -{ - "pk": 8, - "model": "wagtailcore.page", - "fields": { - "title": "Event 1", - "numchild": 0, - "show_in_menus": false, - "live": true, - "seo_title": "", - "depth": 4, - "search_description": "At first glance, the wagtails appear to be divided into a yellow-bellied group and a white-bellied one", - "content_type": [ - "demo", - "eventpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "0001000200010001", - "url_path": "/home-page/events-index/event-1/", - "slug": "event-1" - } -}, -{ - "pk": 9, - "model": "wagtailcore.page", - "fields": { - "title": "Event 2", - "numchild": 0, - "show_in_menus": false, - "live": true, - "seo_title": "", - "depth": 4, - "search_description": "Three species are poly- or paraphyletic in the present taxonomical arrangement and either subspecies need to be reassigned and/or species split up. The Blue-headed Wagtail (AKA Yellow Wagtail and many other names), especially, has always been a taxonomical nightmare with over a dozen currently accepted subspecies and many more invalid ones. The two remaining \"monochrome\" species, Mekong and African Pied Wagtail may be closely related, or a most striking example of convergent evolution.", - "content_type": [ - "demo", - "eventpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "0001000200010002", - "url_path": "/home-page/events-index/event-2/", - "slug": "event-2" - } -}, -{ - "pk": 10, - "model": "wagtailcore.page", - "fields": { - "title": "Standard page 1", - "numchild": 0, - "show_in_menus": true, - "live": true, - "seo_title": "", - "depth": 4, - "search_description": "Wagtails are slender, often colourful, ground-feeding insectivores of open country in the Old World. They are ground nesters.", - "content_type": [ - "demo", - "standardpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "0001000200030001", - "url_path": "/home-page/standard-index/standard-page-1/", - "slug": "standard-page-1" - } -}, -{ - "pk": 12, - "model": "wagtailcore.page", - "fields": { - "title": "Contact page", - "numchild": 0, - "show_in_menus": true, - "live": true, - "seo_title": "", - "depth": 3, - "search_description": "The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean...", - "content_type": [ - "demo", - "contactpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "000100020005", - "url_path": "/home-page/contact-page/", - "slug": "contact-page" - } -}, -{ - "pk": 13, - "model": "wagtailcore.page", - "fields": { - "title": "James Joyce", - "numchild": 0, - "show_in_menus": true, - "live": true, - "seo_title": "", - "depth": 4, - "search_description": "The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa", - "content_type": [ - "demo", - "personpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "0001000200040001", - "url_path": "/home-page/people/james-joyce/", - "slug": "james-joyce" - } -}, -{ - "pk": 14, - "model": "wagtailcore.page", - "fields": { - "title": "David Mitchell", - "numchild": 0, - "show_in_menus": true, - "live": true, - "seo_title": "", - "depth": 4, - "search_description": "Recent studies have suggested instead that it is a signal of vigilance that may aid to deter potential predators.", - "content_type": [ - "demo", - "personpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "0001000200040002", - "url_path": "/home-page/people/david-mitchell/", - "slug": "david-mitchell" - } -}, -{ - "pk": 15, - "model": "wagtailcore.page", - "fields": { - "title": "Standard page 2", - "numchild": 0, - "show_in_menus": true, - "live": true, - "seo_title": "", - "depth": 4, - "search_description": "The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.", - "content_type": [ - "demo", - "standardpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "0001000200030002", - "url_path": "/home-page/standard-index/standard-page-2/", - "slug": "standard-page-2" - } -}, -{ - "pk": 16, - "model": "wagtailcore.page", - "fields": { - "title": "Blog post", - "numchild": 0, - "show_in_menus": false, - "live": true, - "seo_title": "", - "depth": 4, - "search_description": "The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.", - "content_type": [ - "demo", - "blogpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "0001000200020001", - "url_path": "/home-page/blog-index/blog-post/", - "slug": "blog-post" - } -}, -{ - "pk": 17, - "model": "wagtailcore.page", - "fields": { - "title": "Photo credits", - "numchild": 0, - "show_in_menus": false, - "live": true, - "seo_title": "", - "depth": 4, - "search_description": "", - "content_type": [ - "demo", - "standardpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "0001000200030007", - "url_path": "/home-page/standard-index/photo-credits/", - "slug": "photo-credits" - } -}, -{ - "pk": 18, - "model": "wagtailcore.page", - "fields": { - "title": "Blog post again", - "numchild": 0, - "show_in_menus": false, - "live": true, - "seo_title": "", - "depth": 4, - "search_description": "Wagtails are slender, often colourful, ground-feeding insectivores of open country in the Old World. They are ground nesters, laying up to six speckled eggs at a time. Among their most conspicuous behaviours is a near constant tail wagging, a trait that has given the birds their common name. In spite of the ubiquity of the behaviour and observations of it, the reasons for it are poorly understood. It has been suggested that it may flush up prey, or that it may signal submissiveness to other wagtails. Recent studies have suggested instead that it is a signal of vigilance that may aid to deter potential predators.", - "content_type": [ - "demo", - "blogpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "0001000200020002", - "url_path": "/home-page/blog-index/blog-post-again/", - "slug": "blog-post-again" - } -}, -{ - "pk": 19, - "model": "wagtailcore.page", - "fields": { - "title": "Another blog post", - "numchild": 0, - "show_in_menus": false, - "live": true, - "seo_title": "", - "depth": 4, - "search_description": "Three species are poly- or paraphyletic in the present taxonomical arrangement and either subspecies need to be reassigned and/or species split up. The Blue-headed Wagtail (AKA Yellow Wagtail and many other names), especially, has always been a taxonomical nightmare with over a dozen currently accepted subspecies and many more invalid ones. The two remaining \"monochrome\" species, Mekong and African Pied Wagtail may be closely related, or a most striking example of convergent evolution.", - "content_type": [ - "demo", - "blogpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "0001000200020003", - "url_path": "/home-page/blog-index/another-blog-post/", - "slug": "another-blog-post" - } -}, -{ - "pk": 20, - "model": "wagtailcore.page", - "fields": { - "title": "People", - "numchild": 2, - "show_in_menus": true, - "live": true, - "seo_title": "", - "depth": 3, - "search_description": "", - "content_type": [ - "demo", - "standardindexpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "000100020004", - "url_path": "/home-page/people/", - "slug": "people" - } -}, -{ - "pk": 21, - "model": "wagtailcore.page", - "fields": { - "title": "A deeper menu level", - "numchild": 2, - "show_in_menus": true, - "live": true, - "seo_title": "", - "depth": 4, - "search_description": "", - "content_type": [ - "demo", - "standardindexpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "0001000200030008", - "url_path": "/home-page/standard-index/a-deeper-menu-level/", - "slug": "a-deeper-menu-level" - } -}, -{ - "pk": 22, - "model": "wagtailcore.page", - "fields": { - "title": "A grandchild page", - "numchild": 0, - "show_in_menus": true, - "live": true, - "seo_title": "", - "depth": 5, - "search_description": "The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.", - "content_type": [ - "demo", - "standardpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "00010002000300080001", - "url_path": "/home-page/standard-index/a-deeper-menu-level/a-grandchild-page/", - "slug": "a-grandchild-page" - } -}, -{ - "pk": 23, - "model": "wagtailcore.page", - "fields": { - "title": "Another grandchild page", - "numchild": 0, - "show_in_menus": true, - "live": true, - "seo_title": "", - "depth": 5, - "search_description": "The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.", - "content_type": [ - "demo", - "standardpage" - ], - "has_unpublished_changes": false, - "owner": null, - "path": "00010002000300080002", - "url_path": "/home-page/standard-index/a-deeper-menu-level/another-grandchild-page/", - "slug": "another-grandchild-page" - } -}, -{ - "pk": 4, - "model": "wagtailimages.image", - "fields": { - "title": "Wagtail by Mark Harkin", - "created_at": "2014-02-06T10:14:47.173Z", - "height": 427, - "width": 640, - "file": "original_images/wagtail_by_markyharky.jpg", - "uploaded_by_user": null - } -}, -{ - "pk": 5, - "model": "wagtailimages.image", - "fields": { - "title": "James Joyce", - "created_at": "2014-02-06T10:37:10.518Z", - "height": 392, - "width": 500, - "file": "original_images/James_Joyce_in_1915.jpg", - "uploaded_by_user": null - } -}, -{ - "pk": 6, - "model": "wagtailimages.image", - "fields": { - "title": "David Mitchell", - "created_at": "2014-02-06T10:42:46.536Z", - "height": 282, - "width": 360, - "file": "original_images/David_Mitchell_by_Kubik.JPG", - "uploaded_by_user": null - } -}, -{ - "pk": 7, - "model": "wagtailimages.image", - "fields": { - "title": "Wagtail by Joe Buckingham", - "created_at": "2014-02-06T10:49:29.579Z", - "height": 397, - "width": 640, - "file": "original_images/wagtail_by_joe_buckingham.jpg", - "uploaded_by_user": null - } -}, -{ - "pk": 8, - "model": "wagtailimages.image", - "fields": { - "title": "Wagtail by fs-phil", - "created_at": "2014-02-06T10:54:29.963Z", - "height": 397, - "width": 640, - "file": "original_images/wagtail_by_fs-phil.jpg", - "uploaded_by_user": null - } -}, -{ - "pk": 9, - "model": "wagtailimages.image", - "fields": { - "title": "White wagtail by Koshy Koshy", - "created_at": "2014-02-06T10:57:05.536Z", - "height": 397, - "width": 640, - "file": "original_images/white_wagtail_by_Koshyk.jpg", - "uploaded_by_user": null - } -}, -{ - "pk": 10, - "model": "wagtailimages.image", - "fields": { - "title": "Pied wagtail by Marie Hale", - "created_at": "2014-02-06T11:05:12.370Z", - "height": 397, - "width": 640, - "file": "original_images/pied_wagtail_by_Marie_Hale.jpg", - "uploaded_by_user": null - } -}, -{ - "pk": 11, - "model": "wagtailimages.image", - "fields": { - "title": "Wagtail at Borovoye, Kazakhstan by Ken and Nyetta", - "created_at": "2014-02-06T11:08:09.355Z", - "height": 397, - "width": 640, - "file": "original_images/wagtail_at_Borovoye_Kazakhstan_by_Ken_and_Nyetta.jpg", - "uploaded_by_user": null - } -}, -{ - "pk": 12, - "model": "wagtailimages.image", - "fields": { - "title": "Wagtail Sproing by Jim Bendon", - "created_at": "2014-02-06T11:10:01.185Z", - "height": 397, - "width": 640, - "file": "original_images/wagtail_sproing_by_Jim_Bendon.jpg", - "uploaded_by_user": null - } -}, -{ - "pk": 13, - "model": "wagtailimages.image", - "fields": { - "title": "Hopalong wagtail by Ruth Flickr", - "created_at": "2014-02-06T11:15:32.454Z", - "height": 397, - "width": 640, - "file": "original_images/hopalong_wagtail_by_Ruth_Flickr.jpg", - "uploaded_by_user": null - } -}, -{ - "pk": 14, - "model": "wagtailimages.image", - "fields": { - "title": "Wagtail collects insects by Margrit", - "created_at": "2014-02-06T11:21:13.596Z", - "height": 397, - "width": 640, - "file": "original_images/wagtail_collects_insects_by_Maggi_94.jpg", - "uploaded_by_user": null - } -}, -{ - "pk": 15, - "model": "wagtailimages.image", - "fields": { - "title": "Grey wagtail by Lip Kee", - "created_at": "2014-02-06T11:23:36.409Z", - "height": 397, - "width": 640, - "file": "original_images/grey_wagtail_by_lip_kee.jpg", - "uploaded_by_user": null - } -}, -{ - "pk": 1, - "model": "demo.advert", - "fields": { - "url": "", - "text": "Photo credits", - "page": 17 - } -}, -{ - "pk": 2, - "model": "demo.advert", - "fields": { - "url": "", - "text": "Contact", - "page": 12 - } -}, -{ - "pk": 5, - "model": "demo.blogindexpage", - "fields": { - "intro": "

Three species are poly- or paraphyletic in the present taxonomical arrangement and either subspecies need to be reassigned and/or species split up. The Blue-headed Wagtail (AKA Yellow Wagtail and many other names), especially, has always been a taxonomical nightmare with over a dozen currently accepted subspecies and many more invalid ones. The two remaining \"monochrome\" species, Mekong and African Pied Wagtail may be closely related, or a most striking example of convergent evolution.

" - } -}, -{ - "pk": 1, - "model": "demo.blogindexpagerelatedlink", - "fields": { - "link_page": 4, - "title": "Events index", - "link_external": "", - "sort_order": 0, - "link_document": null, - "page": 5 - } -}, -{ - "pk": 16, - "model": "demo.blogpage", - "fields": { - "body": "[{\"type\": \"paragraph\", \"value\": \"

mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.

\"}, {\"type\": \"paragraph\", \"value\": \"

The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.

\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"

Also, there is another superspecies in sub-Saharan Africa

\", \"image\": 13, \"alignment\": \"left\"}}, {\"type\": \"paragraph\", \"value\": \"

mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.

\"}, {\"type\": \"paragraph\", \"value\": \"

The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.

\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"

The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia

\", \"image\": 15, \"alignment\": \"right\"}}, {\"type\": \"paragraph\", \"value\": \"

mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.

\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"

The remaining five species are highly variable morphologically

\", \"image\": 14, \"alignment\": \"full\"}}, {\"type\": \"paragraph\", \"value\": \"

mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.

\"}, {\"type\": \"pullquote\", \"value\": {\"quote\": \"There is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band\", \"attribution\": \"Wikipedia\"}}, {\"type\": \"paragraph\", \"value\": \"

mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.

\"}]", - "date": "2013-12-02", - "feed_image": 7 - } -}, -{ - "pk": 18, - "model": "demo.blogpage", - "fields": { - "body": "[{\"type\": \"paragraph\", \"value\": \"

mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.

\"}, {\"type\": \"paragraph\", \"value\": \"

The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.

\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"

Also, there is another superspecies in sub-Saharan Africa

\", \"image\": 13, \"alignment\": \"left\"}}, {\"type\": \"paragraph\", \"value\": \"

mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.

\"}, {\"type\": \"paragraph\", \"value\": \"

The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.

\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"

The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia

\", \"image\": 15, \"alignment\": \"right\"}}, {\"type\": \"paragraph\", \"value\": \"

mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.

\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"

The remaining five species are highly variable morphologically

\", \"image\": 14, \"alignment\": \"full\"}}, {\"type\": \"paragraph\", \"value\": \"

mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.

\"}, {\"type\": \"pullquote\", \"value\": {\"quote\": \"There is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band\", \"attribution\": \"Wikipedia\"}}, {\"type\": \"paragraph\", \"value\": \"

mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.

\"}]", - "date": "2014-01-10", - "feed_image": 15 - } -}, -{ - "pk": 19, - "model": "demo.blogpage", - "fields": { - "body": "[{\"type\": \"paragraph\", \"value\": \"

mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.

\"}, {\"type\": \"paragraph\", \"value\": \"

The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.

\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"

Also, there is another superspecies in sub-Saharan Africa

\", \"image\": 13, \"alignment\": \"left\"}}, {\"type\": \"paragraph\", \"value\": \"

mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.

\"}, {\"type\": \"paragraph\", \"value\": \"

The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.

\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"

The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia

\", \"image\": 15, \"alignment\": \"right\"}}, {\"type\": \"paragraph\", \"value\": \"

mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.

\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"

The remaining five species are highly variable morphologically

\", \"image\": 14, \"alignment\": \"full\"}}, {\"type\": \"paragraph\", \"value\": \"

mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.

\"}, {\"type\": \"pullquote\", \"value\": {\"quote\": \"There is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band\", \"attribution\": \"Wikipedia\"}}, {\"type\": \"paragraph\", \"value\": \"

mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.

\"}]", - "date": "2014-02-01", - "feed_image": 14 - } -}, -{ - "pk": 1, - "model": "demo.blogpagecarouselitem", - "fields": { - "link_page": null, - "embed_url": "", - "image": 9, - "link_external": "http://www.flickr.com/photos/kkoshy/", - "caption": "White wagtail by Koshy Koshy", - "sort_order": 0, - "link_document": null, - "page": 16 - } -}, -{ - "pk": 2, - "model": "demo.blogpagecarouselitem", - "fields": { - "link_page": null, - "embed_url": "", - "image": 7, - "link_external": "http://www.flickr.com/photos/jim_bendon_1957/", - "caption": "Wagtail by Jim Bendon", - "sort_order": 1, - "link_document": null, - "page": 16 - } -}, -{ - "pk": 4, - "model": "demo.blogpagetag", - "fields": { - "content_object": 19, - "tag": 5 - } -}, -{ - "pk": 5, - "model": "demo.blogpagetag", - "fields": { - "content_object": 16, - "tag": 4 - } -}, -{ - "pk": 6, - "model": "demo.blogpagetag", - "fields": { - "content_object": 16, - "tag": 5 - } -}, -{ - "pk": 7, - "model": "demo.blogpagetag", - "fields": { - "content_object": 18, - "tag": 4 - } -}, -{ - "pk": 12, - "model": "demo.contactpage", - "fields": { - "body": "

Wagtails are slender, often colourful, ground-feeding insectivores of open country in the Old World. They are ground nesters, laying up to six speckled eggs at a time. Among their most conspicuous behaviours is a near constant tail wagging, a trait that has given the birds their common name. In spite of the ubiquity of the behaviour and observations of it, the reasons for it are poorly understood. It has been suggested that it may flush up prey, or that it may signal submissiveness to other wagtails. Recent studies have suggested instead that it is a signal of vigilance that may aid to deter potential predators.

", - "city": "Birdland", - "post_code": "W1A 1AA", - "country": "Birdshire", - "telephone": "012345 123456", - "address_1": "21 Tweety Mansions", - "address_2": "3 Bird Lane", - "email": "foo@example.com", - "feed_image": 7 - } -}, -{ - "pk": 4, - "model": "demo.eventindexpage", - "fields": { - "intro": "

Three species are poly- or paraphyletic in the present taxonomical arrangement and either subspecies need to be reassigned and/or species split up. The Blue-headed Wagtail (AKA Yellow Wagtail and many other names), especially, has always been a taxonomical nightmare with over a dozen currently accepted subspecies and many more invalid ones. The two remaining \"monochrome\" species, Mekong and African Pied Wagtail may be closely related, or a most striking example of convergent evolution.

" - } -}, -{ - "pk": 8, - "model": "demo.eventpage", - "fields": { - "body": "

Wagtails are slender, often colourful, ground-feeding insectivores of open country in the Old World. They are ground nesters, laying up to six speckled eggs at a time. Among their most conspicuous behaviours is a near constant tail wagging, a trait that has given the birds their common name. In spite of the ubiquity of the behaviour and observations of it, the reasons for it are poorly understood. It has been suggested that it may flush up prey, or that it may signal submissiveness to other wagtails. Recent studies have suggested instead that it is a signal of vigilance that may aid to deter potential predators.

At first glance, the wagtails appear to be divided into a yellow-bellied group and a white-bellied one, or one where the upper head is black and another where it is usually gray, but may be olive, yellow, or other colours. However, these are not evolutionary lineages; change of belly colour and increase of melanin have occurred independently several times in the wagtails, and the colour patterns which actually indicate relationships are more subtle.

", - "feed_image": 8, - "date_from": "2018-02-28", - "time_from": "11:30:00", - "audience": "public", - "cost": "\u00a330 per person, \u00a310 concessions", - "location": "Royal Albert Hall", - "date_to": "2018-03-02", - "time_to": "19:00:00", - "signup_link": "http://www.eventbrite.com/" - } -}, -{ - "pk": 9, - "model": "demo.eventpage", - "fields": { - "body": "

Three species are poly- or paraphyletic in the present taxonomical arrangement and either subspecies need to be reassigned and/or species split up. The Blue-headed Wagtail (AKA Yellow Wagtail and many other names), especially, has always been a taxonomical nightmare with over a dozen currently accepted subspecies and many more invalid ones. The two remaining \"monochrome\" species, Mekong and African Pied Wagtail may be closely related, or a most striking example of convergent evolution

", - "feed_image": 10, - "date_from": "2018-04-26", - "time_from": null, - "audience": "private", - "cost": "\u00a350", - "location": "O2 Arena", - "date_to": null, - "time_to": null, - "signup_link": "" - } -}, -{ - "pk": 1, - "model": "demo.eventpagespeaker", - "fields": { - "last_name": "Joyce", - "first_name": "James", - "link_page": null, - "image": 5, - "link_external": "", - "sort_order": 0, - "link_document": null, - "page": 8 - } -}, -{ - "pk": 2, - "model": "demo.eventpagespeaker", - "fields": { - "last_name": "Mitchell", - "first_name": "David", - "link_page": null, - "image": 6, - "link_external": "", - "sort_order": 1, - "link_document": null, - "page": 8 - } -}, -{ - "pk": 2, - "model": "demo.homepage", - "fields": { - "body": "[{\"type\": \"intro\", \"value\": \"

Wagtails are slender, often colourful, ground-feeding insectivores of open country in the Old World.\\u00a0

\"}, {\"type\": \"paragraph\", \"value\": \"

They are ground nesters, laying up to six speckled eggs at a time. Among their most conspicuous behaviours is a near constant tail wagging, a trait that has given the birds their common name.\\u00a0

\"}, {\"type\": \"paragraph\", \"value\": \"

In spite of the ubiquity of the behaviour and observations of it, the reasons for it are poorly understood. It has been suggested that it may flush up prey, or that it may signal submissiveness to other wagtails. Recent studies have suggested instead that it is a signal of vigilance that may aid to deter potential predators.

\"}]" - } -}, -{ - "pk": 1, - "model": "demo.homepagecarouselitem", - "fields": { - "link_page": null, - "embed_url": "", - "image": 15, - "link_external": "http://www.flickr.com/photos/lipkee/", - "caption": "Grey wagtail by Lip Kee", - "sort_order": 0, - "link_document": null, - "page": 2 - } -}, -{ - "pk": 2, - "model": "demo.homepagecarouselitem", - "fields": { - "link_page": null, - "embed_url": "", - "image": 12, - "link_external": "http://www.flickr.com/photos/jim_bendon_1957/", - "caption": "Wagtail sproing by Jim Bendon", - "sort_order": 1, - "link_document": null, - "page": 2 - } -}, -{ - "pk": 3, - "model": "demo.homepagecarouselitem", - "fields": { - "link_page": null, - "embed_url": "", - "image": 11, - "link_external": "http://www.flickr.com/photos/kjfnjy/", - "caption": "Wagtail at Borovoye, Kazakhstan by Ken and Nyetta", - "sort_order": 2, - "link_document": null, - "page": 2 - } -}, -{ - "pk": 13, - "model": "demo.personpage", - "fields": { - "feed_image": 5, - "city": "Birdland", - "first_name": "James", - "post_code": "W1A 1AA", - "country": "Birdshire", - "image": 5, - "telephone": "012345 123456", - "last_name": "Joyce", - "address_1": "21 Tweety Mansions", - "address_2": "3 Bird Lane", - "intro": "

The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean

", - "email": "foo@example.com", - "biography": "

Wagtails are slender, often colourful, ground-feeding insectivores of open country in the Old World. They are ground nesters, laying up to six speckled eggs at a time. Among their most conspicuous behaviours is a near constant tail wagging, a trait that has given the birds their common name. In spite of the ubiquity of the behaviour and observations of it, the reasons for it are poorly understood. It has been suggested that it may flush up prey, or that it may signal submissiveness to other wagtails. Recent studies have suggested instead that it is a signal of vigilance that may aid to deter potential predators.


At first glance, the wagtails appear to be divided into a yellow-bellied group and a white-bellied one, or one where the upper head is black and another where it is usually gray, but may be olive, yellow, or other colours. However, these are not evolutionary lineages; change of belly colour and increase of melanin have occurred independently several times in the wagtails, and the colour patterns which actually indicate relationships are more subtle.

" - } -}, -{ - "pk": 14, - "model": "demo.personpage", - "fields": { - "feed_image": 6, - "city": "", - "first_name": "David", - "post_code": "W1A 1AA", - "country": "", - "image": 6, - "telephone": "", - "last_name": "Mitchell", - "address_1": "", - "address_2": "", - "intro": "

Wagtails are slender, often colourful, ground-feeding insectivores of open country in the Old World.

", - "email": "foo@example.com", - "biography": "

Wagtails are slender, often colourful, ground-feeding insectivores of open country in the Old World. They are ground nesters, laying up to six speckled eggs at a time. Among their most conspicuous behaviours is a near constant tail wagging, a trait that has given the birds their common name. In spite of the ubiquity of the behaviour and observations of it, the reasons for it are poorly understood. It has been suggested that it may flush up prey, or that it may signal submissiveness to other wagtails. Recent studies have suggested instead that it is a signal of vigilance that may aid to deter potential predators.

" - } -}, -{ - "pk": 6, - "model": "demo.standardindexpage", - "fields": { - "feed_image": null, - "intro": "

Three species are poly- or paraphyletic in the present taxonomical arrangement and either subspecies need to be reassigned and/or species split up. The Blue-headed Wagtail (AKA Yellow Wagtail and many other names), especially, has always been a taxonomical nightmare with over a dozen currently accepted subspecies and many more invalid ones. The two remaining \"monochrome\" species, Mekong and African Pied Wagtail may be closely related, or a most striking example of convergent evolution.

" - } -}, -{ - "pk": 20, - "model": "demo.standardindexpage", - "fields": { - "feed_image": null, - "intro": "" - } -}, -{ - "pk": 21, - "model": "demo.standardindexpage", - "fields": { - "feed_image": null, - "intro": "

A listing of pages at the next level down

" - } -}, -{ - "pk": 10, - "model": "demo.standardpage", - "fields": { - "body": "

Wagtails are slender, often colourful, ground-feeding insectivores of open country in the Old World. They are ground nesters, laying up to six speckled eggs at a time. Among their most conspicuous behaviours is a near constant tail wagging, a trait that has given the birds their common name. In spite of the ubiquity of the behaviour and observations of it, the reasons for it are poorly understood. It has been suggested that it may flush up prey, or that it may signal submissiveness to other wagtails. Recent studies have suggested instead that it is a signal of vigilance that may aid to deter potential predators.


At first glance, the wagtails appear to be divided into a yellow-bellied group and a white-bellied one, or one where the upper head is black and another where it is usually gray, but may be olive, yellow, or other colours. However, these are not evolutionary lineages; change of belly colour and increase of melanin have occurred independently several times in the wagtails, and the colour patterns which actually indicate relationships are more subtle.


mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.


The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.

", - "feed_image": 12, - "intro": "

At first glance, the wagtails appear to be divided into a yellow-bellied group and a white-bellied one, or one where the upper head is black and another where it is usually gray, but may be olive, yellow, or other colours. However, these are not evolutionary lineages; change of belly colour and increase of melanin have occurred independently several times in the wagtails, and the colour patterns which actually indicate relationships are more subtle.

" - } -}, -{ - "pk": 15, - "model": "demo.standardpage", - "fields": { - "body": "

Wagtails are great

At first glance, the wagtails appear to be divided into a yellow-bellied group and a white-bellied one, or one where the upper head is black and another where it is usually gray, but may be olive, yellow, or other colours. However, these are not evolutionary lineages; change of belly colour and increase of melanin have occurred independently several times in the wagtails, and the colour patterns which actually indicate relationships are more subtle.


Wagtails are pretty

mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.


The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.

Three species are poly- or paraphyletic in the present taxonomical arrangement and either subspecies need to be reassigned and/or species split up. The Blue-headed Wagtail (AKA Yellow Wagtail and many other names), especially, has always been a taxonomical nightmare with over a dozen currently accepted subspecies and many more invalid ones. The two remaining \"monochrome\" species, Mekong and African Pied Wagtail may be closely related, or a most striking example of convergent evolution.

", - "feed_image": 10, - "intro": "

The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.

" - } -}, -{ - "pk": 17, - "model": "demo.standardpage", - "fields": { - "body": "

James Joyce,\u00a01915,\u00a0Cornell Joyce Collection\u00a0by C. Ruf - public domain in the United States

\n

David Mitchell (b. 1969), British writer,\u00a0Warsaw (Poland), April 7, 2006, \u00a0Mariusz Kubik, GDFL licence

Wagtail,\u00a0October 14, 2012\u00a0by Mark Harkin, \u00a0\u00a0Creative Commons

Wagtail, February 18th 2008, by Joe Buckingham, Creative Commons

Wagtail, August 4th 2009, by fs-phil, Creative Commons

White wagtail, February 5th 2012, by Koshy Koshy, Creative Commons

Pied wagtail, January 20th 2013, by Marie Hale, Creative Commons

Wagtail at Borovoye, Kazakhstan, June 16th 2012, by Ken and Nyetta,\u00a0Creative Commons

Wagtail sproing, April 29 2012, by Jim Bendon, Creative Commons

Hopalong wagtail, June 17th 2008, by Ruth Flickr, Creative Commons

Wagtail collects insects, June 10th 2010, by Margrit, Creative Commons

Grey wagtail, March 13th 2009, by Lip Kee, Creative Commons

", - "feed_image": 15, - "intro": "

The following photos have been used in the sample wagtail demo database

" - } -}, -{ - "pk": 22, - "model": "demo.standardpage", - "fields": { - "body": "

The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.


Three species are poly- or paraphyletic in the present taxonomical arrangement and either subspecies need to be reassigned and/or species split up. The Blue-headed Wagtail (AKA Yellow Wagtail and many other names), especially, has always been a taxonomical nightmare with over a dozen currently accepted subspecies and many more invalid ones. The two remaining \"monochrome\" species, Mekong and African Pied Wagtail may be closely related, or a most striking example of convergent evolution.

", - "feed_image": null, - "intro": "

At first glance, the wagtails appear to be divided into a yellow-bellied group and a white-bellied one, or one where the upper head is black and another where it is usually gray, but may be olive, yellow, or other colours.

" - } -}, -{ - "pk": 23, - "model": "demo.standardpage", - "fields": { - "body": "

The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.


Three species are poly- or paraphyletic in the present taxonomical arrangement and either subspecies need to be reassigned and/or species split up. The Blue-headed Wagtail (AKA Yellow Wagtail and many other names), especially, has always been a taxonomical nightmare with over a dozen currently accepted subspecies and many more invalid ones. The two remaining \"monochrome\" species, Mekong and African Pied Wagtail may be closely related, or a most striking example of convergent evolution.

", - "feed_image": null, - "intro": "

The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.

" - } -}, -{ - "pk": 1, - "model": "demo.standardpagecarouselitem", - "fields": { - "link_page": null, - "embed_url": "", - "image": 13, - "link_external": "http://www.flickr.com/photos/ruthhb/", - "caption": "Hopalong wagtail by Ruth Flickr", - "sort_order": 0, - "link_document": null, - "page": 10 - } -}, -{ - "pk": 2, - "model": "demo.standardpagecarouselitem", - "fields": { - "link_page": null, - "embed_url": "", - "image": 15, - "link_external": "http://www.flickr.com/photos/lipkee/", - "caption": "Grey wagtail by Lip Kee", - "sort_order": 1, - "link_document": null, - "page": 10 - } -}, -{ - "pk": 1, - "model": "demo.standardpagerelatedlink", - "fields": { - "link_page": 4, - "title": "Internal link to events", - "link_external": "", - "sort_order": 0, - "link_document": null, - "page": 10 - } -}, -{ - "pk": 2, - "model": "demo.standardpagerelatedlink", - "fields": { - "link_page": null, - "title": "External link to google", - "link_external": "http://www.google.com/", - "sort_order": 1, - "link_document": null, - "page": 10 - } -}, -{ - "pk": 1, - "model": "taggit.tag", - "fields": { - "name": "writers", - "slug": "writers" - } -}, -{ - "pk": 2, - "model": "taggit.tag", - "fields": { - "name": "people", - "slug": "people" - } -}, -{ - "pk": 3, - "model": "taggit.tag", - "fields": { - "name": "person", - "slug": "person" - } -}, -{ - "pk": 4, - "model": "taggit.tag", - "fields": { - "name": "wagtail", - "slug": "wagtail" - } -}, -{ - "pk": 5, - "model": "taggit.tag", - "fields": { - "name": "bird", - "slug": "bird" - } -}, -{ - "pk": 6, - "model": "taggit.tag", - "fields": { - "name": "writer", - "slug": "writer" - } -}, -{ - "fields": { - "email": "", - "username": "admin", - "last_name": "", - "last_login": "2015-01-15T10:15:46.942Z", - "is_superuser": true, - "is_active": true, - "groups": [], - "date_joined": "2015-01-15T10:13:48.969Z", - "is_staff": true, - "user_permissions": [], - "first_name": "", - "password": "pbkdf2_sha256$15000$hbmFjDx3rL12$lfU7j6YuVlKmUPChuiSXsXFhIgrejJGuWvWj5wxlRjQ=" - }, - "model": "auth.user", - "pk": 1 -} -] diff --git a/examples/wagtaildemo/demo/fixtures/images/David_Mitchell_by_Kubik.JPG b/examples/wagtaildemo/demo/fixtures/images/David_Mitchell_by_Kubik.JPG deleted file mode 100644 index c6bdac7a..00000000 Binary files a/examples/wagtaildemo/demo/fixtures/images/David_Mitchell_by_Kubik.JPG and /dev/null differ diff --git a/examples/wagtaildemo/demo/fixtures/images/James_Joyce_in_1915.jpg b/examples/wagtaildemo/demo/fixtures/images/James_Joyce_in_1915.jpg deleted file mode 100644 index 21d9e4b6..00000000 Binary files a/examples/wagtaildemo/demo/fixtures/images/James_Joyce_in_1915.jpg and /dev/null differ diff --git a/examples/wagtaildemo/demo/fixtures/images/grey_wagtail_by_lip_kee.jpg b/examples/wagtaildemo/demo/fixtures/images/grey_wagtail_by_lip_kee.jpg deleted file mode 100644 index 8b4ca546..00000000 Binary files a/examples/wagtaildemo/demo/fixtures/images/grey_wagtail_by_lip_kee.jpg and /dev/null differ diff --git a/examples/wagtaildemo/demo/fixtures/images/hopalong_wagtail_by_Ruth_Flickr.jpg b/examples/wagtaildemo/demo/fixtures/images/hopalong_wagtail_by_Ruth_Flickr.jpg deleted file mode 100644 index 2d61d5eb..00000000 Binary files a/examples/wagtaildemo/demo/fixtures/images/hopalong_wagtail_by_Ruth_Flickr.jpg and /dev/null differ diff --git a/examples/wagtaildemo/demo/fixtures/images/pied_wagtail_by_Marie_Hale.jpg b/examples/wagtaildemo/demo/fixtures/images/pied_wagtail_by_Marie_Hale.jpg deleted file mode 100644 index caa8add8..00000000 Binary files a/examples/wagtaildemo/demo/fixtures/images/pied_wagtail_by_Marie_Hale.jpg and /dev/null differ diff --git a/examples/wagtaildemo/demo/fixtures/images/wagtail_at_Borovoye_Kazakhstan_by_Ken_and_Nyetta.jpg b/examples/wagtaildemo/demo/fixtures/images/wagtail_at_Borovoye_Kazakhstan_by_Ken_and_Nyetta.jpg deleted file mode 100644 index b95aeac6..00000000 Binary files a/examples/wagtaildemo/demo/fixtures/images/wagtail_at_Borovoye_Kazakhstan_by_Ken_and_Nyetta.jpg and /dev/null differ diff --git a/examples/wagtaildemo/demo/fixtures/images/wagtail_by_fs-phil.jpg b/examples/wagtaildemo/demo/fixtures/images/wagtail_by_fs-phil.jpg deleted file mode 100644 index ebe8bf37..00000000 Binary files a/examples/wagtaildemo/demo/fixtures/images/wagtail_by_fs-phil.jpg and /dev/null differ diff --git a/examples/wagtaildemo/demo/fixtures/images/wagtail_by_joe_buckingham.jpg b/examples/wagtaildemo/demo/fixtures/images/wagtail_by_joe_buckingham.jpg deleted file mode 100644 index 0880825c..00000000 Binary files a/examples/wagtaildemo/demo/fixtures/images/wagtail_by_joe_buckingham.jpg and /dev/null differ diff --git a/examples/wagtaildemo/demo/fixtures/images/wagtail_by_markyharky.jpg b/examples/wagtaildemo/demo/fixtures/images/wagtail_by_markyharky.jpg deleted file mode 100644 index 482f818f..00000000 Binary files a/examples/wagtaildemo/demo/fixtures/images/wagtail_by_markyharky.jpg and /dev/null differ diff --git a/examples/wagtaildemo/demo/fixtures/images/wagtail_collects_insects_by_Maggi_94.jpg b/examples/wagtaildemo/demo/fixtures/images/wagtail_collects_insects_by_Maggi_94.jpg deleted file mode 100644 index 047a3d54..00000000 Binary files a/examples/wagtaildemo/demo/fixtures/images/wagtail_collects_insects_by_Maggi_94.jpg and /dev/null differ diff --git a/examples/wagtaildemo/demo/fixtures/images/wagtail_sproing_by_Jim_Bendon.jpg b/examples/wagtaildemo/demo/fixtures/images/wagtail_sproing_by_Jim_Bendon.jpg deleted file mode 100644 index 02de2d48..00000000 Binary files a/examples/wagtaildemo/demo/fixtures/images/wagtail_sproing_by_Jim_Bendon.jpg and /dev/null differ diff --git a/examples/wagtaildemo/demo/fixtures/images/white_wagtail_by_Koshyk.jpg b/examples/wagtaildemo/demo/fixtures/images/white_wagtail_by_Koshyk.jpg deleted file mode 100644 index b8bd3b9f..00000000 Binary files a/examples/wagtaildemo/demo/fixtures/images/white_wagtail_by_Koshyk.jpg and /dev/null differ diff --git a/examples/wagtaildemo/demo/management/__init__.py b/examples/wagtaildemo/demo/management/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/examples/wagtaildemo/demo/management/commands/__init__.py b/examples/wagtaildemo/demo/management/commands/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/examples/wagtaildemo/demo/management/commands/load_initial_data.py b/examples/wagtaildemo/demo/management/commands/load_initial_data.py deleted file mode 100644 index 704702bf..00000000 --- a/examples/wagtaildemo/demo/management/commands/load_initial_data.py +++ /dev/null @@ -1,21 +0,0 @@ -import os, shutil - -from django.conf import settings -from django.core.management.base import BaseCommand -from django.core.management import call_command - - -class Command(BaseCommand): - def handle(self, **options): - fixtures_dir = os.path.join(settings.PROJECT_ROOT, 'demo', 'fixtures') - fixture_file = os.path.join(fixtures_dir, 'demo.json') - image_src_dir = os.path.join(fixtures_dir, 'images') - image_dest_dir = os.path.join(settings.MEDIA_ROOT, 'original_images') - - call_command('loaddata', fixture_file, verbosity=0) - - if not os.path.isdir(image_dest_dir): - os.makedirs(image_dest_dir) - - for filename in os.listdir(image_src_dir): - shutil.copy(os.path.join(image_src_dir, filename), image_dest_dir) diff --git a/examples/wagtaildemo/demo/migrations/0001_initial.py b/examples/wagtaildemo/demo/migrations/0001_initial.py deleted file mode 100644 index cfd7b7e7..00000000 --- a/examples/wagtaildemo/demo/migrations/0001_initial.py +++ /dev/null @@ -1,585 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models, migrations -import django.db.models.deletion -import modelcluster.fields -import wagtail.wagtailcore.fields -import modelcluster.tags - - -class Migration(migrations.Migration): - - dependencies = [ - ('wagtailimages', '0002_initial_data'), - ('wagtaildocs', '0002_initial_data'), - ('wagtailcore', '0002_initial_data'), - ('taggit', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Advert', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('url', models.URLField(null=True, blank=True)), - ('text', models.CharField(max_length=255)), - ], - options={ - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='AdvertPlacement', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('advert', models.ForeignKey(related_name=b'+', to='demo.Advert')), - ], - options={ - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='BlogIndexPage', - fields=[ - ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), - ('intro', wagtail.wagtailcore.fields.RichTextField(blank=True)), - ], - options={ - 'abstract': False, - }, - bases=('wagtailcore.page',), - ), - migrations.CreateModel( - name='BlogIndexPageRelatedLink', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), - ('link_external', models.URLField(verbose_name=b'External link', blank=True)), - ('title', models.CharField(help_text=b'Link title', max_length=255)), - ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), - ], - options={ - 'ordering': ['sort_order'], - 'abstract': False, - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='BlogPage', - fields=[ - ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), - ('body', wagtail.wagtailcore.fields.RichTextField()), - ('date', models.DateField(verbose_name=b'Post date')), - ('feed_image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), - ], - options={ - 'abstract': False, - }, - bases=('wagtailcore.page',), - ), - migrations.CreateModel( - name='BlogPageCarouselItem', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), - ('link_external', models.URLField(verbose_name=b'External link', blank=True)), - ('embed_url', models.URLField(verbose_name=b'Embed URL', blank=True)), - ('caption', models.CharField(max_length=255, blank=True)), - ('image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), - ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), - ], - options={ - 'ordering': ['sort_order'], - 'abstract': False, - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='BlogPageRelatedLink', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), - ('link_external', models.URLField(verbose_name=b'External link', blank=True)), - ('title', models.CharField(help_text=b'Link title', max_length=255)), - ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), - ], - options={ - 'ordering': ['sort_order'], - 'abstract': False, - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='BlogPageTag', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('content_object', modelcluster.fields.ParentalKey(related_name=b'tagged_items', to='demo.BlogPage')), - ('tag', models.ForeignKey(related_name='demo_blogpagetag_items', to='taggit.Tag')), - ], - options={ - 'abstract': False, - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='ContactPage', - fields=[ - ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), - ('telephone', models.CharField(max_length=20, blank=True)), - ('email', models.EmailField(max_length=75, blank=True)), - ('address_1', models.CharField(max_length=255, blank=True)), - ('address_2', models.CharField(max_length=255, blank=True)), - ('city', models.CharField(max_length=255, blank=True)), - ('country', models.CharField(max_length=255, blank=True)), - ('post_code', models.CharField(max_length=10, blank=True)), - ('body', wagtail.wagtailcore.fields.RichTextField(blank=True)), - ('feed_image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), - ], - options={ - 'abstract': False, - }, - bases=('wagtailcore.page', models.Model), - ), - migrations.CreateModel( - name='EventIndexPage', - fields=[ - ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), - ('intro', wagtail.wagtailcore.fields.RichTextField(blank=True)), - ], - options={ - 'abstract': False, - }, - bases=('wagtailcore.page',), - ), - migrations.CreateModel( - name='EventIndexPageRelatedLink', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), - ('link_external', models.URLField(verbose_name=b'External link', blank=True)), - ('title', models.CharField(help_text=b'Link title', max_length=255)), - ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), - ], - options={ - 'ordering': ['sort_order'], - 'abstract': False, - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='EventPage', - fields=[ - ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), - ('date_from', models.DateField(verbose_name=b'Start date')), - ('date_to', models.DateField(help_text=b'Not required if event is on a single day', null=True, verbose_name=b'End date', blank=True)), - ('time_from', models.TimeField(null=True, verbose_name=b'Start time', blank=True)), - ('time_to', models.TimeField(null=True, verbose_name=b'End time', blank=True)), - ('audience', models.CharField(max_length=255, choices=[(b'public', b'Public'), (b'private', b'Private')])), - ('location', models.CharField(max_length=255)), - ('body', wagtail.wagtailcore.fields.RichTextField(blank=True)), - ('cost', models.CharField(max_length=255)), - ('signup_link', models.URLField(blank=True)), - ('feed_image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), - ], - options={ - 'abstract': False, - }, - bases=('wagtailcore.page',), - ), - migrations.CreateModel( - name='EventPageCarouselItem', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), - ('link_external', models.URLField(verbose_name=b'External link', blank=True)), - ('embed_url', models.URLField(verbose_name=b'Embed URL', blank=True)), - ('caption', models.CharField(max_length=255, blank=True)), - ('image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), - ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), - ], - options={ - 'ordering': ['sort_order'], - 'abstract': False, - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='EventPageRelatedLink', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), - ('link_external', models.URLField(verbose_name=b'External link', blank=True)), - ('title', models.CharField(help_text=b'Link title', max_length=255)), - ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), - ], - options={ - 'ordering': ['sort_order'], - 'abstract': False, - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='EventPageSpeaker', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), - ('link_external', models.URLField(verbose_name=b'External link', blank=True)), - ('first_name', models.CharField(max_length=255, verbose_name=b'Name', blank=True)), - ('last_name', models.CharField(max_length=255, verbose_name=b'Surname', blank=True)), - ('image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), - ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), - ], - options={ - 'ordering': ['sort_order'], - 'abstract': False, - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='FormField', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), - ('label', models.CharField(help_text='The label of the form field', max_length=255)), - ('field_type', models.CharField(max_length=16, choices=[(b'singleline', 'Single line text'), (b'multiline', 'Multi-line text'), (b'email', 'Email'), (b'number', 'Number'), (b'url', 'URL'), (b'checkbox', 'Checkbox'), (b'checkboxes', 'Checkboxes'), (b'dropdown', 'Drop down'), (b'radio', 'Radio buttons'), (b'date', 'Date'), (b'datetime', 'Date/time')])), - ('required', models.BooleanField(default=True)), - ('choices', models.CharField(help_text='Comma separated list of choices. Only applicable in checkboxes, radio and dropdown.', max_length=512, blank=True)), - ('default_value', models.CharField(help_text='Default value. Comma separated values supported for checkboxes.', max_length=255, blank=True)), - ('help_text', models.CharField(max_length=255, blank=True)), - ], - options={ - 'ordering': ['sort_order'], - 'abstract': False, - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='FormPage', - fields=[ - ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), - ('to_address', models.CharField(help_text='Optional - form submissions will be emailed to this address', max_length=255, blank=True)), - ('from_address', models.CharField(max_length=255, blank=True)), - ('subject', models.CharField(max_length=255, blank=True)), - ('intro', wagtail.wagtailcore.fields.RichTextField(blank=True)), - ('thank_you_text', wagtail.wagtailcore.fields.RichTextField(blank=True)), - ], - options={ - 'abstract': False, - }, - bases=('wagtailcore.page',), - ), - migrations.CreateModel( - name='HomePage', - fields=[ - ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), - ('body', wagtail.wagtailcore.fields.RichTextField(blank=True)), - ], - options={ - 'verbose_name': 'Homepage', - }, - bases=('wagtailcore.page',), - ), - migrations.CreateModel( - name='HomePageCarouselItem', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), - ('link_external', models.URLField(verbose_name=b'External link', blank=True)), - ('embed_url', models.URLField(verbose_name=b'Embed URL', blank=True)), - ('caption', models.CharField(max_length=255, blank=True)), - ('image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), - ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), - ], - options={ - 'ordering': ['sort_order'], - 'abstract': False, - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='HomePageRelatedLink', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), - ('link_external', models.URLField(verbose_name=b'External link', blank=True)), - ('title', models.CharField(help_text=b'Link title', max_length=255)), - ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), - ], - options={ - 'ordering': ['sort_order'], - 'abstract': False, - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='PersonPage', - fields=[ - ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), - ('telephone', models.CharField(max_length=20, blank=True)), - ('email', models.EmailField(max_length=75, blank=True)), - ('address_1', models.CharField(max_length=255, blank=True)), - ('address_2', models.CharField(max_length=255, blank=True)), - ('city', models.CharField(max_length=255, blank=True)), - ('country', models.CharField(max_length=255, blank=True)), - ('post_code', models.CharField(max_length=10, blank=True)), - ('first_name', models.CharField(max_length=255)), - ('last_name', models.CharField(max_length=255)), - ('intro', wagtail.wagtailcore.fields.RichTextField(blank=True)), - ('biography', wagtail.wagtailcore.fields.RichTextField(blank=True)), - ('feed_image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), - ('image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), - ], - options={ - 'abstract': False, - }, - bases=('wagtailcore.page', models.Model), - ), - migrations.CreateModel( - name='PersonPageRelatedLink', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), - ('link_external', models.URLField(verbose_name=b'External link', blank=True)), - ('title', models.CharField(help_text=b'Link title', max_length=255)), - ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), - ], - options={ - 'ordering': ['sort_order'], - 'abstract': False, - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='StandardIndexPage', - fields=[ - ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), - ('intro', wagtail.wagtailcore.fields.RichTextField(blank=True)), - ('feed_image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), - ], - options={ - 'abstract': False, - }, - bases=('wagtailcore.page',), - ), - migrations.CreateModel( - name='StandardIndexPageRelatedLink', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), - ('link_external', models.URLField(verbose_name=b'External link', blank=True)), - ('title', models.CharField(help_text=b'Link title', max_length=255)), - ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), - ], - options={ - 'ordering': ['sort_order'], - 'abstract': False, - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='StandardPage', - fields=[ - ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), - ('intro', wagtail.wagtailcore.fields.RichTextField(blank=True)), - ('body', wagtail.wagtailcore.fields.RichTextField(blank=True)), - ('feed_image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), - ], - options={ - 'abstract': False, - }, - bases=('wagtailcore.page',), - ), - migrations.CreateModel( - name='StandardPageCarouselItem', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), - ('link_external', models.URLField(verbose_name=b'External link', blank=True)), - ('embed_url', models.URLField(verbose_name=b'Embed URL', blank=True)), - ('caption', models.CharField(max_length=255, blank=True)), - ('image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), - ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), - ('link_page', models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True)), - ('page', modelcluster.fields.ParentalKey(related_name=b'carousel_items', to='demo.StandardPage')), - ], - options={ - 'ordering': ['sort_order'], - 'abstract': False, - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='StandardPageRelatedLink', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), - ('link_external', models.URLField(verbose_name=b'External link', blank=True)), - ('title', models.CharField(help_text=b'Link title', max_length=255)), - ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), - ('link_page', models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True)), - ('page', modelcluster.fields.ParentalKey(related_name=b'related_links', to='demo.StandardPage')), - ], - options={ - 'ordering': ['sort_order'], - 'abstract': False, - }, - bases=(models.Model,), - ), - migrations.AddField( - model_name='standardindexpagerelatedlink', - name='link_page', - field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), - preserve_default=True, - ), - migrations.AddField( - model_name='standardindexpagerelatedlink', - name='page', - field=modelcluster.fields.ParentalKey(related_name=b'related_links', to='demo.StandardIndexPage'), - preserve_default=True, - ), - migrations.AddField( - model_name='personpagerelatedlink', - name='link_page', - field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), - preserve_default=True, - ), - migrations.AddField( - model_name='personpagerelatedlink', - name='page', - field=modelcluster.fields.ParentalKey(related_name=b'related_links', to='demo.PersonPage'), - preserve_default=True, - ), - migrations.AddField( - model_name='homepagerelatedlink', - name='link_page', - field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), - preserve_default=True, - ), - migrations.AddField( - model_name='homepagerelatedlink', - name='page', - field=modelcluster.fields.ParentalKey(related_name=b'related_links', to='demo.HomePage'), - preserve_default=True, - ), - migrations.AddField( - model_name='homepagecarouselitem', - name='link_page', - field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), - preserve_default=True, - ), - migrations.AddField( - model_name='homepagecarouselitem', - name='page', - field=modelcluster.fields.ParentalKey(related_name=b'carousel_items', to='demo.HomePage'), - preserve_default=True, - ), - migrations.AddField( - model_name='formfield', - name='page', - field=modelcluster.fields.ParentalKey(related_name=b'form_fields', to='demo.FormPage'), - preserve_default=True, - ), - migrations.AddField( - model_name='eventpagespeaker', - name='link_page', - field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), - preserve_default=True, - ), - migrations.AddField( - model_name='eventpagespeaker', - name='page', - field=modelcluster.fields.ParentalKey(related_name=b'speakers', to='demo.EventPage'), - preserve_default=True, - ), - migrations.AddField( - model_name='eventpagerelatedlink', - name='link_page', - field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), - preserve_default=True, - ), - migrations.AddField( - model_name='eventpagerelatedlink', - name='page', - field=modelcluster.fields.ParentalKey(related_name=b'related_links', to='demo.EventPage'), - preserve_default=True, - ), - migrations.AddField( - model_name='eventpagecarouselitem', - name='link_page', - field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), - preserve_default=True, - ), - migrations.AddField( - model_name='eventpagecarouselitem', - name='page', - field=modelcluster.fields.ParentalKey(related_name=b'carousel_items', to='demo.EventPage'), - preserve_default=True, - ), - migrations.AddField( - model_name='eventindexpagerelatedlink', - name='link_page', - field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), - preserve_default=True, - ), - migrations.AddField( - model_name='eventindexpagerelatedlink', - name='page', - field=modelcluster.fields.ParentalKey(related_name=b'related_links', to='demo.EventIndexPage'), - preserve_default=True, - ), - migrations.AddField( - model_name='blogpagerelatedlink', - name='link_page', - field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), - preserve_default=True, - ), - migrations.AddField( - model_name='blogpagerelatedlink', - name='page', - field=modelcluster.fields.ParentalKey(related_name=b'related_links', to='demo.BlogPage'), - preserve_default=True, - ), - migrations.AddField( - model_name='blogpagecarouselitem', - name='link_page', - field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), - preserve_default=True, - ), - migrations.AddField( - model_name='blogpagecarouselitem', - name='page', - field=modelcluster.fields.ParentalKey(related_name=b'carousel_items', to='demo.BlogPage'), - preserve_default=True, - ), - migrations.AddField( - model_name='blogpage', - name='tags', - field=modelcluster.tags.ClusterTaggableManager(to='taggit.Tag', through='demo.BlogPageTag', blank=True, help_text='A comma-separated list of tags.', verbose_name='Tags'), - preserve_default=True, - ), - migrations.AddField( - model_name='blogindexpagerelatedlink', - name='link_page', - field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), - preserve_default=True, - ), - migrations.AddField( - model_name='blogindexpagerelatedlink', - name='page', - field=modelcluster.fields.ParentalKey(related_name=b'related_links', to='demo.BlogIndexPage'), - preserve_default=True, - ), - migrations.AddField( - model_name='advertplacement', - name='page', - field=modelcluster.fields.ParentalKey(related_name=b'advert_placements', to='wagtailcore.Page'), - preserve_default=True, - ), - migrations.AddField( - model_name='advert', - name='page', - field=models.ForeignKey(related_name=b'adverts', blank=True, to='wagtailcore.Page', null=True), - preserve_default=True, - ), - ] diff --git a/examples/wagtaildemo/demo/migrations/0002_auto_20150917_1037.py b/examples/wagtaildemo/demo/migrations/0002_auto_20150917_1037.py deleted file mode 100644 index 8a2bc7ed..00000000 --- a/examples/wagtaildemo/demo/migrations/0002_auto_20150917_1037.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models, migrations -import demo.models -import wagtail.wagtaildocs.blocks -import wagtail.wagtailimages.blocks -import wagtail.wagtailcore.fields -import wagtail.wagtailcore.blocks - - -class Migration(migrations.Migration): - - dependencies = [ - ('demo', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='homepage', - name='body', - field=wagtail.wagtailcore.fields.StreamField([(b'h2', wagtail.wagtailcore.blocks.CharBlock(classname=b'title', icon=b'title')), (b'h3', wagtail.wagtailcore.blocks.CharBlock(classname=b'title', icon=b'title')), (b'h4', wagtail.wagtailcore.blocks.CharBlock(classname=b'title', icon=b'title')), (b'intro', wagtail.wagtailcore.blocks.RichTextBlock(icon=b'pilcrow')), (b'paragraph', wagtail.wagtailcore.blocks.RichTextBlock(icon=b'pilcrow')), (b'aligned_image', wagtail.wagtailcore.blocks.StructBlock([(b'image', wagtail.wagtailimages.blocks.ImageChooserBlock()), (b'caption', wagtail.wagtailcore.blocks.RichTextBlock()), (b'alignment', demo.models.ImageFormatChoiceBlock())], icon=b'image', label=b'Aligned image')), (b'pullquote', wagtail.wagtailcore.blocks.StructBlock([(b'quote', wagtail.wagtailcore.blocks.TextBlock(b'quote title')), (b'attribution', wagtail.wagtailcore.blocks.CharBlock())])), (b'aligned_html', wagtail.wagtailcore.blocks.StructBlock([(b'html', wagtail.wagtailcore.blocks.RawHTMLBlock()), (b'alignment', demo.models.HTMLAlignmentChoiceBlock())], label=b'Raw HTML', icon=b'code')), (b'document', wagtail.wagtaildocs.blocks.DocumentChooserBlock(icon=b'doc-full-inverse'))]), - ) - ] diff --git a/examples/wagtaildemo/demo/migrations/0003_auto_20150917_1200.py b/examples/wagtaildemo/demo/migrations/0003_auto_20150917_1200.py deleted file mode 100644 index e501662a..00000000 --- a/examples/wagtaildemo/demo/migrations/0003_auto_20150917_1200.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models, migrations -import demo.models -import wagtail.wagtaildocs.blocks -import wagtail.wagtailimages.blocks -import wagtail.wagtailcore.fields -import wagtail.wagtailcore.blocks - - -class Migration(migrations.Migration): - - dependencies = [ - ('demo', '0002_auto_20150917_1037'), - ] - - operations = [ - migrations.AlterField( - model_name='blogpage', - name='body', - field=wagtail.wagtailcore.fields.StreamField([(b'h2', wagtail.wagtailcore.blocks.CharBlock(classname=b'title', icon=b'title')), (b'h3', wagtail.wagtailcore.blocks.CharBlock(classname=b'title', icon=b'title')), (b'h4', wagtail.wagtailcore.blocks.CharBlock(classname=b'title', icon=b'title')), (b'intro', wagtail.wagtailcore.blocks.RichTextBlock(icon=b'pilcrow')), (b'paragraph', wagtail.wagtailcore.blocks.RichTextBlock(icon=b'pilcrow')), (b'aligned_image', wagtail.wagtailcore.blocks.StructBlock([(b'image', wagtail.wagtailimages.blocks.ImageChooserBlock()), (b'caption', wagtail.wagtailcore.blocks.RichTextBlock()), (b'alignment', demo.models.ImageFormatChoiceBlock())], icon=b'image', label=b'Aligned image')), (b'pullquote', wagtail.wagtailcore.blocks.StructBlock([(b'quote', wagtail.wagtailcore.blocks.TextBlock(b'quote title')), (b'attribution', wagtail.wagtailcore.blocks.CharBlock())])), (b'aligned_html', wagtail.wagtailcore.blocks.StructBlock([(b'html', wagtail.wagtailcore.blocks.RawHTMLBlock()), (b'alignment', demo.models.HTMLAlignmentChoiceBlock())], label=b'Raw HTML', icon=b'code')), (b'document', wagtail.wagtaildocs.blocks.DocumentChooserBlock(icon=b'doc-full-inverse'))]), - ) - ] diff --git a/examples/wagtaildemo/demo/migrations/0004_auto_20151019_1351.py b/examples/wagtaildemo/demo/migrations/0004_auto_20151019_1351.py deleted file mode 100644 index ab5a987a..00000000 --- a/examples/wagtaildemo/demo/migrations/0004_auto_20151019_1351.py +++ /dev/null @@ -1,249 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models, migrations -import wagtail.wagtailimages.blocks -import wagtail.wagtailcore.blocks -import wagtail.wagtailcore.fields -import wagtail.wagtaildocs.blocks -import demo.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('demo', '0003_auto_20150917_1200'), - ] - - operations = [ - migrations.AlterField( - model_name='blogindexpagerelatedlink', - name='link_external', - field=models.URLField(verbose_name='External link', blank=True), - ), - migrations.AlterField( - model_name='blogindexpagerelatedlink', - name='title', - field=models.CharField(max_length=255, help_text='Link title'), - ), - migrations.AlterField( - model_name='blogpage', - name='body', - field=wagtail.wagtailcore.fields.StreamField((('h2', wagtail.wagtailcore.blocks.CharBlock(icon='title', classname='title')), ('h3', wagtail.wagtailcore.blocks.CharBlock(icon='title', classname='title')), ('h4', wagtail.wagtailcore.blocks.CharBlock(icon='title', classname='title')), ('intro', wagtail.wagtailcore.blocks.RichTextBlock(icon='pilcrow')), ('paragraph', wagtail.wagtailcore.blocks.RichTextBlock(icon='pilcrow')), ('aligned_image', wagtail.wagtailcore.blocks.StructBlock((('image', wagtail.wagtailimages.blocks.ImageChooserBlock()), ('caption', wagtail.wagtailcore.blocks.RichTextBlock()), ('alignment', demo.models.ImageFormatChoiceBlock())), label='Aligned image', icon='image')), ('pullquote', wagtail.wagtailcore.blocks.StructBlock((('quote', wagtail.wagtailcore.blocks.TextBlock('quote title')), ('attribution', wagtail.wagtailcore.blocks.CharBlock())))), ('aligned_html', wagtail.wagtailcore.blocks.StructBlock((('html', wagtail.wagtailcore.blocks.RawHTMLBlock()), ('alignment', demo.models.HTMLAlignmentChoiceBlock())), label='Raw HTML', icon='code')), ('document', wagtail.wagtaildocs.blocks.DocumentChooserBlock(icon='doc-full-inverse')))), - ), - migrations.AlterField( - model_name='blogpage', - name='date', - field=models.DateField(verbose_name='Post date'), - ), - migrations.AlterField( - model_name='blogpagecarouselitem', - name='embed_url', - field=models.URLField(verbose_name='Embed URL', blank=True), - ), - migrations.AlterField( - model_name='blogpagecarouselitem', - name='link_external', - field=models.URLField(verbose_name='External link', blank=True), - ), - migrations.AlterField( - model_name='blogpagerelatedlink', - name='link_external', - field=models.URLField(verbose_name='External link', blank=True), - ), - migrations.AlterField( - model_name='blogpagerelatedlink', - name='title', - field=models.CharField(max_length=255, help_text='Link title'), - ), - migrations.AlterField( - model_name='contactpage', - name='email', - field=models.EmailField(max_length=254, blank=True), - ), - migrations.AlterField( - model_name='eventindexpagerelatedlink', - name='link_external', - field=models.URLField(verbose_name='External link', blank=True), - ), - migrations.AlterField( - model_name='eventindexpagerelatedlink', - name='title', - field=models.CharField(max_length=255, help_text='Link title'), - ), - migrations.AlterField( - model_name='eventpage', - name='audience', - field=models.CharField(max_length=255, choices=[('public', 'Public'), ('private', 'Private')]), - ), - migrations.AlterField( - model_name='eventpage', - name='date_from', - field=models.DateField(verbose_name='Start date'), - ), - migrations.AlterField( - model_name='eventpage', - name='date_to', - field=models.DateField(help_text='Not required if event is on a single day', verbose_name='End date', null=True, blank=True), - ), - migrations.AlterField( - model_name='eventpage', - name='time_from', - field=models.TimeField(verbose_name='Start time', null=True, blank=True), - ), - migrations.AlterField( - model_name='eventpage', - name='time_to', - field=models.TimeField(verbose_name='End time', null=True, blank=True), - ), - migrations.AlterField( - model_name='eventpagecarouselitem', - name='embed_url', - field=models.URLField(verbose_name='Embed URL', blank=True), - ), - migrations.AlterField( - model_name='eventpagecarouselitem', - name='link_external', - field=models.URLField(verbose_name='External link', blank=True), - ), - migrations.AlterField( - model_name='eventpagerelatedlink', - name='link_external', - field=models.URLField(verbose_name='External link', blank=True), - ), - migrations.AlterField( - model_name='eventpagerelatedlink', - name='title', - field=models.CharField(max_length=255, help_text='Link title'), - ), - migrations.AlterField( - model_name='eventpagespeaker', - name='first_name', - field=models.CharField(max_length=255, verbose_name='Name', blank=True), - ), - migrations.AlterField( - model_name='eventpagespeaker', - name='last_name', - field=models.CharField(max_length=255, verbose_name='Surname', blank=True), - ), - migrations.AlterField( - model_name='eventpagespeaker', - name='link_external', - field=models.URLField(verbose_name='External link', blank=True), - ), - migrations.AlterField( - model_name='formfield', - name='choices', - field=models.CharField(max_length=512, help_text='Comma separated list of choices. Only applicable in checkboxes, radio and dropdown.', verbose_name='Choices', blank=True), - ), - migrations.AlterField( - model_name='formfield', - name='default_value', - field=models.CharField(max_length=255, help_text='Default value. Comma separated values supported for checkboxes.', verbose_name='Default value', blank=True), - ), - migrations.AlterField( - model_name='formfield', - name='field_type', - field=models.CharField(max_length=16, choices=[('singleline', 'Single line text'), ('multiline', 'Multi-line text'), ('email', 'Email'), ('number', 'Number'), ('url', 'URL'), ('checkbox', 'Checkbox'), ('checkboxes', 'Checkboxes'), ('dropdown', 'Drop down'), ('radio', 'Radio buttons'), ('date', 'Date'), ('datetime', 'Date/time')], verbose_name='Field type'), - ), - migrations.AlterField( - model_name='formfield', - name='help_text', - field=models.CharField(max_length=255, verbose_name='Help text', blank=True), - ), - migrations.AlterField( - model_name='formfield', - name='label', - field=models.CharField(max_length=255, help_text='The label of the form field', verbose_name='Label'), - ), - migrations.AlterField( - model_name='formfield', - name='required', - field=models.BooleanField(verbose_name='Required', default=True), - ), - migrations.AlterField( - model_name='formpage', - name='from_address', - field=models.CharField(max_length=255, verbose_name='From address', blank=True), - ), - migrations.AlterField( - model_name='formpage', - name='subject', - field=models.CharField(max_length=255, verbose_name='Subject', blank=True), - ), - migrations.AlterField( - model_name='formpage', - name='to_address', - field=models.CharField(max_length=255, help_text='Optional - form submissions will be emailed to this address', verbose_name='To address', blank=True), - ), - migrations.AlterField( - model_name='homepage', - name='body', - field=wagtail.wagtailcore.fields.StreamField((('h2', wagtail.wagtailcore.blocks.CharBlock(icon='title', classname='title')), ('h3', wagtail.wagtailcore.blocks.CharBlock(icon='title', classname='title')), ('h4', wagtail.wagtailcore.blocks.CharBlock(icon='title', classname='title')), ('intro', wagtail.wagtailcore.blocks.RichTextBlock(icon='pilcrow')), ('paragraph', wagtail.wagtailcore.blocks.RichTextBlock(icon='pilcrow')), ('aligned_image', wagtail.wagtailcore.blocks.StructBlock((('image', wagtail.wagtailimages.blocks.ImageChooserBlock()), ('caption', wagtail.wagtailcore.blocks.RichTextBlock()), ('alignment', demo.models.ImageFormatChoiceBlock())), label='Aligned image', icon='image')), ('pullquote', wagtail.wagtailcore.blocks.StructBlock((('quote', wagtail.wagtailcore.blocks.TextBlock('quote title')), ('attribution', wagtail.wagtailcore.blocks.CharBlock())))), ('aligned_html', wagtail.wagtailcore.blocks.StructBlock((('html', wagtail.wagtailcore.blocks.RawHTMLBlock()), ('alignment', demo.models.HTMLAlignmentChoiceBlock())), label='Raw HTML', icon='code')), ('document', wagtail.wagtaildocs.blocks.DocumentChooserBlock(icon='doc-full-inverse')))), - ), - migrations.AlterField( - model_name='homepagecarouselitem', - name='embed_url', - field=models.URLField(verbose_name='Embed URL', blank=True), - ), - migrations.AlterField( - model_name='homepagecarouselitem', - name='link_external', - field=models.URLField(verbose_name='External link', blank=True), - ), - migrations.AlterField( - model_name='homepagerelatedlink', - name='link_external', - field=models.URLField(verbose_name='External link', blank=True), - ), - migrations.AlterField( - model_name='homepagerelatedlink', - name='title', - field=models.CharField(max_length=255, help_text='Link title'), - ), - migrations.AlterField( - model_name='personpage', - name='email', - field=models.EmailField(max_length=254, blank=True), - ), - migrations.AlterField( - model_name='personpagerelatedlink', - name='link_external', - field=models.URLField(verbose_name='External link', blank=True), - ), - migrations.AlterField( - model_name='personpagerelatedlink', - name='title', - field=models.CharField(max_length=255, help_text='Link title'), - ), - migrations.AlterField( - model_name='standardindexpagerelatedlink', - name='link_external', - field=models.URLField(verbose_name='External link', blank=True), - ), - migrations.AlterField( - model_name='standardindexpagerelatedlink', - name='title', - field=models.CharField(max_length=255, help_text='Link title'), - ), - migrations.AlterField( - model_name='standardpagecarouselitem', - name='embed_url', - field=models.URLField(verbose_name='Embed URL', blank=True), - ), - migrations.AlterField( - model_name='standardpagecarouselitem', - name='link_external', - field=models.URLField(verbose_name='External link', blank=True), - ), - migrations.AlterField( - model_name='standardpagerelatedlink', - name='link_external', - field=models.URLField(verbose_name='External link', blank=True), - ), - migrations.AlterField( - model_name='standardpagerelatedlink', - name='title', - field=models.CharField(max_length=255, help_text='Link title'), - ), - ] diff --git a/examples/wagtaildemo/demo/migrations/0005_auto_20160531_1736.py b/examples/wagtaildemo/demo/migrations/0005_auto_20160531_1736.py deleted file mode 100644 index 29062c9d..00000000 --- a/examples/wagtaildemo/demo/migrations/0005_auto_20160531_1736.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('demo', '0004_auto_20151019_1351'), - ] - - operations = [ - migrations.AlterField( - model_name='formfield', - name='choices', - field=models.CharField(blank=True, max_length=512, verbose_name='choices', help_text='Comma separated list of choices. Only applicable in checkboxes, radio and dropdown.'), - ), - migrations.AlterField( - model_name='formfield', - name='default_value', - field=models.CharField(blank=True, max_length=255, verbose_name='default value', help_text='Default value. Comma separated values supported for checkboxes.'), - ), - migrations.AlterField( - model_name='formfield', - name='field_type', - field=models.CharField(choices=[('singleline', 'Single line text'), ('multiline', 'Multi-line text'), ('email', 'Email'), ('number', 'Number'), ('url', 'URL'), ('checkbox', 'Checkbox'), ('checkboxes', 'Checkboxes'), ('dropdown', 'Drop down'), ('radio', 'Radio buttons'), ('date', 'Date'), ('datetime', 'Date/time')], max_length=16, verbose_name='field type'), - ), - migrations.AlterField( - model_name='formfield', - name='help_text', - field=models.CharField(blank=True, max_length=255, verbose_name='help text'), - ), - migrations.AlterField( - model_name='formfield', - name='label', - field=models.CharField(help_text='The label of the form field', max_length=255, verbose_name='label'), - ), - migrations.AlterField( - model_name='formfield', - name='required', - field=models.BooleanField(verbose_name='required', default=True), - ), - migrations.AlterField( - model_name='formpage', - name='from_address', - field=models.CharField(blank=True, max_length=255, verbose_name='from address'), - ), - migrations.AlterField( - model_name='formpage', - name='subject', - field=models.CharField(blank=True, max_length=255, verbose_name='subject'), - ), - migrations.AlterField( - model_name='formpage', - name='to_address', - field=models.CharField(blank=True, max_length=255, verbose_name='to address', help_text='Optional - form submissions will be emailed to this address'), - ), - ] diff --git a/examples/wagtaildemo/demo/migrations/0006_auto_20160902_1204.py b/examples/wagtaildemo/demo/migrations/0006_auto_20160902_1204.py deleted file mode 100644 index 88273fb6..00000000 --- a/examples/wagtaildemo/demo/migrations/0006_auto_20160902_1204.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.1 on 2016-09-02 11:04 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('demo', '0005_auto_20160531_1736'), - ] - - operations = [ - migrations.AlterField( - model_name='formfield', - name='choices', - field=models.TextField(blank=True, help_text='Comma separated list of choices. Only applicable in checkboxes, radio and dropdown.', verbose_name='choices'), - ), - migrations.AlterField( - model_name='formpage', - name='to_address', - field=models.CharField(blank=True, help_text='Optional - form submissions will be emailed to these addresses. Separate multiple addresses by comma.', max_length=255, verbose_name='to address'), - ), - ] diff --git a/examples/wagtaildemo/demo/migrations/__init__.py b/examples/wagtaildemo/demo/migrations/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/examples/wagtaildemo/demo/models.py b/examples/wagtaildemo/demo/models.py deleted file mode 100644 index cd965258..00000000 --- a/examples/wagtaildemo/demo/models.py +++ /dev/null @@ -1,686 +0,0 @@ -from datetime import date - -from django.db import models -from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger -from django.http import HttpResponse -from django.utils.encoding import python_2_unicode_compatible -from django import forms - -from wagtail.wagtailcore.models import Page, Orderable -from wagtail.wagtailcore.fields import RichTextField, StreamField -from wagtail.wagtailadmin.edit_handlers import FieldPanel, FieldRowPanel, MultiFieldPanel, \ - InlinePanel, PageChooserPanel, StreamFieldPanel -from wagtail.wagtailimages.edit_handlers import ImageChooserPanel -from wagtail.wagtaildocs.edit_handlers import DocumentChooserPanel -from wagtail.wagtailsnippets.models import register_snippet -from wagtail.wagtailforms.models import AbstractEmailForm, AbstractFormField -from wagtail.wagtailsearch import index - -from wagtail.wagtailcore.blocks import TextBlock, StructBlock, StreamBlock, FieldBlock, CharBlock, RichTextBlock, RawHTMLBlock -from wagtail.wagtailimages.blocks import ImageChooserBlock -from wagtail.wagtaildocs.blocks import DocumentChooserBlock - -from modelcluster.fields import ParentalKey -from modelcluster.tags import ClusterTaggableManager -from taggit.models import TaggedItemBase - -from demo.utils import export_event - - -EVENT_AUDIENCE_CHOICES = ( - ('public', "Public"), - ('private', "Private"), -) - -# Global Streamfield definition - - -class PullQuoteBlock(StructBlock): - quote = TextBlock("quote title") - attribution = CharBlock() - - class Meta: - icon = "openquote" - - -class ImageFormatChoiceBlock(FieldBlock): - field = forms.ChoiceField(choices=( - ('left', 'Wrap left'), ('right', 'Wrap right'), ('mid', 'Mid width'), ('full', 'Full width'), - )) - - -class HTMLAlignmentChoiceBlock(FieldBlock): - field = forms.ChoiceField(choices=( - ('normal', 'Normal'), ('full', 'Full width'), - )) - - -class ImageBlock(StructBlock): - image = ImageChooserBlock() - caption = RichTextBlock() - alignment = ImageFormatChoiceBlock() - - -class AlignedHTMLBlock(StructBlock): - html = RawHTMLBlock() - alignment = HTMLAlignmentChoiceBlock() - - class Meta: - icon = "code" - - -class DemoStreamBlock(StreamBlock): - h2 = CharBlock(icon="title", classname="title") - h3 = CharBlock(icon="title", classname="title") - h4 = CharBlock(icon="title", classname="title") - intro = RichTextBlock(icon="pilcrow") - paragraph = RichTextBlock(icon="pilcrow") - aligned_image = ImageBlock(label="Aligned image", icon="image") - pullquote = PullQuoteBlock() - aligned_html = AlignedHTMLBlock(icon="code", label='Raw HTML') - document = DocumentChooserBlock(icon="doc-full-inverse") - - -# A couple of abstract classes that contain commonly used fields - -class LinkFields(models.Model): - link_external = models.URLField("External link", blank=True) - link_page = models.ForeignKey( - 'wagtailcore.Page', - null=True, - blank=True, - related_name='+' - ) - link_document = models.ForeignKey( - 'wagtaildocs.Document', - null=True, - blank=True, - related_name='+' - ) - - @property - def link(self): - if self.link_page: - return self.link_page.url - elif self.link_document: - return self.link_document.url - else: - return self.link_external - - panels = [ - FieldPanel('link_external'), - PageChooserPanel('link_page'), - DocumentChooserPanel('link_document'), - ] - - api_fields = ['link_external', 'link_page', 'link_document'] - - class Meta: - abstract = True - - -class ContactFields(models.Model): - telephone = models.CharField(max_length=20, blank=True) - email = models.EmailField(blank=True) - address_1 = models.CharField(max_length=255, blank=True) - address_2 = models.CharField(max_length=255, blank=True) - city = models.CharField(max_length=255, blank=True) - country = models.CharField(max_length=255, blank=True) - post_code = models.CharField(max_length=10, blank=True) - - panels = [ - FieldPanel('telephone'), - FieldPanel('email'), - FieldPanel('address_1'), - FieldPanel('address_2'), - FieldPanel('city'), - FieldPanel('country'), - FieldPanel('post_code'), - ] - - api_fields = ['telephone', 'email', 'address_1', 'address_2', 'city', 'country', 'post_code'] - - class Meta: - abstract = True - - -# Carousel items - -class CarouselItem(LinkFields): - image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' - ) - embed_url = models.URLField("Embed URL", blank=True) - caption = models.CharField(max_length=255, blank=True) - - panels = [ - ImageChooserPanel('image'), - FieldPanel('embed_url'), - FieldPanel('caption'), - MultiFieldPanel(LinkFields.panels, "Link"), - ] - - api_fields = ['image', 'embed_url', 'caption'] + LinkFields.api_fields - - class Meta: - abstract = True - - -# Related links - -class RelatedLink(LinkFields): - title = models.CharField(max_length=255, help_text="Link title") - - panels = [ - FieldPanel('title'), - MultiFieldPanel(LinkFields.panels, "Link"), - ] - - api_fields = ['title'] + LinkFields.api_fields - - class Meta: - abstract = True - - -# Advert Snippet - -class AdvertPlacement(models.Model): - page = ParentalKey('wagtailcore.Page', related_name='advert_placements') - advert = models.ForeignKey('demo.Advert', related_name='+') - - api_fields = ['advert'] - - -@python_2_unicode_compatible -class Advert(models.Model): - page = models.ForeignKey( - 'wagtailcore.Page', - related_name='adverts', - null=True, - blank=True - ) - url = models.URLField(null=True, blank=True) - text = models.CharField(max_length=255) - - panels = [ - PageChooserPanel('page'), - FieldPanel('url'), - FieldPanel('text'), - ] - - api_fields = ['page', 'url', 'text'] - - def __str__(self): - return self.text - -register_snippet(Advert) - - -# Home Page - -class HomePageCarouselItem(Orderable, CarouselItem): - page = ParentalKey('demo.HomePage', related_name='carousel_items') - - -class HomePageRelatedLink(Orderable, RelatedLink): - page = ParentalKey('demo.HomePage', related_name='related_links') - - -class HomePage(Page): - body = StreamField(DemoStreamBlock()) - search_fields = Page.search_fields + [ - index.SearchField('body'), - ] - - api_fields = ['body', 'carousel_items', 'related_links'] - - class Meta: - verbose_name = "Homepage" - -HomePage.content_panels = [ - FieldPanel('title', classname="full title"), - StreamFieldPanel('body'), - InlinePanel('carousel_items', label="Carousel items"), - InlinePanel('related_links', label="Related links"), -] - -HomePage.promote_panels = Page.promote_panels - - -# Standard index page - -class StandardIndexPageRelatedLink(Orderable, RelatedLink): - page = ParentalKey('demo.StandardIndexPage', related_name='related_links') - - -class StandardIndexPage(Page): - intro = RichTextField(blank=True) - feed_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' - ) - - search_fields = Page.search_fields + [ - index.SearchField('intro'), - ] - - api_fields = ['intro', 'feed_image'] - -StandardIndexPage.content_panels = [ - FieldPanel('title', classname="full title"), - FieldPanel('intro', classname="full"), - InlinePanel('related_links', label="Related links"), -] - -StandardIndexPage.promote_panels = Page.promote_panels + [ - ImageChooserPanel('feed_image'), -] - - -# Standard page - -class StandardPageCarouselItem(Orderable, CarouselItem): - page = ParentalKey('demo.StandardPage', related_name='carousel_items') - - -class StandardPageRelatedLink(Orderable, RelatedLink): - page = ParentalKey('demo.StandardPage', related_name='related_links') - - -class StandardPage(Page): - intro = RichTextField(blank=True) - body = RichTextField(blank=True) - feed_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' - ) - - search_fields = Page.search_fields + [ - index.SearchField('intro'), - index.SearchField('body'), - ] - - api_fields = ['intro', 'body', 'feed_image', 'carousel_items', 'related_links'] - -StandardPage.content_panels = [ - FieldPanel('title', classname="full title"), - FieldPanel('intro', classname="full"), - InlinePanel('carousel_items', label="Carousel items"), - FieldPanel('body', classname="full"), - InlinePanel('related_links', label="Related links"), -] - -StandardPage.promote_panels = Page.promote_panels + [ - ImageChooserPanel('feed_image'), -] - - -# Blog index page - -class BlogIndexPageRelatedLink(Orderable, RelatedLink): - page = ParentalKey('demo.BlogIndexPage', related_name='related_links') - - -class BlogIndexPage(Page): - intro = RichTextField(blank=True) - - search_fields = Page.search_fields + [ - index.SearchField('intro'), - ] - - api_fields = ['intro', 'related_links'] - - @property - def blogs(self): - # Get list of live blog pages that are descendants of this page - blogs = BlogPage.objects.live().descendant_of(self) - - # Order by most recent date first - blogs = blogs.order_by('-date') - - return blogs - - def get_context(self, request): - # Get blogs - blogs = self.blogs - - # Filter by tag - tag = request.GET.get('tag') - if tag: - blogs = blogs.filter(tags__name=tag) - - # Pagination - page = request.GET.get('page') - paginator = Paginator(blogs, 10) # Show 10 blogs per page - try: - blogs = paginator.page(page) - except PageNotAnInteger: - blogs = paginator.page(1) - except EmptyPage: - blogs = paginator.page(paginator.num_pages) - - # Update template context - context = super(BlogIndexPage, self).get_context(request) - context['blogs'] = blogs - return context - -BlogIndexPage.content_panels = [ - FieldPanel('title', classname="full title"), - FieldPanel('intro', classname="full"), - InlinePanel('related_links', label="Related links"), -] - -BlogIndexPage.promote_panels = Page.promote_panels - - -# Blog page - -class BlogPageCarouselItem(Orderable, CarouselItem): - page = ParentalKey('demo.BlogPage', related_name='carousel_items') - - -class BlogPageRelatedLink(Orderable, RelatedLink): - page = ParentalKey('demo.BlogPage', related_name='related_links') - - -class BlogPageTag(TaggedItemBase): - content_object = ParentalKey('demo.BlogPage', related_name='tagged_items') - - -class BlogPage(Page): - body = StreamField(DemoStreamBlock()) - tags = ClusterTaggableManager(through=BlogPageTag, blank=True) - date = models.DateField("Post date") - feed_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' - ) - - search_fields = Page.search_fields + [ - index.SearchField('body'), - ] - - api_fields = ['body', 'tags', 'date', 'feed_image', 'carousel_items', 'related_links'] - - @property - def blog_index(self): - # Find closest ancestor which is a blog index - return self.get_ancestors().type(BlogIndexPage).last() - -BlogPage.content_panels = [ - FieldPanel('title', classname="full title"), - FieldPanel('date'), - StreamFieldPanel('body'), - InlinePanel('carousel_items', label="Carousel items"), - InlinePanel('related_links', label="Related links"), -] - -BlogPage.promote_panels = Page.promote_panels + [ - ImageChooserPanel('feed_image'), - FieldPanel('tags'), -] - - -# Person page - -class PersonPageRelatedLink(Orderable, RelatedLink): - page = ParentalKey('demo.PersonPage', related_name='related_links') - - -class PersonPage(Page, ContactFields): - first_name = models.CharField(max_length=255) - last_name = models.CharField(max_length=255) - intro = RichTextField(blank=True) - biography = RichTextField(blank=True) - image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' - ) - feed_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' - ) - - search_fields = Page.search_fields + [ - index.SearchField('first_name'), - index.SearchField('last_name'), - index.SearchField('intro'), - index.SearchField('biography'), - ] - - api_fields = ['first_name', 'last_name', 'intro', 'biography', 'image', 'feed_image'] + ContactFields.api_fields + ['related_links'] - -PersonPage.content_panels = [ - FieldPanel('title', classname="full title"), - FieldPanel('first_name'), - FieldPanel('last_name'), - FieldPanel('intro', classname="full"), - FieldPanel('biography', classname="full"), - ImageChooserPanel('image'), - MultiFieldPanel(ContactFields.panels, "Contact"), - InlinePanel('related_links', label="Related links"), -] - -PersonPage.promote_panels = Page.promote_panels + [ - ImageChooserPanel('feed_image'), -] - - -# Contact page - -class ContactPage(Page, ContactFields): - body = RichTextField(blank=True) - feed_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' - ) - - search_fields = Page.search_fields + [ - index.SearchField('body'), - ] - - api_fields = ['body', 'feed_image'] + ContactFields.api_fields - -ContactPage.content_panels = [ - FieldPanel('title', classname="full title"), - FieldPanel('body', classname="full"), - MultiFieldPanel(ContactFields.panels, "Contact"), -] - -ContactPage.promote_panels = Page.promote_panels + [ - ImageChooserPanel('feed_image'), -] - - -# Event index page - -class EventIndexPageRelatedLink(Orderable, RelatedLink): - page = ParentalKey('demo.EventIndexPage', related_name='related_links') - - -class EventIndexPage(Page): - intro = RichTextField(blank=True) - - search_fields = Page.search_fields + [ - index.SearchField('intro'), - ] - - api_fields = ['intro', 'related_links'] - - @property - def events(self): - # Get list of live event pages that are descendants of this page - events = EventPage.objects.live().descendant_of(self) - - # Filter events list to get ones that are either - # running now or start in the future - events = events.filter(date_from__gte=date.today()) - - # Order by date - events = events.order_by('date_from') - - return events - -EventIndexPage.content_panels = [ - FieldPanel('title', classname="full title"), - FieldPanel('intro', classname="full"), - InlinePanel('related_links', label="Related links"), -] - -EventIndexPage.promote_panels = Page.promote_panels - - -# Event page - -class EventPageCarouselItem(Orderable, CarouselItem): - page = ParentalKey('demo.EventPage', related_name='carousel_items') - - -class EventPageRelatedLink(Orderable, RelatedLink): - page = ParentalKey('demo.EventPage', related_name='related_links') - - -class EventPageSpeaker(Orderable, LinkFields): - page = ParentalKey('demo.EventPage', related_name='speakers') - first_name = models.CharField("Name", max_length=255, blank=True) - last_name = models.CharField("Surname", max_length=255, blank=True) - image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' - ) - - @property - def name_display(self): - return self.first_name + " " + self.last_name - - panels = [ - FieldPanel('first_name'), - FieldPanel('last_name'), - ImageChooserPanel('image'), - MultiFieldPanel(LinkFields.panels, "Link"), - ] - - api_fields = ['first_name', 'last_name', 'image'] - - -class EventPage(Page): - date_from = models.DateField("Start date") - date_to = models.DateField( - "End date", - null=True, - blank=True, - help_text="Not required if event is on a single day" - ) - time_from = models.TimeField("Start time", null=True, blank=True) - time_to = models.TimeField("End time", null=True, blank=True) - audience = models.CharField(max_length=255, choices=EVENT_AUDIENCE_CHOICES) - location = models.CharField(max_length=255) - body = RichTextField(blank=True) - cost = models.CharField(max_length=255) - signup_link = models.URLField(blank=True) - feed_image = models.ForeignKey( - 'wagtailimages.Image', - null=True, - blank=True, - on_delete=models.SET_NULL, - related_name='+' - ) - - search_fields = Page.search_fields + [ - index.SearchField('get_audience_display'), - index.SearchField('location'), - index.SearchField('body'), - ] - - api_fields = ['date_from', 'date_to', 'time_from', 'time_to', 'audience', 'location', 'body', 'cost', 'signup_link', 'feed_image', 'speakers', 'carousel_items', 'related_links'] - - @property - def event_index(self): - # Find closest ancestor which is an event index - return self.get_ancestors().type(EventIndexPage).last() - - def serve(self, request): - if "format" in request.GET: - if request.GET['format'] == 'ical': - # Export to ical format - response = HttpResponse( - export_event(self, 'ical'), - content_type='text/calendar', - ) - response['Content-Disposition'] = 'attachment; filename=' + self.slug + '.ics' - return response - else: - # Unrecognised format error - message = 'Could not export event\n\nUnrecognised format: ' + request.GET['format'] - return HttpResponse(message, content_type='text/plain') - else: - # Display event page as usual - return super(EventPage, self).serve(request) - -EventPage.content_panels = [ - FieldPanel('title', classname="full title"), - FieldPanel('date_from'), - FieldPanel('date_to'), - FieldPanel('time_from'), - FieldPanel('time_to'), - FieldPanel('location'), - FieldPanel('audience'), - FieldPanel('cost'), - FieldPanel('signup_link'), - InlinePanel('carousel_items', label="Carousel items"), - FieldPanel('body', classname="full"), - InlinePanel('speakers', label="Speakers"), - InlinePanel('related_links', label="Related links"), -] - -EventPage.promote_panels = Page.promote_panels + [ - ImageChooserPanel('feed_image'), -] - - -class FormField(AbstractFormField): - page = ParentalKey('FormPage', related_name='form_fields') - - -class FormPage(AbstractEmailForm): - intro = RichTextField(blank=True) - thank_you_text = RichTextField(blank=True) - -FormPage.content_panels = [ - FieldPanel('title', classname="full title"), - FieldPanel('intro', classname="full"), - InlinePanel('form_fields', label="Form fields"), - FieldPanel('thank_you_text', classname="full"), - MultiFieldPanel([ - FieldRowPanel([ - FieldPanel('from_address', classname="col6"), - FieldPanel('to_address', classname="col6"), - ]), - FieldPanel('subject'), - ], "Email"), -] diff --git a/examples/wagtaildemo/demo/static/demo/css/admin-streamfield-styles.css b/examples/wagtaildemo/demo/static/demo/css/admin-streamfield-styles.css deleted file mode 100644 index 2f8ad2b3..00000000 --- a/examples/wagtaildemo/demo/static/demo/css/admin-streamfield-styles.css +++ /dev/null @@ -1,63 +0,0 @@ -/* Example styling for an intro field */ - -.fieldname-intro input, -.fieldname-intro textarea, -.fieldname-intro .richtext{ - font-size:1.4em; -} - -/* Example styling for a blockquote block, where labels aren't required */ - -.blockname-pullquote .fields label{ - display:none; -} - -.blockname-pullquote .fields input, -.blockname-pullquote .fields textarea{ - border:0; - background-color:transparent; - padding:0; -} - -.fieldname-quote .input{ - position: relative; - padding-left: 3em; - padding-right: 3em; -} - - .fieldname-quote .input:before, - .fieldname-quote .input:after{ - content: "\201C"; - position: absolute; - font-family: Bitter, Georgia, Serif; - font-size: 5em; - line-height: 1em; - color :#CCC; - } - - .fieldname-quote .input:before{ - left: 0; - } - .fieldname-quote .input:after{ - right: 0; - top: 0; - } - - .fieldname-quote textarea{ - font-size: 2em; - font-family: Bitter, Georgia, Serif; - } - -.fieldname-attribution .field-content{ - margin-left:2em; -} - .fieldname-attribution .input{ - padding-left:1em; - position:relative; - } - .fieldname-attribution .input:before{ - content: "—"; - position: absolute; - left: 0; - - } diff --git a/examples/wagtaildemo/demo/static/demo/css/main.scss b/examples/wagtaildemo/demo/static/demo/css/main.scss deleted file mode 100644 index dd83dac3..00000000 --- a/examples/wagtaildemo/demo/static/demo/css/main.scss +++ /dev/null @@ -1,162 +0,0 @@ -$navbar-height: 51px; -$padding-vertical: 15px; -$wagtail-color: rgb(0, 127, 127); -$html-background-color: whitesmoke; - -@import url(http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700); - -html { - background-color: $html-background-color; -} - -/* fonts */ -body { - font-family: 'Open Sans', Helvetica, Arial, sans-serif; -} - - -/* body image styles - classes supplied by rich text editor */ -.body-content { - width: 100%; - overflow: hidden; - clear: both; - margin-bottom: 1em; - img { - margin-bottom: 2%; - margin-top: 2%; - } - - img.full-width { - width: 100%; - } - - img.left{ - width: 45%; - margin-right: 5%; - float: left; - } - - img.right{ - width: 45%; - margin-left: 5%; - float: right; - } - - h1, h2, h3, h4, h5 { - clear: both; - } -} - - -.img-wrapper { - margin-bottom: 1em; - position: relative; - - img { - display: block; - width: 100%; - margin-bottom:0; - } - - &.left { - float:left; - width: 45%; - margin-right: 5%; - } - &.right { - float:right; - width: 45%; - margin-left: 5%; - } -} - -.intro{ - font-size:1.4em; -} - -.caption { - padding: 0.2em 1em 0.2em 0.5em; - margin: 0; - font-weight: 400; - background: #F2f2f2; - font-style: italic; - display: inline-block; - z-index: 2; - position: absolute; - bottom: 5px; - left: 5px; - font-size: 0.9em; - max-width: calc(100% - 10px); - - p{ - margin:0 !important; - } -} - -blockquote{ - margin:2em 0; - - span{ - display:block; - color: #AAA; - font-size:0.8em; - } -} - - -/* List styling - tweaks to include images */ - -a.list-group-item { - clear: both; - width: 100%; - overflow: hidden; - .list-group-item-text { - margin-top: 1%; - img { - float: left; - margin-right: 2%; - margin-bottom: 1%; - } - } -} - -/* Style pager */ -.col-sm-4.pages { - text-align: center; -} - -.col-sm-4.next { - text-align: right; -} - -.main { - padding-top: $navbar-height + $padding-vertical; - min-height: 700px; -} - -.carousel { - margin-bottom: $padding-vertical; - .carousel-caption { - background-color: transparentize($wagtail-color, 0.4); - padding-top: 0; - .btn { - margin-bottom: 10px; - } - } -} - -p { - text-align: justify; - - &:last-child { - margin-bottom: 0; - } -} - -.advert-list { - margin-top: $padding-vertical; - margin-bottom: 0; - padding: $padding-vertical 0; - background-color: $html-background-color; - border-top: 1px solid darken($html-background-color, 25%); -} diff --git a/examples/wagtaildemo/demo/static/demo/images/favicon.ico b/examples/wagtaildemo/demo/static/demo/images/favicon.ico deleted file mode 100644 index 5cf8871b..00000000 Binary files a/examples/wagtaildemo/demo/static/demo/images/favicon.ico and /dev/null differ diff --git a/examples/wagtaildemo/demo/static/demo/js/main.js b/examples/wagtaildemo/demo/static/demo/js/main.js deleted file mode 100644 index 208cf4fb..00000000 --- a/examples/wagtaildemo/demo/static/demo/js/main.js +++ /dev/null @@ -1,7 +0,0 @@ -$(document).ready(function(){ - // Initializes tooltips - $('[title]').tooltip({container: 'body'}); - - //Apply img-thumbnail class to body-content images - $('.body-content img').addClass("img-thumbnail"); -}); \ No newline at end of file diff --git a/examples/wagtaildemo/demo/static/demo/js/vendor/fluidvids-README.md b/examples/wagtaildemo/demo/static/demo/js/vendor/fluidvids-README.md deleted file mode 100755 index 4ccec0dd..00000000 --- a/examples/wagtaildemo/demo/static/demo/js/vendor/fluidvids-README.md +++ /dev/null @@ -1,62 +0,0 @@ -# FluidVids.js [![Build Status](https://travis-ci.org/toddmotto/fluidvids.png)](https://travis-ci.org/toddmotto/fluidvids) - -FluidVids is a raw JavaScript solution for responsive and fluid YouTube and Vimeo video embeds. It's extremely lightweight, and comes with a minified version for production environments. FluidVids comes preconfigured to make YouTube and Vimeo videos fluid, but you can add more as you please. You don't need to call FluidVids, it will just work its magic on video embeds automatically. - -## Demo -Check out a [demo of FluidVids](http://toddmotto.com/labs/fluidvids). - -## Installing with Bower -To install FluidVids into your project using Bower, use the GitHub repository hook: - -``` -bower install https://github.com/toddmotto/fluidvids.git -``` - -## Manual installation -Drop your files into your required folders, make sure you're using the files from the `dist` folder, which is the compiled production-ready code. Ensure you place the script before the closing `` tag so the DOM tree is populated when the script runs. - -```html - - - - -``` - -## Scaffolding -Project files and folder structure. - -``` -├── dist/ -│ ├── fluidvids.js -│ └── fluidvids.min.js -├── src/ -│ └── fluidvids.js -├── .editorconfig -├── .gitignore -├── .jshintrc -├── .travis.yml -├── Gruntfile.js -├── config.json -└── package.json -``` - -## Grunt tasks -FluidVids comes pre-configured with `Gruntfile.js` which contains all of Grunt's tasks. These tasks are `grunt-contrib-concat` for concatenating files, `grunt-contrib-jshint` for JSHinting the project files, `grunt-contrib-uglify` for minifying the code. The hidden file `.jshintrc` contains the configuration for the JSHint tests. - -## Adding more video players -FluidVids use a Regular Expression and searches the `src=""` attribute of any `iframe` tags on the page. If the RegExp matches the attribute, FluidVids will then do it's thing and make your videos responsive. - -Here's the line you'll need to change: - -```javascript -players = /www.youtube.com|player.vimeo.com/; -``` - -The dividing `|` operator is essentially 'or' in RegExp. For instance, if you wanted to add the no cookies version of YouTube, you could action the following: - -```javascript -players = /www.youtube.com|www.youtube-nocookie.com|player.vimeo.com/; -``` - -## License -MIT license \ No newline at end of file diff --git a/examples/wagtaildemo/demo/static/demo/js/vendor/fluidvids.js b/examples/wagtaildemo/demo/static/demo/js/vendor/fluidvids.js deleted file mode 100644 index f78d993c..00000000 --- a/examples/wagtaildemo/demo/static/demo/js/vendor/fluidvids.js +++ /dev/null @@ -1,52 +0,0 @@ -window.Fluidvids = (function (window, document, undefined) { - - 'use strict'; - - var players, obj; - var head = document.head || document.getElementsByTagName('head')[0]; - var css = '.fluidvids-elem{position:absolute;top:0px;left:0px;width:100%;' + - 'height:100%;}.fluidvids{width:100%;position:relative;}'; - - var _matchesPlayer = function (source) { - players = new RegExp('^(https?:)?\/\/(?:' + obj.join('|') + ').*$', 'i'); - return players.test(source); - }; - - var _render = function (elem) { - var wrap = document.createElement('div'); - var thisParent = elem.parentNode; - var ratio = (parseInt(elem.height ? elem.height : elem.offsetHeight, 10) / - (parseInt(elem.width ? elem.width : elem.offsetWidth, 10)) * 100); - - thisParent.insertBefore(wrap, elem); - elem.className += ' fluidvids-elem'; - wrap.className += ' fluidvids'; - wrap.style.paddingTop = ratio + '%'; - wrap.appendChild(elem); - }; - - var _appendStyles = function () { - var div = document.createElement('div'); - div.innerHTML = '

x

'; - head.appendChild(div.childNodes[1]); - }; - - var init = function (object) { - var options = object || {}; - var selector = options.selector || 'iframe'; - obj = options.players || ['www.youtube.com', 'player.vimeo.com']; - var nodes = document.querySelectorAll(selector); - for (var i = 0; i < nodes.length; i++) { - var self = nodes[i]; - if (_matchesPlayer(self.src)) { - _render(self); - } - } - _appendStyles(); - }; - - return { - init: init - }; - -})(window, document); diff --git a/examples/wagtaildemo/demo/templates/demo/base.html b/examples/wagtaildemo/demo/templates/demo/base.html deleted file mode 100644 index 02078806..00000000 --- a/examples/wagtaildemo/demo/templates/demo/base.html +++ /dev/null @@ -1,89 +0,0 @@ -{% load demo_tags cache compress static wagtailuserbar %} - - - - - - - - - - {% block title %}{% if self.seo_title %}{{ self.seo_title }}{% else %}{{ self.title }}{% endif %}{% endblock %}{% block title_postfix %} | Wagtail Demo{% endblock %} - - - - {# External stylesheets #} - - - {# Local static assets such as css, images and javascrpt should be stored at [yourapp]/static/[yourapp]/... #} - {% compress css %} - {# Custom stylesheets #} - {# SCSS compilation relies on django compressor #} - - {% endcompress %} - - {% block extra_css %}{% endblock %} {# Override this block in individual templates in order to add stylesheets on a template by template basis #} - - {# Javascript that needs to be called from head e.g. google analytics snippet and bootstrap shivs #} - - - - - - - - {# Override this block to set custom body classes on a template by template basis #} - - {% wagtailuserbar %} - - {% block menu %} - {% get_site_root as site_root %} - {% top_menu parent=site_root calling_page=self %} - {% endblock %} - -
- - {% breadcrumbs %} - - {% block heading %} - - {% endblock %} - - {% block content %}{% endblock %} - - {% include 'demo/includes/prev_next.html' %} - -
- - {% adverts %} - - {# External javascript #} - - - - {% compress js %} - - {# Custom javascript #} - {# Local static assets such as css, images and javascrpt should be stored at [yourapp]/static/[yourapp]/... #} - - {% endcompress %} - - {% block extra_js %}{% endblock %} {# Override this block in individual templates in order to add javascript on a template by template basis #} - - - diff --git a/examples/wagtaildemo/demo/templates/demo/blog_index_page.html b/examples/wagtaildemo/demo/templates/demo/blog_index_page.html deleted file mode 100644 index 91f97a05..00000000 --- a/examples/wagtaildemo/demo/templates/demo/blog_index_page.html +++ /dev/null @@ -1,41 +0,0 @@ -{% extends "demo/base.html" %} - -{% load wagtailcore_tags %} - -{% block content %} - {% include "demo/includes/intro.html" with intro=self.intro only %} - - {% if request.GET.tag|length %} -

Showing posts tagged as {{ request.GET.tag }} Show all

- {% endif %} - -
- {# Uses serve method defined in models.py - allows for paging if required #} - {# See also standard index for creating a listing with a tag #} - {% for blog in blogs %} - {% include "demo/includes/blog_list_item.html" %} - {% empty %} - No blogs found - {% endfor %} -
- - {# Pagination - uses django.core.paginator #} - {# Append any other url query string variables to the next and previous links - allows tag to be passed through #} -
- -
- Page {{ blogs.number }} of {{ blogs.paginator.num_pages }} -
- -
- - {% include "demo/includes/related_links.html" with related_links=self.related_links.all only %} -{% endblock %} diff --git a/examples/wagtaildemo/demo/templates/demo/blog_page.html b/examples/wagtaildemo/demo/templates/demo/blog_page.html deleted file mode 100644 index 59da38ed..00000000 --- a/examples/wagtaildemo/demo/templates/demo/blog_page.html +++ /dev/null @@ -1,35 +0,0 @@ -{% extends "demo/base.html" %} -{% load wagtailcore_tags %} - - -{% block heading %} - -{% endblock %} - -{% block content %} - {% include "demo/includes/carousel.html" with carousel_items=self.carousel_items.all only %} - - {% if self.body %} -
- {% include "demo/includes/streamfield.html" with content=self.body %} -
- {% endif %} - - {% include "demo/includes/related_links.html" with related_links=self.related_links.all only %} -{% endblock %} diff --git a/examples/wagtaildemo/demo/templates/demo/contact_page.html b/examples/wagtaildemo/demo/templates/demo/contact_page.html deleted file mode 100644 index 2cdb993b..00000000 --- a/examples/wagtaildemo/demo/templates/demo/contact_page.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "demo/base.html" %} - -{% load demo_tags wagtailcore_tags %} - -{% block content %} - {% if self.body %} -
- {{ self.body|richtext }} -
- {% endif %} - - {% include "demo/includes/contact.html" with contact=self only %} - - {% if self.post_code %} - - {% get_google_maps_key as google_maps_key %} - - - - - {% endif %} -{% endblock %} diff --git a/examples/wagtaildemo/demo/templates/demo/event_index_page.html b/examples/wagtaildemo/demo/templates/demo/event_index_page.html deleted file mode 100644 index ad9448c4..00000000 --- a/examples/wagtaildemo/demo/templates/demo/event_index_page.html +++ /dev/null @@ -1,20 +0,0 @@ -{% extends "demo/base.html" %} -{% load wagtailcore_tags wagtailimages_tags %} - -{% block content %} - {% include "demo/includes/intro.html" with intro=self.intro only %} - - {# Uses method defined in models.py to retrieve all upcoming events #} - {# See also standard index for creating a listing with a tag #} - {% with self.events.all as events %} - {% if events %} -
- {% for event in events %} - {% include "demo/includes/event_list_item.html" %} - {% endfor %} -
- {% endif %} - {% endwith %} - - {% include "demo/includes/related_links.html" with related_links=self.related_links.all only %} -{% endblock %} diff --git a/examples/wagtaildemo/demo/templates/demo/event_page.html b/examples/wagtaildemo/demo/templates/demo/event_page.html deleted file mode 100644 index 50732eb2..00000000 --- a/examples/wagtaildemo/demo/templates/demo/event_page.html +++ /dev/null @@ -1,68 +0,0 @@ -{% extends "demo/base.html" %} -{% load demo_tags wagtailcore_tags wagtailimages_tags %} - -{% block content %} -
-

- {{ self.date_from }}{% if self.date_to %} to {{ self.date_to }}{% endif %} - {% if self.time_from %}{{ self.time_from|time }}{% endif %}{% if self.time_to %} to {{ self.time_to|time }}{% endif %} -

- {% if self.location %}

Location: {{ self.location }}

{% endif %} - {% if self.audience %} -

Audience: - {# From EVENT_AUDIENCE_CHOICES in models.py #} - {{ self.get_audience_display }}

- {% endif %} - {% if self.cost %} -

Cost: {{ self.cost }}

- {% endif %} - - {% if self.signup_link %} -

Sign up: {{ self.signup_link }}

- {% endif %} - -

- - Add to calendar - -

-
- - {% include "demo/includes/carousel.html" with carousel_items=self.carousel_items.all only %} - - {% if self.body %} -
- {{ self.body|richtext }} -
- {% endif %} - - {% with self.speakers.all as speakers %} - {% if speakers %} - - {% for speaker in speakers %} - {% cycle '
' '' '' %} {# Open row div before first speaker then every 3 loops #} -
- - {% if speaker.link %} - - {% endif %} - - {# Speaker name_display fields concatenates first_name and last_name fields #} -

{{ speaker.name_display }}

- {% if speaker.image %} -
{% image speaker.image width-200 %}
- {% endif %} - - {% if speaker.link %} -
- {% endif %} -
- {% cycle '' '' '
' %} {# Close row div before every 3rd speaker #} - {% endfor %} - {% if not speakers|length|divisibleby:'3' %}{% endif %} {# Last close of row div if speakers list not exactly divisble by 3 #} - {% endif %} - {% endwith %} - - - {% include "demo/includes/related_links.html" with related_links=self.related_links.all only %} -{% endblock %} diff --git a/examples/wagtaildemo/demo/templates/demo/form_page.html b/examples/wagtaildemo/demo/templates/demo/form_page.html deleted file mode 100644 index c3970ce1..00000000 --- a/examples/wagtaildemo/demo/templates/demo/form_page.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "demo/base.html" %} -{% load wagtailcore_tags %} - -{% block content %} - {% include "demo/includes/intro.html" with intro=self.intro only %} - -
- {% csrf_token %} - {{ form.as_p }} - -
-{% endblock %} diff --git a/examples/wagtaildemo/demo/templates/demo/form_page_landing.html b/examples/wagtaildemo/demo/templates/demo/form_page_landing.html deleted file mode 100644 index 88a364e8..00000000 --- a/examples/wagtaildemo/demo/templates/demo/form_page_landing.html +++ /dev/null @@ -1,6 +0,0 @@ -{% extends "demo/base.html" %} -{% load wagtailcore_tags %} - -{% block content %} - {{ self.thank_you_text|richtext }} -{% endblock %} diff --git a/examples/wagtaildemo/demo/templates/demo/home_page.html b/examples/wagtaildemo/demo/templates/demo/home_page.html deleted file mode 100644 index 929ac55d..00000000 --- a/examples/wagtaildemo/demo/templates/demo/home_page.html +++ /dev/null @@ -1,30 +0,0 @@ -{% extends "demo/base.html" %} -{% load demo_tags %} - - -{% block heading %} -
-

Wagtail Demo

-

A set of demo templates to show you what Wagtail can do.

- {% block search_box %} - {% include "demo/includes/search_box.html" only %} - {% endblock %} -
-{% endblock %} - - -{% block content %} - {% include "demo/includes/carousel.html" with carousel_items=self.carousel_items.all only %} - - {% if self.body %} -
- {% include "demo/includes/streamfield.html" with content=self.body %} -
- {% endif %} - - {% person_listing_homepage %} - - {% blog_listing_homepage %} - - {% event_listing_homepage %} -{% endblock %} diff --git a/examples/wagtaildemo/demo/templates/demo/includes/blog_list_item.html b/examples/wagtaildemo/demo/templates/demo/includes/blog_list_item.html deleted file mode 100644 index 42563aa7..00000000 --- a/examples/wagtaildemo/demo/templates/demo/includes/blog_list_item.html +++ /dev/null @@ -1,20 +0,0 @@ -{% load wagtailcore_tags wagtailimages_tags %} - -{# Individual blog item in a list - used on blog index and home page #} - -
- {% if blog.feed_image %} -
- {% image blog.feed_image width-200 as img %} - -
- {% endif %} -
-

{{ blog.title }}

-

{{ blog.date }}

- {% if blog.search_description %} -

{{ blog.search_description }}

- {% endif %} -
-
-
diff --git a/examples/wagtaildemo/demo/templates/demo/includes/carousel.html b/examples/wagtaildemo/demo/templates/demo/includes/carousel.html deleted file mode 100644 index 6f1771ca..00000000 --- a/examples/wagtaildemo/demo/templates/demo/includes/carousel.html +++ /dev/null @@ -1,50 +0,0 @@ -{% load wagtailimages_tags wagtailembeds_tags %} - - -{% if carousel_items %} - -{% endif %} diff --git a/examples/wagtaildemo/demo/templates/demo/includes/contact.html b/examples/wagtaildemo/demo/templates/demo/includes/contact.html deleted file mode 100644 index 850a51cd..00000000 --- a/examples/wagtaildemo/demo/templates/demo/includes/contact.html +++ /dev/null @@ -1,44 +0,0 @@ - -
-
-
- {% if contact.address_1 %} -
Address 1
-
{{ contact.address_1 }}
- {% endif %} - - {% if contact.address_2 %} -
Address 2
-
{{ contact.address_2 }}
- {% endif %} - - {% if contact.city %} -
City
-
{{ contact.city }}
- {% endif %} - - {% if contact.country %} -
Country
-
{{ contact.country }}
- {% endif %} - - {% if contact.post_code %} -
Post code
-
{{ contact.post_code }}
- {% endif %} -
-
- {% if contact.telephone %} -
Telephone
-
{{ contact.telephone }}
- {% endif %} - - {% if contact.email %} -
Email
-
{{ contact.email }}
- {% endif %} -
-
-
-
-
\ No newline at end of file diff --git a/examples/wagtaildemo/demo/templates/demo/includes/event_list_item.html b/examples/wagtaildemo/demo/templates/demo/includes/event_list_item.html deleted file mode 100644 index b33893af..00000000 --- a/examples/wagtaildemo/demo/templates/demo/includes/event_list_item.html +++ /dev/null @@ -1,20 +0,0 @@ -{% load wagtailcore_tags wagtailimages_tags %} - -{# Individual event item in a list - used on event index and home page #} - -
- {% if event.feed_image %} -
- {% image event.feed_image width-200 as img %} - -
- {% endif %} -
-

{{ event.title }}

-

{{ event.date_from }}{% if event.date_to %} to {{ event.date_to }}{% endif %}

- {% if event.search_description %} -

{{ event.search_description }}

- {% endif %} -
-
-
diff --git a/examples/wagtaildemo/demo/templates/demo/includes/intro.html b/examples/wagtaildemo/demo/templates/demo/includes/intro.html deleted file mode 100644 index b98106f3..00000000 --- a/examples/wagtaildemo/demo/templates/demo/includes/intro.html +++ /dev/null @@ -1,7 +0,0 @@ -{% load wagtailcore_tags %} - -{% if intro %} -
- {{ intro|richtext }} -
-{% endif %} \ No newline at end of file diff --git a/examples/wagtaildemo/demo/templates/demo/includes/person_list_item.html b/examples/wagtaildemo/demo/templates/demo/includes/person_list_item.html deleted file mode 100644 index 6c2f2ed1..00000000 --- a/examples/wagtaildemo/demo/templates/demo/includes/person_list_item.html +++ /dev/null @@ -1,19 +0,0 @@ -{% load wagtailcore_tags wagtailimages_tags %} - -{# Individual person item in a list - used on people index and home page #} - -
- {% if person.feed_image %} -
- {% image person.feed_image width-200 as img %} - -
- {% endif %} -
-

{{ person.first_name }} {{ person.last_name }}

- {% if person.search_description %} -

{{ person.search_description }}

- {% endif %} -
-
-
diff --git a/examples/wagtaildemo/demo/templates/demo/includes/prev_next.html b/examples/wagtaildemo/demo/templates/demo/includes/prev_next.html deleted file mode 100644 index 34100151..00000000 --- a/examples/wagtaildemo/demo/templates/demo/includes/prev_next.html +++ /dev/null @@ -1,22 +0,0 @@ -{% load wagtailcore_tags %} - -{% if self.depth > 3 %}{# Previous and next buttons are not relevant for the home page and categories #} - {% with prev=self.get_prev_siblings.live.first next=self.get_next_siblings.live.first %} - - {% endwith %} -{% endif %} diff --git a/examples/wagtaildemo/demo/templates/demo/includes/related_links.html b/examples/wagtaildemo/demo/templates/demo/includes/related_links.html deleted file mode 100644 index 467b880c..00000000 --- a/examples/wagtaildemo/demo/templates/demo/includes/related_links.html +++ /dev/null @@ -1,19 +0,0 @@ -{% if related_links %} - -
-
-
-
-

Related links

-
-
- -
-
-
-
-{% endif %} diff --git a/examples/wagtaildemo/demo/templates/demo/includes/search_box.html b/examples/wagtaildemo/demo/templates/demo/includes/search_box.html deleted file mode 100644 index 568f4bb4..00000000 --- a/examples/wagtaildemo/demo/templates/demo/includes/search_box.html +++ /dev/null @@ -1,14 +0,0 @@ -
-
-
-
- -
- -
-
-
-
-
diff --git a/examples/wagtaildemo/demo/templates/demo/includes/streamfield.html b/examples/wagtaildemo/demo/templates/demo/includes/streamfield.html deleted file mode 100644 index 64928512..00000000 --- a/examples/wagtaildemo/demo/templates/demo/includes/streamfield.html +++ /dev/null @@ -1,46 +0,0 @@ -{% load wagtailcore_tags wagtailimages_tags %} - -
- {% for child in content %} - {% if child.block_type == 'h2' %} -

{{ child }}

- {% elif child.block_type == 'h3' %} -

{{ child }}

- {% elif child.block_type == 'h4' %} -

{{ child }}

- {% elif child.block_type == 'intro' %} -
{{ child }}
- {% elif child.block_type == 'aligned_html' %} - {% if child.value.alignment == 'normal' %} - {{ child.value.bound_blocks.html.render }} - {% else %} - {{ child.value.bound_blocks.html.render }} - {% endif %} - {% elif child.block_type == 'pullquote' %} -
- {{ child.value.quote }} - {% if child.value.attribution %}- {{ child.value.attribution }}{% endif %} -
- {% elif child.block_type == 'paragraph' %} - {{ child.value|richtext }} - {% elif child.block_type == 'aligned_image' %} -
- {% if child.value.alignment == "left" or child.value.alignment == "right" %} - {% image child.value.image width-300 as theimage %} - {% else %} - {% image child.value.image width-1280 as theimage %} - {% endif %} - - {{ theimage.alt }} - - {% if child.value.caption %} -
- {{ child.value.caption|richtext }} -
- {% endif %} -
- {% else %} - {{ child }} - {% endif %} - {% endfor %} -
\ No newline at end of file diff --git a/examples/wagtaildemo/demo/templates/demo/person_page.html b/examples/wagtaildemo/demo/templates/demo/person_page.html deleted file mode 100644 index 944ffbfe..00000000 --- a/examples/wagtaildemo/demo/templates/demo/person_page.html +++ /dev/null @@ -1,24 +0,0 @@ -{% extends "demo/base.html" %} -{% load wagtailcore_tags wagtailimages_tags %} - -{% block content %} - {% include "demo/includes/intro.html" with intro=self.intro only %} - - {% if self.image %} - {% image self.image width-300 class="img-thumbnail" %} - {% endif %} - - {% if self.biography %} - - {% endif %} - - {% if self.body %} -
- {{ self.body|richtext }} -
- {% endif %} - - {% include "demo/includes/contact.html" with contact=self only %} - - {% include "demo/includes/related_links.html" with related_links=self.related_links.all only %} -{% endblock %} diff --git a/examples/wagtaildemo/demo/templates/demo/search_results.html b/examples/wagtaildemo/demo/templates/demo/search_results.html deleted file mode 100644 index 31a02c81..00000000 --- a/examples/wagtaildemo/demo/templates/demo/search_results.html +++ /dev/null @@ -1,44 +0,0 @@ -{% extends "demo/base.html" %} -{% load wagtailcore_tags %} - -{% block title %}Search{% if search_results %} results{% endif %}{% endblock %} - -{% block heading %} -

- Search results{% if request.GET.query %} for “{{ request.GET.query }}”{% endif %} -

-{% endblock %} - - -{% block content %} - {% if search_picks %} -
-

Editors picks

- -
- {% endif %} - - {% if search_results %} - - {% elif search_query %} - No results found - {% else %} - You didn’t search anything! - {% endif %} -{% endblock %} diff --git a/examples/wagtaildemo/demo/templates/demo/standard_index_page.html b/examples/wagtaildemo/demo/templates/demo/standard_index_page.html deleted file mode 100644 index 870d43b7..00000000 --- a/examples/wagtaildemo/demo/templates/demo/standard_index_page.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "demo/base.html" %} -{% load wagtailcore_tags demo_tags %} - -{% block content %} - {% include "demo/includes/intro.html" with intro=self.intro only %} - - {# Listing created with a tag - allows filtering by whether the page is live #} - {# See also the blog index or events index where the listing is created from a method defined in models.py #} - {% standard_index_listing calling_page=self %} - - {% include "demo/includes/related_links.html" with related_links=self.related_links.all only %} -{% endblock %} diff --git a/examples/wagtaildemo/demo/templates/demo/standard_page.html b/examples/wagtaildemo/demo/templates/demo/standard_page.html deleted file mode 100644 index f59ed434..00000000 --- a/examples/wagtaildemo/demo/templates/demo/standard_page.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "demo/base.html" %} - -{% load wagtailcore_tags %} - -{% block content %} - {% include "demo/includes/intro.html" with intro=self.intro only %} - - {% include "demo/includes/carousel.html" with carousel_items=self.carousel_items.all only %} - - {% if self.body %} -
- {{ self.body|richtext }} -
- {% endif %} - - {% include "demo/includes/related_links.html" with related_links=self.related_links.all only %} -{% endblock %} diff --git a/examples/wagtaildemo/demo/templates/demo/tags/adverts.html b/examples/wagtaildemo/demo/templates/demo/tags/adverts.html deleted file mode 100644 index 36e2d402..00000000 --- a/examples/wagtaildemo/demo/templates/demo/tags/adverts.html +++ /dev/null @@ -1,18 +0,0 @@ -{% load wagtailcore_tags %} - -{% if adverts %} - -{% endif %} diff --git a/examples/wagtaildemo/demo/templates/demo/tags/blog_listing_homepage.html b/examples/wagtaildemo/demo/templates/demo/tags/blog_listing_homepage.html deleted file mode 100644 index 7873b0b5..00000000 --- a/examples/wagtaildemo/demo/templates/demo/tags/blog_listing_homepage.html +++ /dev/null @@ -1,10 +0,0 @@ -{% if blogs %} -
-

Recent blog posts

-
- {% for blog in blogs %} - {% include "demo/includes/blog_list_item.html" %} - {% endfor %} -
-
-{% endif %} diff --git a/examples/wagtaildemo/demo/templates/demo/tags/breadcrumbs.html b/examples/wagtaildemo/demo/templates/demo/tags/breadcrumbs.html deleted file mode 100644 index b75cc276..00000000 --- a/examples/wagtaildemo/demo/templates/demo/tags/breadcrumbs.html +++ /dev/null @@ -1,13 +0,0 @@ -{% load wagtailcore_tags %} - -{% if ancestors %} - -{% endif %} diff --git a/examples/wagtaildemo/demo/templates/demo/tags/event_listing_homepage.html b/examples/wagtaildemo/demo/templates/demo/tags/event_listing_homepage.html deleted file mode 100644 index 8e6c54e2..00000000 --- a/examples/wagtaildemo/demo/templates/demo/tags/event_listing_homepage.html +++ /dev/null @@ -1,10 +0,0 @@ -{% if events %} -
-

Upcoming events

-
- {% for event in events %} - {% include "demo/includes/event_list_item.html" %} - {% endfor %} -
-
-{% endif %} diff --git a/examples/wagtaildemo/demo/templates/demo/tags/person_listing_homepage.html b/examples/wagtaildemo/demo/templates/demo/tags/person_listing_homepage.html deleted file mode 100644 index d8fd3636..00000000 --- a/examples/wagtaildemo/demo/templates/demo/tags/person_listing_homepage.html +++ /dev/null @@ -1,10 +0,0 @@ -{% if people %} -
-

People

-
- {% for person in people %} - {% include "demo/includes/person_list_item.html" %} - {% endfor %} -
-
-{% endif %} diff --git a/examples/wagtaildemo/demo/templates/demo/tags/standard_index_listing.html b/examples/wagtaildemo/demo/templates/demo/tags/standard_index_listing.html deleted file mode 100644 index e5cdc7d2..00000000 --- a/examples/wagtaildemo/demo/templates/demo/tags/standard_index_listing.html +++ /dev/null @@ -1,13 +0,0 @@ -{% load wagtailcore_tags %} -{% if pages %} -
- {% for page in pages %} - -

{{ page.title }}

- {% if page.search_description %} -

{{ page.search_description }}

- {% endif %} -
- {% endfor %} -
-{% endif %} \ No newline at end of file diff --git a/examples/wagtaildemo/demo/templates/demo/tags/top_menu.html b/examples/wagtaildemo/demo/templates/demo/tags/top_menu.html deleted file mode 100644 index 6550772b..00000000 --- a/examples/wagtaildemo/demo/templates/demo/tags/top_menu.html +++ /dev/null @@ -1,44 +0,0 @@ -{% load demo_tags wagtailcore_tags %} -{% get_site_root as site_root %} - -{# Implementation of bootstrap theme dropdown menu - shows top level links and their children #} - diff --git a/examples/wagtaildemo/demo/templates/demo/tags/top_menu_children.html b/examples/wagtaildemo/demo/templates/demo/tags/top_menu_children.html deleted file mode 100644 index f78b72d6..00000000 --- a/examples/wagtaildemo/demo/templates/demo/tags/top_menu_children.html +++ /dev/null @@ -1,9 +0,0 @@ -{% load demo_tags wagtailcore_tags %} - - diff --git a/examples/wagtaildemo/demo/templatetags/__init__.py b/examples/wagtaildemo/demo/templatetags/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/examples/wagtaildemo/demo/templatetags/demo_tags.py b/examples/wagtaildemo/demo/templatetags/demo_tags.py deleted file mode 100644 index 21ad7aa9..00000000 --- a/examples/wagtaildemo/demo/templatetags/demo_tags.py +++ /dev/null @@ -1,140 +0,0 @@ -from datetime import date -from django import template -from django.conf import settings - -from demo.models import PersonPage, BlogPage, EventPage, Advert, Page - -register = template.Library() - - -# settings value -@register.assignment_tag -def get_google_maps_key(): - return getattr(settings, 'GOOGLE_MAPS_KEY', "") - - -@register.assignment_tag(takes_context=True) -def get_site_root(context): - # NB this returns a core.Page, not the implementation-specific model used - # so object-comparison to self will return false as objects would differ - return context['request'].site.root_page - - -def has_menu_children(page): - return page.get_children().live().in_menu().exists() - - -# Retrieves the top menu items - the immediate children of the parent page -# The has_menu_children method is necessary because the bootstrap menu requires -# a dropdown class to be applied to a parent -@register.inclusion_tag('demo/tags/top_menu.html', takes_context=True) -def top_menu(context, parent, calling_page=None): - menuitems = parent.get_children().live().in_menu() - for menuitem in menuitems: - menuitem.show_dropdown = has_menu_children(menuitem) - # We don't directly check if calling_page is None since the template - # engine can pass an empty string to calling_page - # if the variable passed as calling_page does not exist. - menuitem.active = (calling_page.url.startswith(menuitem.url) - if calling_page else False) - return { - 'calling_page': calling_page, - 'menuitems': menuitems, - # required by the pageurl tag that we want to use within this template - 'request': context['request'], - } - - -# Retrieves the children of the top menu items for the drop downs -@register.inclusion_tag('demo/tags/top_menu_children.html', takes_context=True) -def top_menu_children(context, parent): - menuitems_children = parent.get_children() - menuitems_children = menuitems_children.live().in_menu() - return { - 'parent': parent, - 'menuitems_children': menuitems_children, - # required by the pageurl tag that we want to use within this template - 'request': context['request'], - } - - -# Retrieves all live pages which are children of the calling page -#for standard index listing -@register.inclusion_tag( - 'demo/tags/standard_index_listing.html', - takes_context=True -) -def standard_index_listing(context, calling_page): - pages = calling_page.get_children().live() - return { - 'pages': pages, - # required by the pageurl tag that we want to use within this template - 'request': context['request'], - } - - -# Person feed for home page -@register.inclusion_tag( - 'demo/tags/person_listing_homepage.html', - takes_context=True -) -def person_listing_homepage(context, count=2): - people = PersonPage.objects.live().order_by('?') - return { - 'people': people[:count].select_related('feed_image'), - # required by the pageurl tag that we want to use within this template - 'request': context['request'], - } - - -# Blog feed for home page -@register.inclusion_tag( - 'demo/tags/blog_listing_homepage.html', - takes_context=True -) -def blog_listing_homepage(context, count=2): - blogs = BlogPage.objects.live().order_by('-date') - return { - 'blogs': blogs[:count].select_related('feed_image'), - # required by the pageurl tag that we want to use within this template - 'request': context['request'], - } - - -# Events feed for home page -@register.inclusion_tag( - 'demo/tags/event_listing_homepage.html', - takes_context=True -) -def event_listing_homepage(context, count=2): - events = EventPage.objects.live() - events = events.filter(date_from__gte=date.today()).order_by('date_from') - return { - 'events': events[:count].select_related('feed_image'), - # required by the pageurl tag that we want to use within this template - 'request': context['request'], - } - - -# Advert snippets -@register.inclusion_tag('demo/tags/adverts.html', takes_context=True) -def adverts(context): - return { - 'adverts': Advert.objects.select_related('page'), - 'request': context['request'], - } - - -@register.inclusion_tag('demo/tags/breadcrumbs.html', takes_context=True) -def breadcrumbs(context): - self = context.get('self') - if self is None or self.depth <= 2: - # When on the home page, displaying breadcrumbs is irrelevant. - ancestors = () - else: - ancestors = Page.objects.ancestor_of( - self, inclusive=True).filter(depth__gt=2) - return { - 'ancestors': ancestors, - 'request': context['request'], - } diff --git a/examples/wagtaildemo/demo/utils.py b/examples/wagtaildemo/demo/utils.py deleted file mode 100644 index ff7a4a99..00000000 --- a/examples/wagtaildemo/demo/utils.py +++ /dev/null @@ -1,79 +0,0 @@ -from datetime import datetime, time, timedelta -import hashlib - - -def export_event(event, format='ical'): - # Only ical format supported at the moment - if format != 'ical': - return - - # Begin event - # VEVENT format: http://www.kanzaki.com/docs/ical/vevent.html - ical_components = [ - 'BEGIN:VCALENDAR', - 'VERSION:2.0', - 'PRODID:-//Torchbox//wagtail//EN', - ] - - # Work out number of days the event lasts - if event.date_to is not None: - days = (event.date_to - event.date_from).days + 1 - else: - days = 1 - - for day in range(days): - # Get date - date = event.date_from + timedelta(days=day) - - # Get times - if event.time_from is not None: - start_time = event.time_from - else: - start_time = time.min - if event.time_to is not None: - end_time = event.time_to - else: - end_time = time.max - - # Combine dates and times - start_datetime = datetime.combine( - date, - start_time - ) - end_datetime = datetime.combine(date, end_time) - - def add_slashes(string): - string.replace('"', '\\"') - string.replace('\\', '\\\\') - string.replace(',', '\\,') - string.replace(':', '\\:') - string.replace(';', '\\;') - string.replace('\n', '\\n') - return string - - # Make a uid - event_string = event.url + str(start_datetime) - uid = hashlib.sha1(event_string.encode('utf-8')).hexdigest() + '@wagtaildemo' - - # Make event - ical_components.extend([ - 'BEGIN:VEVENT', - 'UID:' + add_slashes(uid), - 'URL:' + add_slashes(event.url), - 'DTSTAMP:' + start_time.strftime('%Y%m%dT%H%M%S'), - 'SUMMARY:' + add_slashes(event.title), - 'DESCRIPTION:' + add_slashes(event.search_description), - 'LOCATION:' + add_slashes(event.location), - 'DTSTART;TZID=Europe/London:' + start_datetime.strftime('%Y%m%dT%H%M%S'), - 'DTEND;TZID=Europe/London:' + end_datetime.strftime('%Y%m%dT%H%M%S'), - 'END:VEVENT', - ]) - - # Finish event - ical_components.extend([ - 'END:VCALENDAR', - ]) - - # Join components - return '\r'.join(ical_components) - diff --git a/examples/wagtaildemo/demo/views.py b/examples/wagtaildemo/demo/views.py deleted file mode 100644 index 18decec6..00000000 --- a/examples/wagtaildemo/demo/views.py +++ /dev/null @@ -1,45 +0,0 @@ -from django.shortcuts import render -from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger - -from wagtail.wagtailcore.models import Page -from wagtail.wagtailsearch.models import Query - -try: - # Wagtail >= 1.1 - from wagtail.contrib.wagtailsearchpromotions.models import SearchPromotion -except ImportError: - # Wagtail < 1.1 - from wagtail.wagtailsearch.models import EditorsPick as SearchPromotion - - -def search(request): - # Search - search_query = request.GET.get('query', None) - if search_query: - search_results = Page.objects.live().search(search_query) - query = Query.get(search_query) - - # Record hit - query.add_hit() - - # Get search picks - search_picks = query.editors_picks.all() - else: - search_results = Page.objects.none() - search_picks = SearchPromotion.objects.none() - - # Pagination - page = request.GET.get('page', 1) - paginator = Paginator(search_results, 10) - try: - search_results = paginator.page(page) - except PageNotAnInteger: - search_results = paginator.page(1) - except EmptyPage: - search_results = paginator.page(paginator.num_pages) - - return render(request, 'demo/search_results.html', { - 'search_query': search_query, - 'search_results': search_results, - 'search_picks': search_picks, - }) diff --git a/examples/wagtaildemo/demo/wagtail_hooks.py b/examples/wagtaildemo/demo/wagtail_hooks.py deleted file mode 100644 index f0d05146..00000000 --- a/examples/wagtaildemo/demo/wagtail_hooks.py +++ /dev/null @@ -1,8 +0,0 @@ -from django.utils.html import format_html -from django.conf import settings - -from wagtail.wagtailcore import hooks - -@hooks.register('insert_editor_css') -def editor_css(): - return format_html('') diff --git a/examples/wagtaildemo/manage.py b/examples/wagtaildemo/manage.py deleted file mode 100755 index 4a1aac32..00000000 --- a/examples/wagtaildemo/manage.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python -import os -import sys - -if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wagtaildemo.settings") - - from django.core.management import execute_from_command_line - - execute_from_command_line(sys.argv) diff --git a/examples/wagtaildemo/requirements.txt b/examples/wagtaildemo/requirements.txt deleted file mode 100644 index a15cc1f0..00000000 --- a/examples/wagtaildemo/requirements.txt +++ /dev/null @@ -1,19 +0,0 @@ -Django>=1.10,<1.11 -psycopg2==2.6 -django-compressor>=1.4 -django-modelcluster>=0.6 -wagtail>=1.10,<1.11 -django-taggit>=0.14.0 -django-libsass>=0.2 -libsass==0.8.2 -Pillow==3.2.0 -html5lib==0.999999 - -# Dependencies for hosting -django-redis==3.8.2 -elasticsearch==1.2.0 - -# Dependencies for Heroku deployment -dj-database-url==0.3.0 -whitenoise>=3.1,<4.0 -uwsgi>=2.0,<2.1 diff --git a/examples/wagtaildemo/vagrant/provision.sh b/examples/wagtaildemo/vagrant/provision.sh deleted file mode 100755 index eee2653a..00000000 --- a/examples/wagtaildemo/vagrant/provision.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -PROJECT_NAME="wagtaildemo" - -PROJECT_DIR=/home/vagrant/wagtaildemo -VIRTUALENV_DIR=/home/vagrant/.virtualenvs/$PROJECT_NAME - -PYTHON=$VIRTUALENV_DIR/bin/python -PIP=$VIRTUALENV_DIR/bin/pip - - -# Create database -su - vagrant -c "createdb $PROJECT_NAME" - - -# Virtualenv setup for project -su - vagrant -c "pyvenv $VIRTUALENV_DIR" -# Replace previous line with this if you are using Python 2 -# su - vagrant -c "/usr/local/bin/virtualenv $VIRTUALENV_DIR" - -su - vagrant -c "echo $PROJECT_DIR > $VIRTUALENV_DIR/.project" - -#Update pip -su - vagrant -c "$PIP install -U pip" - -# Install PIP requirements -su - vagrant -c "$PIP install -r $PROJECT_DIR/requirements.txt -f /home/vagrant/wheelhouse" - - -# Set execute permissions on manage.py as they get lost if we build from a zip file -chmod a+x $PROJECT_DIR/manage.py - - -# Run migrate/update_index/load_initial_data -su - vagrant -c "$PYTHON $PROJECT_DIR/manage.py migrate --noinput && \ - $PYTHON $PROJECT_DIR/manage.py load_initial_data && \ - $PYTHON $PROJECT_DIR/manage.py update_index" - - -# Add a couple of aliases to manage.py into .bashrc -cat << EOF >> /home/vagrant/.bashrc -export PYTHONPATH=$PROJECT_DIR -export DJANGO_SETTINGS_MODULE=$PROJECT_NAME.settings.dev - -alias dj="django-admin" -alias djrun="dj runserver 0.0.0.0:8000" - -source $VIRTUALENV_DIR/bin/activate -export PS1="[$PROJECT_NAME \W]\\$ " -cd $PROJECT_DIR -EOF diff --git a/examples/wagtaildemo/wagtaildemo/__init__.py b/examples/wagtaildemo/wagtaildemo/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/examples/wagtaildemo/wagtaildemo/heroku_wsgi.py b/examples/wagtaildemo/wagtaildemo/heroku_wsgi.py deleted file mode 100644 index 743f5e43..00000000 --- a/examples/wagtaildemo/wagtaildemo/heroku_wsgi.py +++ /dev/null @@ -1,6 +0,0 @@ -from whitenoise.django import DjangoWhiteNoise - -from .wsgi import application as _application - - -application = DjangoWhiteNoise(_application) diff --git a/examples/wagtaildemo/wagtaildemo/settings/__init__.py b/examples/wagtaildemo/wagtaildemo/settings/__init__.py deleted file mode 100644 index c7873286..00000000 --- a/examples/wagtaildemo/wagtaildemo/settings/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .dev import * diff --git a/examples/wagtaildemo/wagtaildemo/settings/base.py b/examples/wagtaildemo/wagtaildemo/settings/base.py deleted file mode 100644 index 187b169a..00000000 --- a/examples/wagtaildemo/wagtaildemo/settings/base.py +++ /dev/null @@ -1,340 +0,0 @@ -# Django settings for wagtaildemo project. - -import os - -PROJECT_ROOT = os.path.join(os.path.dirname(__file__), '..', '..') -BASE_DIR = PROJECT_ROOT - -DEBUG = True - -ADMINS = ( - # ('Your Name', 'your_email@example.com'), -) - -# Default to dummy email backend. Configure dev/production/local backend -# as per https://docs.djangoproject.com/en/dev/topics/email/#email-backends -EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend' - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': 'wagtaildemo', - } -} - -# Hosts/domain names that are valid for this site; required if DEBUG is False -# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts -ALLOWED_HOSTS = [] - -# Local time zone for this installation. Choices can be found here: -# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name -# although not all choices may be available on all operating systems. -# On Unix systems, a value of None will cause Django to use the same -# timezone as the operating system. -# If running in a Windows environment this must be set to the same as your -# system time zone. -TIME_ZONE = 'Europe/London' - -# Language code for this installation. All choices can be found here: -# http://www.i18nguy.com/unicode/language-identifiers.html -LANGUAGE_CODE = 'en-gb' - -SITE_ID = 1 - -# If you set this to False, Django will make some optimizations so as not -# to load the internationalization machinery. -USE_I18N = True - -# If you set this to False, Django will not format dates, numbers and -# calendars according to the current locale. -USE_L10N = True - -# If you set this to False, Django will not use timezone-aware datetimes. -USE_TZ = True - -DATE_FORMAT = 'j F Y' - -# Absolute filesystem path to the directory that will hold user-uploaded files. -# Example: "/home/media/media.lawrence.com/media/" -MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media') - -# URL that handles the media served from MEDIA_ROOT. Make sure to use a -# trailing slash. -# Examples: "http://media.lawrence.com/media/", "http://example.com/media/" -MEDIA_URL = '/media/' - -# Absolute path to the directory static files should be collected to. -# Don't put anything in this directory yourself; store your static files -# in apps' "static/" subdirectories and in STATICFILES_DIRS. -# Example: "/home/media/media.lawrence.com/static/" -STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static') - -# URL prefix for static files. -# Example: "http://media.lawrence.com/static/" -STATIC_URL = '/static/' - -# Additional locations of static files -STATICFILES_DIRS = ( - # Put strings here, like "/home/html/static" or "C:/www/django/static". - # Always use forward slashes, even on Windows. - # Don't forget to use absolute paths, not relative paths. -) - -# List of finder classes that know how to find static files in -# various locations. -STATICFILES_FINDERS = ( - 'django.contrib.staticfiles.finders.FileSystemFinder', - 'django.contrib.staticfiles.finders.AppDirectoriesFinder', -# 'django.contrib.staticfiles.finders.DefaultStorageFinder', - 'compressor.finders.CompressorFinder', -) - -# ** You would never normally put the SECRET_KEY in a public repository, -# ** however this is a demo app so we're using the default settings. -# ** Don't use this key in any non-demo usage! -# Make this unique, and don't share it with anybody. -SECRET_KEY = 'wq21wtjo3@d_qfjvd-#td!%7gfy2updj2z+nev^k$iy%=m4_tr' - -MIDDLEWARE_CLASSES = ( - 'django.middleware.common.CommonMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', - - 'wagtail.wagtailcore.middleware.SiteMiddleware', - - 'wagtail.wagtailredirects.middleware.RedirectMiddleware', -) - -ROOT_URLCONF = 'wagtaildemo.urls' - -# Python dotted path to the WSGI application used by Django's runserver. -WSGI_APPLICATION = 'wagtaildemo.wsgi.application' - -INSTALLED_APPS = ( - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - # 'django.contrib.sites', # Wagtail uses its own site management logic - 'django.contrib.messages', - 'django.contrib.staticfiles', - - 'compressor', - 'taggit', - 'modelcluster', - 'rest_framework', - 'django.contrib.admin', - # Uncomment the next line to enable admin documentation: - # 'django.contrib.admindocs', - - 'wagtail.wagtailcore', - 'wagtail.wagtailadmin', - 'wagtail.wagtaildocs', - 'wagtail.wagtailsnippets', - 'wagtail.wagtailusers', - 'wagtail.wagtailimages', - 'wagtail.wagtailembeds', - 'wagtail.wagtailsearch', - 'wagtail.wagtailredirects', - 'wagtail.wagtailforms', - 'wagtail.wagtailsites', - 'wagtail.contrib.wagtailapi', - - 'demo', - - # Third party apps used in the project - # 'south', # Database migration app - # 'tinymce', # TinyMCE - 'easy_thumbnails', # Thumbnailer - 'registration', # Auth views and registration app - - # *********************************************************************** - # *********************************************************************** - # **************************** Fobi core ******************************** - # *********************************************************************** - # *********************************************************************** - 'fobi', - - # *********************************************************************** - # *********************************************************************** - # ************************* Fobi form elements ************************** - # *********************************************************************** - # *********************************************************************** - - # *********************************************************************** - # **************************** Form fields ****************************** - # *********************************************************************** - # 'fobi.contrib.plugins.form_elements.fields.birthday', - 'fobi.contrib.plugins.form_elements.fields.boolean', - 'fobi.contrib.plugins.form_elements.fields.checkbox_select_multiple', - 'fobi.contrib.plugins.form_elements.fields.date', - 'fobi.contrib.plugins.form_elements.fields.date_drop_down', - 'fobi.contrib.plugins.form_elements.fields.datetime', - 'fobi.contrib.plugins.form_elements.fields.decimal', - 'fobi.contrib.plugins.form_elements.fields.email', - 'fobi.contrib.plugins.form_elements.fields.file', - 'fobi.contrib.plugins.form_elements.fields.float', - 'fobi.contrib.plugins.form_elements.fields.hidden', - # 'fobi.contrib.plugins.form_elements.fields.hidden_model_object', - 'fobi.contrib.plugins.form_elements.fields.input', - 'fobi.contrib.plugins.form_elements.fields.integer', - 'fobi.contrib.plugins.form_elements.fields.ip_address', - 'fobi.contrib.plugins.form_elements.fields.null_boolean', - 'fobi.contrib.plugins.form_elements.fields.password', - 'fobi.contrib.plugins.form_elements.fields.radio', - 'fobi.contrib.plugins.form_elements.fields.range_select', - 'fobi.contrib.plugins.form_elements.fields.regex', - 'fobi.contrib.plugins.form_elements.fields.select', - 'fobi.contrib.plugins.form_elements.fields.select_model_object', - 'fobi.contrib.plugins.form_elements.fields.select_multiple', - 'fobi.contrib.plugins.form_elements.fields.select_multiple_with_max', - 'fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects', - 'fobi.contrib.plugins.form_elements.fields.slider', - 'fobi.contrib.plugins.form_elements.fields.slug', - 'fobi.contrib.plugins.form_elements.fields.text', - 'fobi.contrib.plugins.form_elements.fields.textarea', - 'fobi.contrib.plugins.form_elements.fields.time', - 'fobi.contrib.plugins.form_elements.fields.url', - - # *********************************************************************** - # ************************ Security elements **************************** - # *********************************************************************** - 'fobi.contrib.plugins.form_elements.security.honeypot', - - # *********************************************************************** - # ************************* Testing elements **************************** - # *********************************************************************** - 'fobi.contrib.plugins.form_elements.test.dummy', - - # *********************************************************************** - # ************************* Content elements **************************** - # *********************************************************************** - 'fobi.contrib.plugins.form_elements.content.content_image', - 'fobi.contrib.plugins.form_elements.content.content_text', - 'fobi.contrib.plugins.form_elements.content.content_video', - - # *********************************************************************** - # *********************************************************************** - # ************************* Fobi form handlers ************************** - # *********************************************************************** - # *********************************************************************** - 'fobi.contrib.plugins.form_handlers.db_store', - 'fobi.contrib.plugins.form_handlers.http_repost', - 'fobi.contrib.plugins.form_handlers.mail', - - # *********************************************************************** - # *********************************************************************** - # ************************* Fobi form importers ************************* - # *********************************************************************** - # *********************************************************************** - 'fobi.contrib.plugins.form_importers.mailchimp_importer', - - # *********************************************************************** - # *********************************************************************** - # ************************** Fobi themes ******************************** - # *********************************************************************** - # *********************************************************************** - - # *********************************************************************** - # ************************ Bootstrap 3 theme **************************** - # *********************************************************************** - 'fobi.contrib.themes.bootstrap3', # Bootstrap 3 theme - # DateTime widget - 'fobi.contrib.themes.bootstrap3.widgets.form_elements.' - 'datetime_bootstrap3_widget', - - 'fobi.contrib.themes.bootstrap3.widgets.form_elements.' - 'date_bootstrap3_widget', - - # SliderPercentage widget - 'fobi.contrib.themes.bootstrap3.widgets.form_elements.' - 'slider_bootstrap3_widget', - - # *********************************************************************** - # ************************ Foundation 5 theme *************************** - # *********************************************************************** - 'fobi.contrib.themes.foundation5', # Foundation 5 theme - - 'fobi.contrib.themes.foundation5.widgets.form_handlers.' - 'db_store_foundation5_widget', - - # *********************************************************************** - # **************************** Simple theme ***************************** - # *********************************************************************** - 'fobi.contrib.themes.simple', # Simple theme -) - -# Add wagtail.contrib.wagtailsearchpromotions to INSTALLED_APPS -# if we're on Wagtail 1.1 or later. -# NB this is a quick-and-dirty version check that won't work with -# full generality (double-digit versions, alpha/beta releases) -from wagtail.wagtailcore import __version__ -if __version__.split('.') > ['1', '0']: - INSTALLED_APPS = list(INSTALLED_APPS) + ['wagtail.contrib.wagtailsearchpromotions'] - - -EMAIL_SUBJECT_PREFIX = '[wagtaildemo] ' - -INTERNAL_IPS = ('127.0.0.1', '10.0.2.2') - - -TEMPLATES = [ - { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'APP_DIRS': True, - 'OPTIONS': { - 'context_processors': [ - 'django.contrib.auth.context_processors.auth', - 'django.template.context_processors.debug', - 'django.template.context_processors.request', - 'django.template.context_processors.media', - 'django.template.context_processors.static', - 'django.contrib.messages.context_processors.messages', - "fobi.context_processors.theme", # Important! - "fobi.context_processors.dynamic_values", # Optional - "context_processors.testing", # Testing - ], - }, - }, -] - -# django-compressor settings -COMPRESS_PRECOMPILERS = ( - ('text/x-scss', 'django_libsass.SassCompiler'), -) - -# A sample logging configuration. The only tangible logging -# performed by this configuration is to send an email to -# the site admins on every HTTP 500 error when DEBUG=False. -# See http://docs.djangoproject.com/en/dev/topics/logging for -# more details on how to customize your logging configuration. -LOGGING = { - 'version': 1, - 'disable_existing_loggers': False, - 'filters': { - 'require_debug_false': { - '()': 'django.utils.log.RequireDebugFalse' - } - }, - 'handlers': { - 'mail_admins': { - 'level': 'ERROR', - 'filters': ['require_debug_false'], - 'class': 'django.utils.log.AdminEmailHandler' - } - }, - 'loggers': { - 'django.request': { - 'handlers': ['mail_admins'], - 'level': 'ERROR', - 'propagate': True, - }, - } -} - - -# WAGTAIL SETTINGS - -WAGTAIL_SITE_NAME = 'wagtaildemo' diff --git a/examples/wagtaildemo/wagtaildemo/settings/dev.py b/examples/wagtaildemo/wagtaildemo/settings/dev.py deleted file mode 100644 index a7cea7de..00000000 --- a/examples/wagtaildemo/wagtaildemo/settings/dev.py +++ /dev/null @@ -1,13 +0,0 @@ -from .base import * - -DEBUG = True - -EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' - -# BASE_URL required for notification emails -BASE_URL = 'http://localhost:8000' - -try: - from .local import * -except ImportError: - pass diff --git a/examples/wagtaildemo/wagtaildemo/settings/heroku.py b/examples/wagtaildemo/wagtaildemo/settings/heroku.py deleted file mode 100644 index 17de7f28..00000000 --- a/examples/wagtaildemo/wagtaildemo/settings/heroku.py +++ /dev/null @@ -1,25 +0,0 @@ -import dj_database_url -import os - -from .base import * - - -DEBUG = True - -# Accept all hostnames, since we don't know in advance which hostname will be used for any given Heroku instance. -# IMPORTANT: Set this to a real hostname when using this in production! -# See https://docs.djangoproject.com/en/1.10/ref/settings/#allowed-hosts -ALLOWED_HOSTS = ['*'] - -EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' - -# BASE_URL required for notification emails -BASE_URL = 'http://localhost:8000' - -DATABASES = {'default': dj_database_url.config(default='postgres://postgres@localhost:5432/wagtaildemo')} - - -try: - from .local import * -except ImportError: - pass diff --git a/examples/wagtaildemo/wagtaildemo/settings/local.py.example b/examples/wagtaildemo/wagtaildemo/settings/local.py.example deleted file mode 100644 index 8d486c10..00000000 --- a/examples/wagtaildemo/wagtaildemo/settings/local.py.example +++ /dev/null @@ -1,28 +0,0 @@ -# If local.py is present, any settings in it will override those in base.py and dev.py. -# Use this for any settings that are specific to this one installation, such as developer API keys. -# local.py should not be checked in to version control. - -EMBEDLY_KEY = 'get-one-from-http://embed.ly/' -# GOOGLE_MAPS_KEY = 'get-one-from-https://code.google.com/apis/console/?noredirect' - -# It is strongly recommended that you define a SECRET_KEY here, where it won't be visible -# in your version control system. -SECRET_KEY = 'enter-a-long-unguessable-string-here' - - -# When developing Wagtail templates, we recommend django-debug-toolbar -# for keeping track of page rendering times. To use it: -# pip install django-debug-toolbar -# uncomment the lines below, and uncomment the corresponding lines in urls.py - -# from .base import INSTALLED_APPS, MIDDLEWARE_CLASSES -# INSTALLED_APPS += ( -# 'debug_toolbar', -# ) -# MIDDLEWARE_CLASSES = [ -# 'debug_toolbar.middleware.DebugToolbarMiddleware', -# ] + list(MIDDLEWARE_CLASSES) -# # django-debug-toolbar settings -# DEBUG_TOOLBAR_CONFIG = { -# 'INTERCEPT_REDIRECTS': False, -# } diff --git a/examples/wagtaildemo/wagtaildemo/settings/production.py b/examples/wagtaildemo/wagtaildemo/settings/production.py deleted file mode 100644 index aa5fdcfa..00000000 --- a/examples/wagtaildemo/wagtaildemo/settings/production.py +++ /dev/null @@ -1,37 +0,0 @@ -from .base import * - -DEBUG = False - - -WAGTAILSEARCH_BACKENDS = { - 'default': { - 'BACKEND': 'wagtail.wagtailsearch.backends.elasticsearch.ElasticSearch', - 'INDEX': 'wagtaildemo' - } -} - - -CACHES = { - 'default': { - 'BACKEND': 'redis_cache.cache.RedisCache', - 'LOCATION': '127.0.0.1:6379', - 'KEY_PREFIX': 'wagtaildemo', - 'OPTIONS': { - 'CLIENT_CLASS': 'redis_cache.client.DefaultClient', - } - } -} - -# Use the cached template loader -TEMPLATE_LOADERS = ( - ('django.template.loaders.cached.Loader', ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', - )), -) - - -try: - from .local import * -except ImportError: - pass diff --git a/examples/wagtaildemo/wagtaildemo/urls.py b/examples/wagtaildemo/wagtaildemo/urls.py deleted file mode 100644 index af689b79..00000000 --- a/examples/wagtaildemo/wagtaildemo/urls.py +++ /dev/null @@ -1,59 +0,0 @@ -from django.conf.urls import include, url -from django.conf.urls.static import static -from django.conf import settings -from django.contrib import admin - -from wagtail.wagtailadmin import urls as wagtailadmin_urls -from wagtail.wagtaildocs import urls as wagtaildocs_urls -from wagtail.wagtailcore import urls as wagtail_urls -from wagtail.contrib.wagtailapi import urls as wagtailapi_urls -from wagtail.api.v2.router import WagtailAPIRouter -from wagtail.api.v2.endpoints import PagesAPIEndpoint -from wagtail.wagtaildocs.api.v2.endpoints import DocumentsAPIEndpoint -from wagtail.wagtailimages.api.v2.endpoints import ImagesAPIEndpoint - -from demo import views - - -api = WagtailAPIRouter('api') -api.register_endpoint('pages', PagesAPIEndpoint) -api.register_endpoint('images', ImagesAPIEndpoint) -api.register_endpoint('documents', DocumentsAPIEndpoint) - - -urlpatterns = [ - url(r'^django-admin/', include(admin.site.urls)), - - url(r'^admin/', include(wagtailadmin_urls)), - url(r'^documents/', include(wagtaildocs_urls)), - - url(r'search/$', views.search, name='search'), - url(r'^api/', include(wagtailapi_urls)), - url(r'^api/v2/', include(api.urls)), -] - - -if settings.DEBUG: - from django.contrib.staticfiles.urls import staticfiles_urlpatterns - from django.views.generic.base import RedirectView - - urlpatterns += staticfiles_urlpatterns() - urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) - urlpatterns += [ - url(r'^favicon\.ico$', RedirectView.as_view(url=settings.STATIC_URL + 'demo/images/favicon.ico')) - ] - - # Uncomment the lines below to enable django-debug-toolbar (along with the - # corresponding lines in settings/local.py): - #import debug_toolbar - - #urlpatterns += [ - # url(r'^__debug__/', include(debug_toolbar.urls)), - #] - - -# For anything not caught by a more specific rule above, hand over to -# Wagtail's serving mechanism (must come last) -urlpatterns += [ - url(r'', include(wagtail_urls)), -] diff --git a/examples/wagtaildemo/wagtaildemo/wsgi.py b/examples/wagtaildemo/wagtaildemo/wsgi.py deleted file mode 100644 index 4215178d..00000000 --- a/examples/wagtaildemo/wagtaildemo/wsgi.py +++ /dev/null @@ -1,28 +0,0 @@ -""" -WSGI config for wagtaildemo project. - -This module contains the WSGI application used by Django's development server -and any production WSGI deployments. It should expose a module-level variable -named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover -this application via the ``WSGI_APPLICATION`` setting. - -Usually you will have the standard Django WSGI application here, but it also -might make sense to replace the whole Django WSGI application with a custom one -that later delegates to the Django one. For example, you could introduce WSGI -middleware here, or combine a Django application with an application of another -framework. - -""" -import os - -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wagtaildemo.settings") - -# This application object is used by any WSGI server configured to use this -# file. This includes Django's development server, if the WSGI_APPLICATION -# setting points here. -from django.core.wsgi import get_wsgi_application -application = get_wsgi_application() - -# Apply WSGI middleware here. -# from helloworld.wsgi import HelloWorldApplication -# application = HelloWorldApplication(application)