synced with wagtaildemo upstream

This commit is contained in:
Artur Barseghyan 2017-06-13 00:08:51 +02:00
parent 363ab82712
commit 7c71c9dbba
71 changed files with 2109 additions and 2936 deletions

View file

@ -0,0 +1 @@
web: uwsgi --http :$PORT --module wagtaildemo.heroku_wsgi --master --processes 2 --static-map /media/=/app/media/ --offload-threads 1

View file

@ -1,16 +1,22 @@
Wagtail demo
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/torchbox/wagtaildemo)
Wagtail demo project
=======================
[Wagtail](http://wagtail.io) is distributed as a Python package, to be incorporated into a Django project via the INSTALLED_APPS setting. To get you up and running quickly, we provide a demo site with all the configuration in place, including a set of example page types.
This is a demonstration project for [Wagtail CMS](http://wagtail.io).
Setup (with Vagrant - recommended)
-----
*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.
We recommend running Wagtail in a virtual machine using Vagrant, as this ensures that the correct dependencies are in place regardless of how your host machine is set up.
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.1+](http://www.vagrantup.com)
* [Vagrant 1.5+](http://www.vagrantup.com)
### Installation
Run the following commands:
@ -20,25 +26,11 @@ Run the following commands:
vagrant up
vagrant ssh
(then, within the SSH session:)
./manage.py createsuperuser
./manage.py runserver 0.0.0.0:8000
This will make the app accessible on the host machine as http://localhost:8111/ - you can access the Wagtail admin interface at http://localhost:8111/admin/ . The codebase is located on the host
machine, exported to the VM as a shared folder; code editing and Git operations will generally be done on the host.
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``.
### Developing Wagtail
The above setup is all you need for trying out the demo site and building Wagtail-powered sites. To develop Wagtail itself, you'll need a working copy of [the Wagtail codebase](https://github.com/torchbox/wagtail) alongside your demo site, shared with your VM so that it is picked up instead of the packaged copy of Wagtail. From the location where you cloned wagtaildemo:
git clone https://github.com/torchbox/wagtail.git
cd wagtaildemo
cp Vagrantfile.local.example Vagrantfile.local
(edit Vagrantfile.local to specify the path to the wagtail codebase, if required)
cp wagtaildemo/settings/local.py.example wagtaildemo/settings/local.py
(uncomment the lines from 'import sys' onward, and edit the rest of local.py as appropriate)
If your VM is currently running, you'll then need to run `vagrant halt` followed by `vagrant up` for the changes to take effect.
Setup (without Vagrant)
Setup without Vagrant
-----
Don't want to set up a whole VM to try out Wagtail? No problem.
@ -52,15 +44,13 @@ With PostgreSQL running (and configured to allow you to connect as the 'postgres
git clone https://github.com/torchbox/wagtaildemo.git
cd wagtaildemo
pip install -r requirements/dev.txt
pip install -r requirements.txt
createdb -Upostgres wagtaildemo
./manage.py syncdb
./manage.py migrate
./manage.py load_initial_data
./manage.py createsuperuser
./manage.py runserver
### SQLite support
SQLite is supported as an alternative to PostgreSQL - update the DATABASES setting
in wagtaildemo/settings/base.py to use 'django.db.backends.sqlite3', as you would
with a regular Django project.
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.

View file

@ -1,46 +1,85 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# 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.
# Base box to build off, and download URL for when it doesn't exist on the user's system already
config.vm.box = "wagtail-base-v0.3"
config.vm.box_url = "http://downloads.torchbox.com/wagtail-base-v0.3.box"
# 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"
# You can also build from a vanilla precise32 box, although it'll take longer
# config.vm.box = "precise32"
# config.vm.box_url = "http://files.vagrantup.com/precise32.box"
# 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
# As an alternative to precise32, VMs can be built from the 'django-base' box as defined at
# https://github.com/torchbox/vagrant-django-base , which has more of the necessary server config
# baked in and thus takes less time to initialise. To go down this route, you will need to build
# and host django-base.box yourself, and substitute your own URL below.
#config.vm.box = "django-base-v2.1"
#config.vm.box_url = "http://vmimages.torchbox.com/django-base-v2.1.box" # Torchbox-internal URL to django-base.box
# Boot with a GUI so you can see the screen. (Default is headless)
# config.vm.boot_mode = :gui
# Assign this VM to a host only network IP, allowing you to access it
# via the IP.
# config.vm.network "33.33.33.10"
# Forward a port from the guest to the host, which allows for outside
# computers to access the VM, whereas host only networking does not.
config.vm.forward_port 8000, 8111
# Share an additional folder to the guest VM. The first argument is
# an identifier, the second is the path on the guest to mount the
# folder, and the third is the path on the host to the actual folder.
config.vm.share_folder "project", "/home/vagrant/wagtaildemo", "."
# Enable provisioning with a shell script.
config.vm.provision :shell, :path => "etc/install/install.sh", :args => "wagtaildemo"
# 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
# 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
# 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

View file

@ -11,8 +11,9 @@
# Clone https://github.com/torchbox/wagtail somewhere convenient, and replace
# "../wagtail" below with the correct path:
config.vm.share_folder "wagtail", "/home/vagrant/wagtail", "../wagtail"
config.vm.synced_folder "../wagtail", "/home/vagrant/wagtail"
# You'll also need to tweak the Python path so that it picks up this instance of
# Wagtail rather than the packaged one - see wagtaildemo/settings/local.py.example.
# 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.

View file

@ -0,0 +1,16 @@
{
"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"
]
}

View file

@ -0,0 +1,8 @@
# 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

View file

@ -592,6 +592,15 @@
"page": 17
}
},
{
"pk": 2,
"model": "demo.advert",
"fields": {
"url": "",
"text": "Contact",
"page": 12
}
},
{
"pk": 5,
"model": "demo.blogindexpage",
@ -615,7 +624,7 @@
"pk": 16,
"model": "demo.blogpage",
"fields": {
"body": "<p>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.</p><p>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.<br/></p><p><embed alt=\"Pied wagtail by Marie Hale\" embedtype=\"image\" format=\"left\" id=\"10\"/><embed alt=\"Wagtail Sproing by Jim Bendon\" embedtype=\"image\" format=\"right\" id=\"12\"/><br/></p><p>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.</p><p>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.</p><p>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.</p><p>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.</p>",
"body": "[{\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"<p>Also, there is another superspecies in sub-Saharan Africa<br/></p>\", \"image\": 13, \"alignment\": \"left\"}}, {\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"<p>The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia</p>\", \"image\": 15, \"alignment\": \"right\"}}, {\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"<p>The remaining five species are highly variable morphologically</p>\", \"image\": 14, \"alignment\": \"full\"}}, {\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"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\": \"<p>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.</p>\"}]",
"date": "2013-12-02",
"feed_image": 7
}
@ -624,7 +633,7 @@
"pk": 18,
"model": "demo.blogpage",
"fields": {
"body": "<p>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.</p><p><br/></p><p><embed alt=\"Grey wagtail by Lip Kee\" embedtype=\"image\" format=\"fullwidth\" id=\"15\"/><br/></p><p><br/></p><p>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.</p><p><br/></p><p>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.<br/></p><p><br/></p><p>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.<br/></p><p><br/></p><p>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.<br/></p><p><br/></p><p>Prehistoric wagtails known from fossils are Motacilla humata and Motacilla major.<br/></p><p><br/></p><p>See the species accounts for more on individual species' relationships.</p>",
"body": "[{\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"<p>Also, there is another superspecies in sub-Saharan Africa<br/></p>\", \"image\": 13, \"alignment\": \"left\"}}, {\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"<p>The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia</p>\", \"image\": 15, \"alignment\": \"right\"}}, {\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"<p>The remaining five species are highly variable morphologically</p>\", \"image\": 14, \"alignment\": \"full\"}}, {\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"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\": \"<p>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.</p>\"}]",
"date": "2014-01-10",
"feed_image": 15
}
@ -633,7 +642,7 @@
"pk": 19,
"model": "demo.blogpage",
"fields": {
"body": "<p>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.</p><p><br/></p><p>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.<br/></p><p><br/></p><p>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.<br/></p><p><br/></p><p>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.<br/></p><p><br/></p><p>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.<br/></p><p><br/></p><p>Prehistoric wagtails known from fossils are Motacilla humata and Motacilla major.<br/></p><p><br/></p><p>See the species accounts for more on individual species' relationships.<br/></p>",
"body": "[{\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"<p>Also, there is another superspecies in sub-Saharan Africa<br/></p>\", \"image\": 13, \"alignment\": \"left\"}}, {\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"<p>The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia</p>\", \"image\": 15, \"alignment\": \"right\"}}, {\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"<p>The remaining five species are highly variable morphologically</p>\", \"image\": 14, \"alignment\": \"full\"}}, {\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}, {\"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\": \"<p>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.</p>\"}]",
"date": "2014-02-01",
"feed_image": 14
}
@ -784,7 +793,7 @@
"pk": 2,
"model": "demo.homepage",
"fields": {
"body": "<p>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.</p>"
"body": "[{\"type\": \"intro\", \"value\": \"<p>Wagtails are slender, often colourful, ground-feeding insectivores of open country in the Old World.\\u00a0</p>\"}, {\"type\": \"paragraph\", \"value\": \"<p>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</p>\"}, {\"type\": \"paragraph\", \"value\": \"<p>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.</p>\"}]"
}
},
{
@ -1035,5 +1044,23 @@
"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
}
]

View file

@ -0,0 +1,21 @@
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)

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,24 @@
# -*- 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'))]),
)
]

View file

@ -1,341 +0,0 @@
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'StandardPage.postcode'
db.add_column(u'demo_standardpage', 'postcode',
self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True),
keep_default=False)
def backwards(self, orm):
# Deleting field 'StandardPage.postcode'
db.delete_column(u'demo_standardpage', 'postcode')
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
u'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
u'demo.advert': {
'Meta': {'object_name': 'Advert'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adverts'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'text': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'})
},
u'demo.advertplacement': {
'Meta': {'object_name': 'AdvertPlacement'},
'advert': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': u"orm['demo.Advert']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'advert_placements'", 'to': u"orm['wagtailcore.Page']"})
},
u'demo.blogindexpage': {
'Meta': {'object_name': 'BlogIndexPage', '_ormbases': [u'wagtailcore.Page']},
'intro': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'})
},
u'demo.blogindexpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'BlogIndexPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.BlogIndexPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.blogpage': {
'Meta': {'object_name': 'BlogPage', '_ormbases': [u'wagtailcore.Page']},
'body': ('wagtail.wagtailcore.fields.RichTextField', [], {}),
'date': ('django.db.models.fields.DateField', [], {}),
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'})
},
u'demo.blogpagecarouselitem': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'BlogPageCarouselItem'},
'caption': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'embed_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'carousel_items'", 'to': u"orm['demo.BlogPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.blogpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'BlogPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.BlogPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.blogpagetag': {
'Meta': {'object_name': 'BlogPageTag'},
'content_object': ('modelcluster.fields.ParentalKey', [], {'related_name': "'tagged_items'", 'to': u"orm['demo.BlogPage']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'demo_blogpagetag_items'", 'to': u"orm['taggit.Tag']"})
},
u'demo.contactpage': {
'Meta': {'object_name': 'ContactPage', '_ormbases': [u'wagtailcore.Page']},
'address_1': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'address_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'body': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'}),
'post_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'blank': 'True'}),
'telephone': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'})
},
u'demo.eventindexpage': {
'Meta': {'object_name': 'EventIndexPage', '_ormbases': [u'wagtailcore.Page']},
'intro': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'})
},
u'demo.eventindexpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'EventIndexPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.EventIndexPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.eventpage': {
'Meta': {'object_name': 'EventPage', '_ormbases': [u'wagtailcore.Page']},
'audience': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'body': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
'cost': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'date_from': ('django.db.models.fields.DateField', [], {}),
'date_to': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'location': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'}),
'signup_link': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'time_from': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}),
'time_to': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.eventpagecarouselitem': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'EventPageCarouselItem'},
'caption': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'embed_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'carousel_items'", 'to': u"orm['demo.EventPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.eventpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'EventPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.EventPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.eventpagespeaker': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'EventPageSpeaker'},
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'speakers'", 'to': u"orm['demo.EventPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.homepage': {
'Meta': {'object_name': 'HomePage', '_ormbases': [u'wagtailcore.Page']},
'body': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'})
},
u'demo.homepagecarouselitem': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'HomePageCarouselItem'},
'caption': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'embed_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'carousel_items'", 'to': u"orm['demo.HomePage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.homepagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'HomePageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.HomePage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.personpage': {
'Meta': {'object_name': 'PersonPage', '_ormbases': [u'wagtailcore.Page']},
'address_1': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'address_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'biography': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'intro': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'}),
'post_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'blank': 'True'}),
'telephone': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'})
},
u'demo.personpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'PersonPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.PersonPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.standardindexpage': {
'Meta': {'object_name': 'StandardIndexPage', '_ormbases': [u'wagtailcore.Page']},
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'intro': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'})
},
u'demo.standardindexpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'StandardIndexPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.StandardIndexPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.standardpage': {
'Meta': {'object_name': 'StandardPage', '_ormbases': [u'wagtailcore.Page']},
'body': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'intro': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'}),
'postcode': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
},
u'demo.standardpagecarouselitem': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'StandardPageCarouselItem'},
'caption': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'embed_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'carousel_items'", 'to': u"orm['demo.StandardPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.standardpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'StandardPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.StandardPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'taggit.tag': {
'Meta': {'object_name': 'Tag'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'})
},
u'wagtailcore.page': {
'Meta': {'object_name': 'Page'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': u"orm['contenttypes.ContentType']"}),
'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'to': u"orm['auth.User']"}),
'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
},
u'wagtaildocs.document': {
'Meta': {'object_name': 'Document'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'uploaded_by_user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'})
},
u'wagtailimages.image': {
'Meta': {'object_name': 'Image'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
'height': ('django.db.models.fields.IntegerField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'uploaded_by_user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
'width': ('django.db.models.fields.IntegerField', [], {})
}
}
complete_apps = ['demo']

View file

@ -0,0 +1,24 @@
# -*- 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'))]),
)
]

View file

@ -1,340 +0,0 @@
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'StandardPage.postcode'
db.delete_column(u'demo_standardpage', 'postcode')
def backwards(self, orm):
# Adding field 'StandardPage.postcode'
db.add_column(u'demo_standardpage', 'postcode',
self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True),
keep_default=False)
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
u'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
u'demo.advert': {
'Meta': {'object_name': 'Advert'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adverts'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'text': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'})
},
u'demo.advertplacement': {
'Meta': {'object_name': 'AdvertPlacement'},
'advert': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': u"orm['demo.Advert']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'advert_placements'", 'to': u"orm['wagtailcore.Page']"})
},
u'demo.blogindexpage': {
'Meta': {'object_name': 'BlogIndexPage', '_ormbases': [u'wagtailcore.Page']},
'intro': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'})
},
u'demo.blogindexpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'BlogIndexPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.BlogIndexPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.blogpage': {
'Meta': {'object_name': 'BlogPage', '_ormbases': [u'wagtailcore.Page']},
'body': ('wagtail.wagtailcore.fields.RichTextField', [], {}),
'date': ('django.db.models.fields.DateField', [], {}),
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'})
},
u'demo.blogpagecarouselitem': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'BlogPageCarouselItem'},
'caption': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'embed_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'carousel_items'", 'to': u"orm['demo.BlogPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.blogpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'BlogPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.BlogPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.blogpagetag': {
'Meta': {'object_name': 'BlogPageTag'},
'content_object': ('modelcluster.fields.ParentalKey', [], {'related_name': "'tagged_items'", 'to': u"orm['demo.BlogPage']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'demo_blogpagetag_items'", 'to': u"orm['taggit.Tag']"})
},
u'demo.contactpage': {
'Meta': {'object_name': 'ContactPage', '_ormbases': [u'wagtailcore.Page']},
'address_1': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'address_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'body': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'}),
'post_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'blank': 'True'}),
'telephone': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'})
},
u'demo.eventindexpage': {
'Meta': {'object_name': 'EventIndexPage', '_ormbases': [u'wagtailcore.Page']},
'intro': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'})
},
u'demo.eventindexpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'EventIndexPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.EventIndexPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.eventpage': {
'Meta': {'object_name': 'EventPage', '_ormbases': [u'wagtailcore.Page']},
'audience': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'body': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
'cost': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'date_from': ('django.db.models.fields.DateField', [], {}),
'date_to': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'location': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'}),
'signup_link': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'time_from': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}),
'time_to': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.eventpagecarouselitem': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'EventPageCarouselItem'},
'caption': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'embed_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'carousel_items'", 'to': u"orm['demo.EventPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.eventpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'EventPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.EventPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.eventpagespeaker': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'EventPageSpeaker'},
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'speakers'", 'to': u"orm['demo.EventPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.homepage': {
'Meta': {'object_name': 'HomePage', '_ormbases': [u'wagtailcore.Page']},
'body': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'})
},
u'demo.homepagecarouselitem': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'HomePageCarouselItem'},
'caption': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'embed_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'carousel_items'", 'to': u"orm['demo.HomePage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.homepagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'HomePageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.HomePage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.personpage': {
'Meta': {'object_name': 'PersonPage', '_ormbases': [u'wagtailcore.Page']},
'address_1': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'address_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'biography': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'intro': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'}),
'post_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'blank': 'True'}),
'telephone': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'})
},
u'demo.personpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'PersonPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.PersonPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.standardindexpage': {
'Meta': {'object_name': 'StandardIndexPage', '_ormbases': [u'wagtailcore.Page']},
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'intro': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'})
},
u'demo.standardindexpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'StandardIndexPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.StandardIndexPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.standardpage': {
'Meta': {'object_name': 'StandardPage', '_ormbases': [u'wagtailcore.Page']},
'body': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'intro': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'})
},
u'demo.standardpagecarouselitem': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'StandardPageCarouselItem'},
'caption': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'embed_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'carousel_items'", 'to': u"orm['demo.StandardPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.standardpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'StandardPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.StandardPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'taggit.tag': {
'Meta': {'object_name': 'Tag'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'})
},
u'wagtailcore.page': {
'Meta': {'object_name': 'Page'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': u"orm['contenttypes.ContentType']"}),
'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'to': u"orm['auth.User']"}),
'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
},
u'wagtaildocs.document': {
'Meta': {'object_name': 'Document'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'uploaded_by_user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'})
},
u'wagtailimages.image': {
'Meta': {'object_name': 'Image'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
'height': ('django.db.models.fields.IntegerField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'uploaded_by_user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
'width': ('django.db.models.fields.IntegerField', [], {})
}
}
complete_apps = ['demo']

View file

@ -0,0 +1,249 @@
# -*- 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'),
),
]

View file

@ -1,384 +0,0 @@
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'FormField'
db.create_table(u'demo_formfield', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('sort_order', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
('label', self.gf('django.db.models.fields.CharField')(max_length=255)),
('field_type', self.gf('django.db.models.fields.CharField')(max_length=16)),
('required', self.gf('django.db.models.fields.BooleanField')(default=True)),
('choices', self.gf('django.db.models.fields.CharField')(max_length=512, blank=True)),
('default_value', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
('help_text', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
('page', self.gf('modelcluster.fields.ParentalKey')(related_name='form_fields', to=orm['demo.FormPage'])),
))
db.send_create_signal(u'demo', ['FormField'])
# Adding model 'FormPage'
db.create_table(u'demo_formpage', (
(u'page_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['wagtailcore.Page'], unique=True, primary_key=True)),
('to_address', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
('from_address', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
('subject', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
('intro', self.gf('wagtail.wagtailcore.fields.RichTextField')(blank=True)),
('thank_you_text', self.gf('wagtail.wagtailcore.fields.RichTextField')(blank=True)),
))
db.send_create_signal(u'demo', ['FormPage'])
def backwards(self, orm):
# Deleting model 'FormField'
db.delete_table(u'demo_formfield')
# Deleting model 'FormPage'
db.delete_table(u'demo_formpage')
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
u'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
u'demo.advert': {
'Meta': {'object_name': 'Advert'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adverts'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'text': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'})
},
u'demo.advertplacement': {
'Meta': {'object_name': 'AdvertPlacement'},
'advert': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': u"orm['demo.Advert']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'advert_placements'", 'to': u"orm['wagtailcore.Page']"})
},
u'demo.blogindexpage': {
'Meta': {'object_name': 'BlogIndexPage', '_ormbases': [u'wagtailcore.Page']},
'intro': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'})
},
u'demo.blogindexpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'BlogIndexPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.BlogIndexPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.blogpage': {
'Meta': {'object_name': 'BlogPage', '_ormbases': [u'wagtailcore.Page']},
'body': ('wagtail.wagtailcore.fields.RichTextField', [], {}),
'date': ('django.db.models.fields.DateField', [], {}),
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'})
},
u'demo.blogpagecarouselitem': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'BlogPageCarouselItem'},
'caption': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'embed_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'carousel_items'", 'to': u"orm['demo.BlogPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.blogpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'BlogPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.BlogPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.blogpagetag': {
'Meta': {'object_name': 'BlogPageTag'},
'content_object': ('modelcluster.fields.ParentalKey', [], {'related_name': "'tagged_items'", 'to': u"orm['demo.BlogPage']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'demo_blogpagetag_items'", 'to': u"orm['taggit.Tag']"})
},
u'demo.contactpage': {
'Meta': {'object_name': 'ContactPage', '_ormbases': [u'wagtailcore.Page']},
'address_1': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'address_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'body': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'}),
'post_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'blank': 'True'}),
'telephone': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'})
},
u'demo.eventindexpage': {
'Meta': {'object_name': 'EventIndexPage', '_ormbases': [u'wagtailcore.Page']},
'intro': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'})
},
u'demo.eventindexpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'EventIndexPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.EventIndexPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.eventpage': {
'Meta': {'object_name': 'EventPage', '_ormbases': [u'wagtailcore.Page']},
'audience': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'body': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
'cost': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'date_from': ('django.db.models.fields.DateField', [], {}),
'date_to': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'location': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'}),
'signup_link': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'time_from': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'}),
'time_to': ('django.db.models.fields.TimeField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.eventpagecarouselitem': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'EventPageCarouselItem'},
'caption': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'embed_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'carousel_items'", 'to': u"orm['demo.EventPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.eventpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'EventPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.EventPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.eventpagespeaker': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'EventPageSpeaker'},
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'speakers'", 'to': u"orm['demo.EventPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.formfield': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'FormField'},
'choices': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
'default_value': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'field_type': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'help_text': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'label': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'form_fields'", 'to': u"orm['demo.FormPage']"}),
'required': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.formpage': {
'Meta': {'object_name': 'FormPage'},
'from_address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'intro': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'}),
'subject': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'thank_you_text': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
'to_address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
},
u'demo.homepage': {
'Meta': {'object_name': 'HomePage', '_ormbases': [u'wagtailcore.Page']},
'body': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'})
},
u'demo.homepagecarouselitem': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'HomePageCarouselItem'},
'caption': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'embed_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'carousel_items'", 'to': u"orm['demo.HomePage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.homepagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'HomePageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.HomePage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.personpage': {
'Meta': {'object_name': 'PersonPage', '_ormbases': [u'wagtailcore.Page']},
'address_1': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'address_2': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'biography': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'intro': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'}),
'post_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'blank': 'True'}),
'telephone': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'})
},
u'demo.personpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'PersonPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.PersonPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.standardindexpage': {
'Meta': {'object_name': 'StandardIndexPage', '_ormbases': [u'wagtailcore.Page']},
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'intro': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'})
},
u'demo.standardindexpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'StandardIndexPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.StandardIndexPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'demo.standardpage': {
'Meta': {'object_name': 'StandardPage', '_ormbases': [u'wagtailcore.Page']},
'body': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
'feed_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'intro': ('wagtail.wagtailcore.fields.RichTextField', [], {'blank': 'True'}),
u'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['wagtailcore.Page']", 'unique': 'True', 'primary_key': 'True'})
},
u'demo.standardpagecarouselitem': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'StandardPageCarouselItem'},
'caption': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'embed_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['wagtailimages.Image']"}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'carousel_items'", 'to': u"orm['demo.StandardPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
u'demo.standardpagerelatedlink': {
'Meta': {'ordering': "['sort_order']", 'object_name': 'StandardPageRelatedLink'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link_document': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtaildocs.Document']"}),
'link_external': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'link_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': u"orm['wagtailcore.Page']"}),
'page': ('modelcluster.fields.ParentalKey', [], {'related_name': "'related_links'", 'to': u"orm['demo.StandardPage']"}),
'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'taggit.tag': {
'Meta': {'object_name': 'Tag'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'})
},
u'wagtailcore.page': {
'Meta': {'object_name': 'Page'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': u"orm['contenttypes.ContentType']"}),
'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'to': u"orm['auth.User']"}),
'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
},
u'wagtaildocs.document': {
'Meta': {'object_name': 'Document'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'uploaded_by_user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'})
},
u'wagtailimages.image': {
'Meta': {'object_name': 'Image'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
'height': ('django.db.models.fields.IntegerField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'uploaded_by_user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
'width': ('django.db.models.fields.IntegerField', [], {})
}
}
complete_apps = ['demo']

View file

@ -0,0 +1,59 @@
# -*- 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'),
),
]

View file

@ -0,0 +1,25 @@
# -*- 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'),
),
]

View file

@ -2,26 +2,27 @@ from datetime import date
from django.db import models
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.core.management import call_command
from django.dispatch import receiver
from django.shortcuts import render
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
from wagtail.wagtailadmin.edit_handlers import FieldPanel, MultiFieldPanel, \
InlinePanel, PageChooserPanel
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.wagtailimages.models import Image
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 Tag, TaggedItemBase
from south.signals import post_migrate
from taggit.models import TaggedItemBase
from demo.utils import export_event
@ -31,6 +32,54 @@ EVENT_AUDIENCE_CHOICES = (
('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
@ -64,6 +113,8 @@ class LinkFields(models.Model):
DocumentChooserPanel('link_document'),
]
api_fields = ['link_external', 'link_page', 'link_document']
class Meta:
abstract = True
@ -87,6 +138,8 @@ class ContactFields(models.Model):
FieldPanel('post_code'),
]
api_fields = ['telephone', 'email', 'address_1', 'address_2', 'city', 'country', 'post_code']
class Meta:
abstract = True
@ -111,6 +164,8 @@ class CarouselItem(LinkFields):
MultiFieldPanel(LinkFields.panels, "Link"),
]
api_fields = ['image', 'embed_url', 'caption'] + LinkFields.api_fields
class Meta:
abstract = True
@ -125,6 +180,8 @@ class RelatedLink(LinkFields):
MultiFieldPanel(LinkFields.panels, "Link"),
]
api_fields = ['title'] + LinkFields.api_fields
class Meta:
abstract = True
@ -135,7 +192,10 @@ 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',
@ -152,7 +212,9 @@ class Advert(models.Model):
FieldPanel('text'),
]
def __unicode__(self):
api_fields = ['page', 'url', 'text']
def __str__(self):
return self.text
register_snippet(Advert)
@ -169,25 +231,24 @@ class HomePageRelatedLink(Orderable, RelatedLink):
class HomePage(Page):
body = RichTextField(blank=True)
search_fields = Page.search_fields + (
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"),
FieldPanel('body', classname="full"),
InlinePanel(HomePage, 'carousel_items', label="Carousel items"),
InlinePanel(HomePage, 'related_links', label="Related links"),
StreamFieldPanel('body'),
InlinePanel('carousel_items', label="Carousel items"),
InlinePanel('related_links', label="Related links"),
]
HomePage.promote_panels = [
MultiFieldPanel(Page.promote_panels, "Common page configuration"),
]
HomePage.promote_panels = Page.promote_panels
# Standard index page
@ -206,18 +267,19 @@ class StandardIndexPage(Page):
related_name='+'
)
search_fields = Page.search_fields + (
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(StandardIndexPage, 'related_links', label="Related links"),
InlinePanel('related_links', label="Related links"),
]
StandardIndexPage.promote_panels = [
MultiFieldPanel(Page.promote_panels, "Common page configuration"),
StandardIndexPage.promote_panels = Page.promote_panels + [
ImageChooserPanel('feed_image'),
]
@ -243,21 +305,22 @@ class StandardPage(Page):
related_name='+'
)
search_fields = Page.search_fields + (
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(StandardPage, 'carousel_items', label="Carousel items"),
InlinePanel('carousel_items', label="Carousel items"),
FieldPanel('body', classname="full"),
InlinePanel(StandardPage, 'related_links', label="Related links"),
InlinePanel('related_links', label="Related links"),
]
StandardPage.promote_panels = [
MultiFieldPanel(Page.promote_panels, "Common page configuration"),
StandardPage.promote_panels = Page.promote_panels + [
ImageChooserPanel('feed_image'),
]
@ -271,9 +334,11 @@ class BlogIndexPageRelatedLink(Orderable, RelatedLink):
class BlogIndexPage(Page):
intro = RichTextField(blank=True)
search_fields = Page.search_fields + (
search_fields = Page.search_fields + [
index.SearchField('intro'),
)
]
api_fields = ['intro', 'related_links']
@property
def blogs(self):
@ -312,12 +377,10 @@ class BlogIndexPage(Page):
BlogIndexPage.content_panels = [
FieldPanel('title', classname="full title"),
FieldPanel('intro', classname="full"),
InlinePanel(BlogIndexPage, 'related_links', label="Related links"),
InlinePanel('related_links', label="Related links"),
]
BlogIndexPage.promote_panels = [
MultiFieldPanel(Page.promote_panels, "Common page configuration"),
]
BlogIndexPage.promote_panels = Page.promote_panels
# Blog page
@ -335,7 +398,7 @@ class BlogPageTag(TaggedItemBase):
class BlogPage(Page):
body = RichTextField()
body = StreamField(DemoStreamBlock())
tags = ClusterTaggableManager(through=BlogPageTag, blank=True)
date = models.DateField("Post date")
feed_image = models.ForeignKey(
@ -346,9 +409,11 @@ class BlogPage(Page):
related_name='+'
)
search_fields = Page.search_fields + (
search_fields = Page.search_fields + [
index.SearchField('body'),
)
]
api_fields = ['body', 'tags', 'date', 'feed_image', 'carousel_items', 'related_links']
@property
def blog_index(self):
@ -358,13 +423,12 @@ class BlogPage(Page):
BlogPage.content_panels = [
FieldPanel('title', classname="full title"),
FieldPanel('date'),
FieldPanel('body', classname="full"),
InlinePanel(BlogPage, 'carousel_items', label="Carousel items"),
InlinePanel(BlogPage, 'related_links', label="Related links"),
StreamFieldPanel('body'),
InlinePanel('carousel_items', label="Carousel items"),
InlinePanel('related_links', label="Related links"),
]
BlogPage.promote_panels = [
MultiFieldPanel(Page.promote_panels, "Common page configuration"),
BlogPage.promote_panels = Page.promote_panels + [
ImageChooserPanel('feed_image'),
FieldPanel('tags'),
]
@ -396,12 +460,14 @@ class PersonPage(Page, ContactFields):
related_name='+'
)
search_fields = Page.search_fields + (
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"),
@ -411,11 +477,10 @@ PersonPage.content_panels = [
FieldPanel('biography', classname="full"),
ImageChooserPanel('image'),
MultiFieldPanel(ContactFields.panels, "Contact"),
InlinePanel(PersonPage, 'related_links', label="Related links"),
InlinePanel('related_links', label="Related links"),
]
PersonPage.promote_panels = [
MultiFieldPanel(Page.promote_panels, "Common page configuration"),
PersonPage.promote_panels = Page.promote_panels + [
ImageChooserPanel('feed_image'),
]
@ -432,9 +497,11 @@ class ContactPage(Page, ContactFields):
related_name='+'
)
search_fields = Page.search_fields + (
search_fields = Page.search_fields + [
index.SearchField('body'),
)
]
api_fields = ['body', 'feed_image'] + ContactFields.api_fields
ContactPage.content_panels = [
FieldPanel('title', classname="full title"),
@ -442,8 +509,7 @@ ContactPage.content_panels = [
MultiFieldPanel(ContactFields.panels, "Contact"),
]
ContactPage.promote_panels = [
MultiFieldPanel(Page.promote_panels, "Common page configuration"),
ContactPage.promote_panels = Page.promote_panels + [
ImageChooserPanel('feed_image'),
]
@ -457,9 +523,11 @@ class EventIndexPageRelatedLink(Orderable, RelatedLink):
class EventIndexPage(Page):
intro = RichTextField(blank=True)
search_fields = Page.search_fields + (
search_fields = Page.search_fields + [
index.SearchField('intro'),
)
]
api_fields = ['intro', 'related_links']
@property
def events(self):
@ -478,12 +546,10 @@ class EventIndexPage(Page):
EventIndexPage.content_panels = [
FieldPanel('title', classname="full title"),
FieldPanel('intro', classname="full"),
InlinePanel(EventIndexPage, 'related_links', label="Related links"),
InlinePanel('related_links', label="Related links"),
]
EventIndexPage.promote_panels = [
MultiFieldPanel(Page.promote_panels, "Common page configuration"),
]
EventIndexPage.promote_panels = Page.promote_panels
# Event page
@ -519,6 +585,8 @@ class EventPageSpeaker(Orderable, LinkFields):
MultiFieldPanel(LinkFields.panels, "Link"),
]
api_fields = ['first_name', 'last_name', 'image']
class EventPage(Page):
date_from = models.DateField("Start date")
@ -543,11 +611,13 @@ class EventPage(Page):
related_name='+'
)
search_fields = Page.search_fields + (
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):
@ -582,14 +652,13 @@ EventPage.content_panels = [
FieldPanel('audience'),
FieldPanel('cost'),
FieldPanel('signup_link'),
InlinePanel(EventPage, 'carousel_items', label="Carousel items"),
InlinePanel('carousel_items', label="Carousel items"),
FieldPanel('body', classname="full"),
InlinePanel(EventPage, 'speakers', label="Speakers"),
InlinePanel(EventPage, 'related_links', label="Related links"),
InlinePanel('speakers', label="Speakers"),
InlinePanel('related_links', label="Related links"),
]
EventPage.promote_panels = [
MultiFieldPanel(Page.promote_panels, "Common page configuration"),
EventPage.promote_panels = Page.promote_panels + [
ImageChooserPanel('feed_image'),
]
@ -597,6 +666,7 @@ EventPage.promote_panels = [
class FormField(AbstractFormField):
page = ParentalKey('FormPage', related_name='form_fields')
class FormPage(AbstractEmailForm):
intro = RichTextField(blank=True)
thank_you_text = RichTextField(blank=True)
@ -604,48 +674,13 @@ class FormPage(AbstractEmailForm):
FormPage.content_panels = [
FieldPanel('title', classname="full title"),
FieldPanel('intro', classname="full"),
InlinePanel(FormPage, 'form_fields', label="Form fields"),
InlinePanel('form_fields', label="Form fields"),
FieldPanel('thank_you_text', classname="full"),
MultiFieldPanel([
FieldPanel('to_address', classname="full"),
FieldPanel('from_address', classname="full"),
FieldPanel('subject', classname="full"),
], "Email")
FieldRowPanel([
FieldPanel('from_address', classname="col6"),
FieldPanel('to_address', classname="col6"),
]),
FieldPanel('subject'),
], "Email"),
]
# Signal handler to load demo data from fixtures after migrations have completed
@receiver(post_migrate)
def import_demo_data(sender, **kwargs):
# post_migrate will be fired after every app is migrated; we only want to do the import
# after demo has been migrated
if kwargs['app'] != 'demo':
return
# Check that there isn't already meaningful data in the db that would be clobbered.
# A freshly created databases should contain no images, tags or snippets
# and just two page records: root and homepage.
if Image.objects.count() or Tag.objects.count() or Advert.objects.count() or Page.objects.count() > 2:
return
# furthermore, if any page has a more specific type than Page, that suggests that meaningful
# data has been added
for page in Page.objects.all():
if page.specific_class != Page:
return
import os, shutil
from django.conf import settings
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)

View file

@ -0,0 +1,63 @@
/* 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;
}

View file

@ -1,71 +1,162 @@
$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;
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
}
/* Carousel styling */
.bx-wrapper {
width: 100%;
margin-left: 0;
}
.bx-wrapper img {
width: 100%;
height: auto;
}
/* body image styles - classes supplied by rich text editor */
.body-content {
width: 100%;
overflow: hidden;
clear: both;
img {
margin-bottom: 2%;
margin-top: 2%;
}
width: 100%;
overflow: hidden;
clear: both;
margin-bottom: 1em;
img {
margin-bottom: 2%;
margin-top: 2%;
}
img.full-width {
width: 100%;
}
img.full-width {
width: 100%;
}
img.left {
width: 45%;
margin-right: 5%;
float: left;
}
img.left{
width: 45%;
margin-right: 5%;
float: left;
}
img.right {
width: 45%;
margin-left: 5%;
float: right;
}
img.right{
width: 45%;
margin-left: 5%;
float: right;
}
h2, h3, h4, h5 {
clear: both;
}
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%;
}
}
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;
text-align: center;
}
.col-sm-4.next {
text-align: right;
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%);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -1,197 +0,0 @@
/**
* BxSlider v4.0 - Fully loaded, responsive content slider
* http://bxslider.com
*
* Written by: Steven Wanderski, 2012
* http://stevenwanderski.com
* (while drinking Belgian ales and listening to jazz)
*
* CEO and founder of bxCreative, LTD
* http://bxcreative.com
*/
/** RESET AND LAYOUT
===================================*/
.bx-wrapper {
position: relative;
margin: 0 auto 60px;
padding: 0;
*zoom: 1;
}
.bx-wrapper img {
max-width: 100%;
display: block;
}
/** THEME
===================================*/
.bx-wrapper .bx-viewport {
-moz-box-shadow: 0 0 5px #ccc;
-webkit-box-shadow: 0 0 5px #ccc;
box-shadow: 0 0 5px #ccc;
border: solid #fff 5px;
left: -5px;
background: none;
}
.bx-wrapper .bx-pager,
.bx-wrapper .bx-controls-auto {
position: absolute;
bottom: -30px;
width: 100%;
}
/* LOADER */
.bx-wrapper .bx-loading {
min-height: 50px;
background: url(images/bx_loader.gif) center center no-repeat #fff;
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 2000;
}
/* PAGER */
.bx-wrapper .bx-pager {
text-align: center;
font-size: .85em;
font-family: Arial;
font-weight: bold;
color: #666;
padding-top: 20px;
}
.bx-wrapper .bx-pager .bx-pager-item,
.bx-wrapper .bx-controls-auto .bx-controls-auto-item {
display: inline-block;
*zoom: 1;
*display: inline;
}
.bx-wrapper .bx-pager.bx-default-pager a {
background: #666;
text-indent: -9999px;
display: block;
width: 10px;
height: 10px;
margin: 0 5px;
outline: 0;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
.bx-wrapper .bx-pager.bx-default-pager a:hover,
.bx-wrapper .bx-pager.bx-default-pager a.active {
background: #000;
}
/* DIRECTION CONTROLS (NEXT / PREV) */
.bx-wrapper .bx-prev {
left: 10px;
background: url(images/controls.png) no-repeat 0 -32px;
}
.bx-wrapper .bx-next {
right: 10px;
background: url(images/controls.png) no-repeat -43px -32px;
}
.bx-wrapper .bx-prev:hover {
background-position: 0 0;
}
.bx-wrapper .bx-next:hover {
background-position: -43px 0;
}
.bx-wrapper .bx-controls-direction a {
position: absolute;
top: 50%;
margin-top: -16px;
outline: 0;
width: 32px;
height: 32px;
text-indent: -9999px;
z-index: 9999;
}
.bx-wrapper .bx-controls-direction a.disabled {
display: none;
}
/* AUTO CONTROLS (START / STOP) */
.bx-wrapper .bx-controls-auto {
text-align: center;
}
.bx-wrapper .bx-controls-auto .bx-start {
display: block;
text-indent: -9999px;
width: 10px;
height: 11px;
outline: 0;
background: url(images/controls.png) -86px -11px no-repeat;
margin: 0 3px;
}
.bx-wrapper .bx-controls-auto .bx-start:hover,
.bx-wrapper .bx-controls-auto .bx-start.active {
background-position: -86px 0;
}
.bx-wrapper .bx-controls-auto .bx-stop {
display: block;
text-indent: -9999px;
width: 9px;
height: 11px;
outline: 0;
background: url(images/controls.png) -86px -44px no-repeat;
margin: 0 3px;
}
.bx-wrapper .bx-controls-auto .bx-stop:hover,
.bx-wrapper .bx-controls-auto .bx-stop.active {
background-position: -86px -33px;
}
/* PAGER WITH AUTO-CONTROLS HYBRID LAYOUT */
.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-pager {
text-align: left;
width: 80%;
}
.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-controls-auto {
right: 0;
width: 35px;
}
/* IMAGE CAPTIONS */
.bx-wrapper .bx-caption {
position: absolute;
bottom: 0;
left: 0;
background: #666\9;
background: rgba(80, 80, 80, 0.75);
width: 100%;
}
.bx-wrapper .bx-caption span {
color: #fff;
font-family: Arial;
display: block;
font-size: .85em;
padding: 10px;
}

View file

@ -1,8 +1,6 @@
$(document).ready(function(){
/* Initialise bxSlider */
$('.bxslider').bxSlider({
captions: true
});
// Initializes tooltips
$('[title]').tooltip({container: 'body'});
//Apply img-thumbnail class to body-content images
$('.body-content img').addClass("img-thumbnail");

File diff suppressed because one or more lines are too long

View file

@ -13,18 +13,13 @@
<meta name="description" content="{% if self.search_description %}{{ self.search_description }}{% endif %}">
{# External stylesheets #}
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />
{# Local static assets such as css, images and javascrpt should be stored at [yourapp]/static/[yourapp]/... #}
{% compress css %}
{# Vendor stylesheets stored locally #}
<link rel="stylesheet" href="{% static "demo/css/vendor/jquery.bxslider.css" %}" />
{# Custom stylesheets #}
{# SCSS compilation relies on django compressor #}
<link rel="stylesheet" type="text/x-scss" href="{% static "demo/css/main.scss" %}" />
{% endcompress %}
{% block extra_css %}{% endblock %} {# Override this block in individual templates in order to add stylesheets on a template by template basis #}
@ -59,42 +54,29 @@
{% top_menu parent=site_root calling_page=self %}
{% endblock %}
<div class="container theme-showcase">
<div class="jumbotron">
<h1>Wagtail Demo</h1>
<p>A set of demo templates to show you what Wagtail can do.</p>
{% block search_box %}
{% include "demo/includes/search_box.html" only %}
{% endblock %}
</div>
<div class="main container">
{% breadcrumbs %}
{% block heading %}
<div class="page-header">
<h2>{{ self.title }}</h2>
<h1>{{ self.title }}</h1>
</div>
{% endblock %}
{% block content %}
{% block content %}{% endblock %}
{% endblock %}
{% block secondary_menu %}
{% secondary_menu calling_page=self %}
{% endblock %}
{% block adverts %}
{# Uses a snippet - allows adverts to appear on every page #}
{% adverts %}
{% endblock %}
{% include 'demo/includes/prev_next.html' %}
</div>
{% adverts %}
{# External javascript #}
<script src="https://code.jquery.com/jquery-2.0.3.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
{% compress js %}
<script src="{% static "demo/js/vendor/jquery.bxslider.min.js" %}"></script>
<script src="{% static "demo/js/vendor/fluidvids.js" %}"></script>
{# Custom javascript #}
{# Local static assets such as css, images and javascrpt should be stored at [yourapp]/static/[yourapp]/... #}

View file

@ -6,7 +6,7 @@
{% include "demo/includes/intro.html" with intro=self.intro only %}
{% if request.GET.tag|length %}
<h4>Showing posts tagged as {{ request.GET.tag|safe }} <a href=" {% pageurl self %} ">Show all</a></h4>
<h4>Showing posts tagged as {{ request.GET.tag }} <a href=" {% pageurl self %} ">Show all</a></h4>
{% endif %}
<div class="list-group">
@ -38,4 +38,4 @@
</div>
{% include "demo/includes/related_links.html" with related_links=self.related_links.all only %}
{% endblock %}
{% endblock %}

View file

@ -2,27 +2,34 @@
{% load wagtailcore_tags %}
{% if self.date %}
{% block heading %}
<div class="page-header">
<h2>{{ self.title }} {{ self.date|date:"j F Y" }}</h2>
</div>
{% endblock %}
{% endif %}
{% block heading %}
<div class="page-header">
<div class="pull-right">
{% for tag in self.tags.all %}
<a href="{% pageurl self.blog_index %}?tag={{ tag }}"
class="btn btn-primary btn-xs">
<i class="glyphicon glyphicon-tag"></i> {{ tag }}
</a>
{% endfor %}
</div>
<h2>
{{ self.title }}
{% if self.date %}<small>{{ self.date }}</small>{% endif %}
</h2>
</div>
{% endblock %}
{% block content %}
{% include "demo/includes/carousel.html" with carousel_items=self.carousel_items.all only %}
{% include "demo/includes/body.html" with body=self.body only %}
{% with self.tags.all as tags %}
{% if tags %}
<div class="page-header"><h3>Tags</h3></div>
{% for tag in tags %}
<a href="{% pageurl self.blog_index %}?tag={{ tag }}"><button class="btn btn-primary" type="button">{{ tag }}</button></a>
{% endfor %}
{% endif %}
{% endwith %}
{% if self.body %}
<div class="body-content">
{% include "demo/includes/streamfield.html" with content=self.body %}
</div>
{% endif %}
{% include "demo/includes/related_links.html" with related_links=self.related_links.all only %}
{% endblock %}

View file

@ -1,19 +1,22 @@
{% extends "demo/base.html" %}
{% load demo_tags %}
{% load demo_tags wagtailcore_tags %}
{% block content %}
{% include "demo/includes/body.html" with body=self.body only %}
{% if self.body %}
<div class="body-content">
{{ self.body|richtext }}
</div>
{% endif %}
{% include "demo/includes/contact.html" with contact=self only %}
{% if self.post_code %}
{% get_googe_maps_key as google_maps_key %}
<div class="page-header"><h3>Map</h3></div>
{% get_google_maps_key as google_maps_key %}
<img src="http://maps.googleapis.com/maps/api/staticmap?center={{ self.post_code }}&zoom=13&size=800x400&maptype=roadmap
&sensor=false&markers=color:green|{{ self.post_code }}{% if google_maps_key %}&key={{ google_maps_key }}{% endif %}" />
{% endif %}
<div class="page-header"><h3>Map</h3></div>
<img src="http://maps.googleapis.com/maps/api/staticmap?center={{ self.post_code }}&amp;zoom=13&amp;size=800x400&amp;maptype=roadmap&amp;sensor=false&amp;markers=color:green|{{ self.post_code }}{% if google_maps_key %}&amp;key={{ google_maps_key }}{% endif %}" />
{% endif %}
{% endblock %}

View file

@ -4,8 +4,8 @@
{% block content %}
<div class="well">
<p><strong>
{{ self.date_from|date:"j F Y" }}{% if self.date_to %} to {{ self.date_to|date:"j F Y" }}{% endif %}
{% if self.time_from %}{{ self.time_from|time_display }}{% endif %}{% if self.time_to %} to {{ self.time_to|time_display }}{% endif %}
{{ 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 %}
</strong></p>
{% if self.location %}<p>Location: {{ self.location }}</p>{% endif %}
{% if self.audience %}
@ -14,7 +14,7 @@
{{ self.get_audience_display }}</p>
{% endif %}
{% if self.cost %}
<p>Cost: {{ self.cost|safe }}</p>
<p>Cost: {{ self.cost }}</p>
{% endif %}
{% if self.signup_link %}
@ -30,7 +30,11 @@
{% include "demo/includes/carousel.html" with carousel_items=self.carousel_items.all only %}
{% include "demo/includes/body.html" with body=self.body only %}
{% if self.body %}
<div class="body-content">
{{ self.body|richtext }}
</div>
{% endif %}
{% with self.speakers.all as speakers %}
{% if speakers %}

View file

@ -2,10 +2,25 @@
{% load demo_tags %}
{% block heading %}
<div class="jumbotron">
<h1>Wagtail Demo</h1>
<p>A set of demo templates to show you what Wagtail can do.</p>
{% block search_box %}
{% include "demo/includes/search_box.html" only %}
{% endblock %}
</div>
{% endblock %}
{% block content %}
{% include "demo/includes/carousel.html" with carousel_items=self.carousel_items.all only %}
{% include "demo/includes/body.html" with body=self.body only %}
{% if self.body %}
<div class="body-content">
{% include "demo/includes/streamfield.html" with content=self.body %}
</div>
{% endif %}
{% person_listing_homepage %}

View file

@ -2,16 +2,19 @@
{# Individual blog item in a list - used on blog index and home page #}
<a class="list-group-item" href="{% pageurl blog %}">
<h4 class="list-group-item-heading">{{ blog.title }}</h4>
<p><strong>{{ blog.date|date:"j F Y" }}</strong></p>
{% if blog.search_description or blog.feed_image %}
<p class="list-group-item-text">
{% if blog.feed_image %}
{% image blog.feed_image width-200 %}
{% endif %}
{% if blog.search_description %}
{{ blog.search_description }}
{% endif %}
</p>
<div class="media">
{% if blog.feed_image %}
<div class="media-left">
{% image blog.feed_image width-200 as img %}
<img class="media-object" src="{{ img.url }}" />
</div>
{% endif %}
</a>
<div class="media-body">
<h4 class="media-heading">{{ blog.title }}</h4>
<p><strong>{{ blog.date }}</strong></p>
{% if blog.search_description %}
<p>{{ blog.search_description }}</p>
{% endif %}
</div>
</div>
</a>

View file

@ -1,7 +0,0 @@
{% load wagtailcore_tags %}
{% if body %}
<div class="body-content">
{{ body|richtext }}
</div>
{% endif %}

View file

@ -1,20 +1,50 @@
{% load wagtailimages_tags wagtailembeds_tags %}
{% if carousel_items %}
<ul class="bxslider">
<div id="carousel" class="carousel slide" data-ride="carousel">
{% if carousel_items|length > 1 %}
<ol class="carousel-indicators">
{% for carousel_item in carousel_items %}
<li>
<a href="{{ carousel_item.link }}">
{% if carousel_item.embed_url %}
{# Embedded video - requires an embedly key to be stored in wagtaildemo/settings/local.py #}
{{ carousel_item.embed_url|embed:1000 }}
{% else %}
{# Carousel image - first store image as a variable in order to construct an image tag with a title applied (title is used by bxslider js to construct the caption) #}
{% image carousel_item.image width-1000 as carouselimagedata %}
<img src="{{ carouselimagedata.url }}" width="{{ carouselimagedata.width }}" height="{{ carouselimagedata.height }}" alt="{{ carouselimagedata.alt }}" title="{{ carousel_item.caption }}" />
{% endif %}
</a>
</li>
<li data-target="#carousel" data-slide-to="{{ forloop.counter0 }}"{% if forloop.first %} class="active"{% endif %}></li>
{% endfor %}
</ul>
</ol>
{% endif %}
<div class="carousel-inner" role="listbox">
{% for carousel_item in carousel_items %}
<div class="item{% if forloop.first %} active{% endif %}">
{% if carousel_item.embed_url %}
{# Embedded video - requires an embedly key to be stored in wagtaildemo/settings/local.py #}
<div class="text-center">
{% embed carousel_item.embed_url 1000 %}
</div>
{% else %}
{# Carousel image - first store image as a variable in order to construct an image tag with a title applied (title is used by bxslider js to construct the caption) #}
{% image carousel_item.image width-1000 as carouselimagedata %}
<img src="{{ carouselimagedata.url }}" style="width: 100%; min-height: {{ carouselimagedata.height }}px;" alt="{{ carouselimagedata.alt }}" />
{% endif %}
{% if carousel_item.caption or carousel_item.link %}
<div class="carousel-caption">
<h3>{{ carousel_item.caption }}</h3>
{% if carousel_item.link %}
<a href="{{ carousel_item.link }}" class="btn btn-primary">Open</a>
{% endif %}
</div>
{% endif %}
</div>
{% endfor %}
</div>
{% if carousel_items|length > 1 %}
<a class="left carousel-control" href="#carousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
{% endif %}
</div>
{% endif %}

View file

@ -2,16 +2,19 @@
{# Individual event item in a list - used on event index and home page #}
<a class="list-group-item" href="{% pageurl event %}">
<h4 class="list-group-item-heading">{{ event.title }}</h4>
<p><strong>{{ event.date_from|date:"j F Y" }}{% if event.date_to %} to {{ event.date_to|date:"j F Y" }}{% endif %}</strong></p>
{% if event.search_description or event.feed_image %}
<p class="list-group-item-text">
{% if event.feed_image %}
{% image event.feed_image width-200 %}
{% endif %}
{% if event.search_description %}
{{ event.search_description }}
{% endif %}
</p>
<div class="media">
{% if event.feed_image %}
<div class="media-left">
{% image event.feed_image width-200 as img %}
<img class="media-object" src="{{ img.url }}" />
</div>
{% endif %}
</a>
<div class="media-body">
<h4 class="media-heading">{{ event.title }}</h4>
<p><strong>{{ event.date_from }}{% if event.date_to %} to {{ event.date_to }}{% endif %}</strong></p>
{% if event.search_description %}
<p>{{ event.search_description }}</p>
{% endif %}
</div>
</div>
</a>

View file

@ -0,0 +1,19 @@
{% load wagtailcore_tags wagtailimages_tags %}
{# Individual person item in a list - used on people index and home page #}
<a class="list-group-item" href="{% pageurl person %}">
<div class="media">
{% if person.feed_image %}
<div class="media-left">
{% image person.feed_image width-200 as img %}
<img class="media-object" src="{{ img.url }}" />
</div>
{% endif %}
<div class="media-body">
<h4 class="media-heading">{{ person.first_name }} {{ person.last_name }}</h4>
{% if person.search_description %}
<p>{{ person.search_description }}</p>
{% endif %}
</div>
</div>
</a>

View file

@ -0,0 +1,22 @@
{% 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 %}
<nav>
<ul class="pager">
<li class="previous{% if not prev %} disabled{% endif %}">
<a href="{% if prev %}{% pageurl prev %}{% else %}#{% endif %}"
{% if prev %}title="{{ prev }}"{% endif %}>
<i class="glyphicon glyphicon-menu-left" aria-hidden="true"></i> Previous
</a>
</li>
<li class="next{% if not next %} disabled{% endif %}">
<a href="{% if next %}{% pageurl next %}{% else %}#{% endif %}"
{% if next %}title="{{ next }}"{% endif %}>
Next <i class="glyphicon glyphicon-menu-right" aria-hidden="true"></i>
</a>
</li>
</ul>
</nav>
{% endwith %}
{% endif %}

View file

@ -1,4 +1,14 @@
<form action="{% url 'wagtailsearch_search' %}" method="get">
<input type="text" name="q"{% if query_string %} value="{{ query_string }}"{% endif %}>
<input type="submit" class="btn btn-primary btn-sm" value="Search">
</form>
<form action="{% url 'search' %}" class="form-inline" method="get">
<div class="row">
<div class="col-sm-5">
<div class="input-group">
<input type="text" name="query" class="form-control" />
<div class="input-group-btn">
<button type="submit" class="btn btn-primary">
<i class="glyphicon glyphicon-search"></i> Search
</button>
</div>
</div>
</div>
</div>
</form>

View file

@ -0,0 +1,46 @@
{% load wagtailcore_tags wagtailimages_tags %}
<div class="stream-field">
{% for child in content %}
{% if child.block_type == 'h2' %}
<h2>{{ child }}</h2>
{% elif child.block_type == 'h3' %}
<h3>{{ child }}</h3>
{% elif child.block_type == 'h4' %}
<h4>{{ child }}</h4>
{% elif child.block_type == 'intro' %}
<div class="intro">{{ child }}</div>
{% 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' %}
<blockquote>
{{ child.value.quote }}
{% if child.value.attribution %}<span>- {{ child.value.attribution }}</span>{% endif %}
</blockquote>
{% elif child.block_type == 'paragraph' %}
{{ child.value|richtext }}
{% elif child.block_type == 'aligned_image' %}
<div class="img-wrapper {{ child.value.alignment }}">
{% 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 %}
<img src="{{ theimage.url }}" width="{{ theimage.width }}" height="{{ theimage.height }}" alt="{{ theimage.alt }}" />
{% if child.value.caption %}
<div class="caption">
{{ child.value.caption|richtext }}
</div>
{% endif %}
</div>
{% else %}
{{ child }}
{% endif %}
{% endfor %}
</div>

View file

@ -1,20 +1,22 @@
{% extends "demo/base.html" %}
{% load wagtailimages_tags %}
{% load wagtailcore_tags wagtailimages_tags %}
{% block content %}
{% include "demo/includes/intro.html" with intro=self.intro only %}
{% if self.image %}
{# Person image - first store image as a variable in order to construct an image tag with a class applied #}
{% image self.image width-300 as photo %}
<img src="{{ photo.url }}" width="{{ photo.width }}" height="{{ photo.height }}" alt="{{ photo.alt }}" class="img-thumbnail" />
{% image self.image width-300 class="img-thumbnail" %}
{% endif %}
{% if self.biography %}
<div class="page-header"><h3>Biography</h3></div>
{% endif %}
{% include "demo/includes/body.html" with body=self.biography only %}
{% if self.body %}
<div class="body-content">
{{ self.body|richtext }}
</div>
{% endif %}
{% include "demo/includes/contact.html" with contact=self only %}

View file

@ -1,41 +1,44 @@
{% extends "demo/base.html" %}
{% load wagtailcore_tags %}
{% block title %}Search{% if search_results %} Results{% endif %}{% endblock %}
{% block title %}Search{% if search_results %} results{% endif %}{% endblock %}
{% block search_box %}
{% include "demo/includes/search_box.html" with query_string=query_string only %}
{% block heading %}
<h1 class="page-header">
Search results{% if request.GET.query %} for “{{ request.GET.query }}”{% endif %}
</h1>
{% endblock %}
{% block content %}
<h2>Search Results{% if request.GET.q %} for {{ request.GET.q }}{% endif %}</h2>
{% with query.editors_picks.all as editors_picks %}
{% if editors_picks %}
<div class="well">
{% if search_picks %}
<div class="well">
<h3>Editors picks</h3>
<ul>
{% for editors_pick in editors_picks %}
<li>
<h4><a href="{% pageurl editors_pick.page %}">{{ editors_pick.page.title }}</a></h4>
<p>{{ editors_pick.description|safe }}</p>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endwith %}
<ul>
{% for pick in search_picks %}
<li>
<h4><a href="{% pageurl pick.page %}">{{ pick.page.title }}</a></h4>
<p>{{ pick.description }}</p>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
<ul>
{% for result in search_results %}
<li>
<h4><a href="{% pageurl result.specific %}">{{ result.specific }}</a></h4>
{% if result.specific.search_description %}
{{ result.specific.search_description|safe }}
{% endif %}
</li>
{% empty %}
<li>No results found</li>
{% endfor %}
</ul>
{% if search_results %}
<ul>
{% for result in search_results %}
<li>
<h4><a href="{% pageurl result.specific %}">{{ result.specific }}</a></h4>
{% if result.specific.search_description %}
{{ result.specific.search_description }}
{% endif %}
</li>
{% endfor %}
</ul>
{% elif search_query %}
No results found
{% else %}
You didnt search anything!
{% endif %}
{% endblock %}

View file

@ -1,11 +1,17 @@
{% 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 %}
{% include "demo/includes/body.html" with body=self.body only %}
{% if self.body %}
<div class="body-content">
{{ self.body|richtext }}
</div>
{% endif %}
{% include "demo/includes/related_links.html" with related_links=self.related_links.all only %}
{% endblock %}

View file

@ -1,6 +1,18 @@
{% load wagtailcore_tags %}
{% for advert in adverts %}
{% if advert.url %}<a href="{{ advert.url }}">{% elif advert.page %}<a href="{% pageurl advert.page %}">{% endif %}
<p>{{ advert.text }}</p>
{% if advert.url or advert.page %}</a>{% endif %}
{% endfor %}
{% if adverts %}
<ul class="advert-list list-inline text-center">
{% for advert in adverts %}
<li>
{% if advert.url %}
<a href="{{ advert.url }}">
{% elif advert.page %}
<a href="{% pageurl advert.page %}">
{% endif %}
{{ advert.text }}
{% if advert.url or advert.page %}</a>{% endif %}
</li>
{% if not forloop.last %}<li><strong>·</strong></li>{% endif %}
{% endfor %}
</ul>
{% endif %}

View file

@ -1,8 +1,10 @@
{% if blogs %}
<div class="page-header"><h3>Recent blog posts</h3></div>
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">Recent blog posts</h3></div>
<div class="list-group">
{% for blog in blogs %}
{% include "demo/includes/blog_list_item.html" %}
{% endfor %}
{% for blog in blogs %}
{% include "demo/includes/blog_list_item.html" %}
{% endfor %}
</div>
</div>
{% endif %}

View file

@ -0,0 +1,13 @@
{% load wagtailcore_tags %}
{% if ancestors %}
<ol class="breadcrumb">
{% for ancestor in ancestors %}
{% if forloop.last %}
<li class="active">{{ ancestor }}</li>
{% else %}
<li><a href="{% pageurl ancestor %}">{{ ancestor }}</a></li>
{% endif %}
{% endfor %}
</ol>
{% endif %}

View file

@ -1,8 +1,10 @@
{% if events %}
<div class="page-header"><h3>Upcoming events</h3></div>
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">Upcoming events</h3></div>
<div class="list-group">
{% for event in events %}
{% include "demo/includes/event_list_item.html" %}
{% endfor %}
{% for event in events %}
{% include "demo/includes/event_list_item.html" %}
{% endfor %}
</div>
</div>
{% endif %}

View file

@ -1,21 +1,10 @@
{% load wagtailcore_tags wagtailimages_tags %}
{% if people %}
<div class="page-header"><h3>People</h3></div>
<div class="list-group people">
{% for person in people %}
<a class="list-group-item" href="{% pageurl person %}">
<h4 class="list-group-item-heading"> {{ person.first_name }} {{ person.last_name }}</h4>
{% if person.search_description or person.image %}
<p class="list-group-item-text">
{% if person.image %}
{% image person.feed_image width-200 %}
{% endif %}
{% if person.search_description %}
{{ person.search_description }}
{% endif %}
</p>
{% endif %}
</a>
{% endfor %}
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">People</h3></div>
<div class="list-group">
{% for person in people %}
{% include "demo/includes/person_list_item.html" %}
{% endfor %}
</div>
{% endif %}
</div>
{% endif %}

View file

@ -1,22 +0,0 @@
{% load wagtailcore_tags %}
{% if pages %}
<div class="page-header"></div>
<div class="row">
<div class="col-sm-4">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Also in this section</h3>
</div>
<div class="panel-body">
<ul>
{% for page in pages %}
<li><a href="{% pageurl page %}">{{ page.title }}</a></li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
{% endif %}

View file

@ -12,12 +12,14 @@
<span class="icon-bar"></span>
</button>
{# Link to home page #}
<a href="{% pageurl site_root %}" class="navbar-brand">{{ site_root.title }}</a>
<a href="{% pageurl site_root %}" class="navbar-brand" title="{{ site_root.title }}" data-placement="bottom">
<i class="glyphicon glyphicon-home"></i>
</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
{% for menuitem in menuitems %}
<li class="{% if menuitem.show_dropdown %}dropdown{% endif %}{% if calling_page.url == menuitem.url %} active{% endif %}">
<li class="{% if menuitem.show_dropdown %}dropdown{% endif %}{% if menuitem.active %} active{% endif %}">
{% if menuitem.show_dropdown %}
<a data-toggle="dropdown" class="dropdown-toggle" href="#">{{ menuitem.title }} <b class="caret"></b></a>
{% top_menu_children parent=menuitem %}
@ -27,6 +29,16 @@
</li>
{% endfor %}
</ul>
<form class="navbar-form navbar-right" role="search" action="{% url 'search' %}" method="get">
<div class="input-group">
<input type="text" name="query" class="form-control" placeholder="Search…" value="{{ search_query }}" />
<div class="input-group-btn">
<button type="submit" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>
</button>
</div>
</div>
</form>
</div>
</div>
</div>

View file

@ -2,14 +2,14 @@ from datetime import date
from django import template
from django.conf import settings
from demo.models import *
from demo.models import PersonPage, BlogPage, EventPage, Advert, Page
register = template.Library()
# settings value
@register.assignment_tag
def get_googe_maps_key():
def get_google_maps_key():
return getattr(settings, 'GOOGLE_MAPS_KEY', "")
@ -21,10 +21,7 @@ def get_site_root(context):
def has_menu_children(page):
if page.get_children().filter(live=True, show_in_menus=True):
return True
else:
return False
return page.get_children().live().in_menu().exists()
# Retrieves the top menu items - the immediate children of the parent page
@ -32,12 +29,14 @@ def has_menu_children(page):
# 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().filter(
live=True,
show_in_menus=True
)
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,
@ -50,10 +49,7 @@ def top_menu(context, parent, calling_page=None):
@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.filter(
live=True,
show_in_menus=True
)
menuitems_children = menuitems_children.live().in_menu()
return {
'parent': parent,
'menuitems_children': menuitems_children,
@ -62,30 +58,6 @@ def top_menu_children(context, parent):
}
# Retrieves the secondary links for the 'also in this section' links
# - either the children or siblings of the current page
@register.inclusion_tag('demo/tags/secondary_menu.html', takes_context=True)
def secondary_menu(context, calling_page=None):
pages = []
if calling_page:
pages = calling_page.get_children().filter(
live=True,
show_in_menus=True
)
# If no children, get siblings instead
if len(pages) == 0:
pages = calling_page.get_siblings(inclusive=False).filter(
live=True,
show_in_menus=True
)
return {
'pages': pages,
# 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(
@ -93,7 +65,7 @@ def secondary_menu(context, calling_page=None):
takes_context=True
)
def standard_index_listing(context, calling_page):
pages = calling_page.get_children().filter(live=True)
pages = calling_page.get_children().live()
return {
'pages': pages,
# required by the pageurl tag that we want to use within this template
@ -107,9 +79,9 @@ def standard_index_listing(context, calling_page):
takes_context=True
)
def person_listing_homepage(context, count=2):
people = PersonPage.objects.filter(live=True).order_by('?')
people = PersonPage.objects.live().order_by('?')
return {
'people': people[:count],
'people': people[:count].select_related('feed_image'),
# required by the pageurl tag that we want to use within this template
'request': context['request'],
}
@ -121,9 +93,9 @@ def person_listing_homepage(context, count=2):
takes_context=True
)
def blog_listing_homepage(context, count=2):
blogs = BlogPage.objects.filter(live=True).order_by('-date')
blogs = BlogPage.objects.live().order_by('-date')
return {
'blogs': blogs[:count],
'blogs': blogs[:count].select_related('feed_image'),
# required by the pageurl tag that we want to use within this template
'request': context['request'],
}
@ -135,10 +107,10 @@ def blog_listing_homepage(context, count=2):
takes_context=True
)
def event_listing_homepage(context, count=2):
events = EventPage.objects.filter(live=True)
events = EventPage.objects.live()
events = events.filter(date_from__gte=date.today()).order_by('date_from')
return {
'events': events[:count],
'events': events[:count].select_related('feed_image'),
# required by the pageurl tag that we want to use within this template
'request': context['request'],
}
@ -148,41 +120,21 @@ def event_listing_homepage(context, count=2):
@register.inclusion_tag('demo/tags/adverts.html', takes_context=True)
def adverts(context):
return {
'adverts': Advert.objects.all(),
'adverts': Advert.objects.select_related('page'),
'request': context['request'],
}
# Format times e.g. on event page
@register.filter
def time_display(time):
# Get hour and minute from time object
hour = time.hour
minute = time.minute
# Convert to 12 hour format
if hour >= 12:
pm = True
hour -= 12
@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:
pm = False
if hour == 0:
hour = 12
# Hour string
hour_string = str(hour)
# Minute string
if minute != 0:
minute_string = "." + str(minute)
else:
minute_string = ""
# PM string
if pm:
pm_string = "pm"
else:
pm_string = "am"
# Join and return
return "".join([hour_string, minute_string, pm_string])
ancestors = Page.objects.ancestor_of(
self, inclusive=True).filter(depth__gt=2)
return {
'ancestors': ancestors,
'request': context['request'],
}

View file

@ -52,7 +52,8 @@ def export_event(event, format='ical'):
return string
# Make a uid
uid = hashlib.sha1(event.url + str(start_datetime)).hexdigest() + '@wagtaildemo'
event_string = event.url + str(start_datetime)
uid = hashlib.sha1(event_string.encode('utf-8')).hexdigest() + '@wagtaildemo'
# Make event
ical_components.extend([

View file

@ -0,0 +1,45 @@
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,
})

View file

@ -0,0 +1,8 @@
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('<link rel="stylesheet" href="' + settings.STATIC_URL + 'demo/css/admin-streamfield-styles.css">')

View file

@ -1,106 +0,0 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
export WORKON_HOME=$HOME/.virtualenvs
export PIP_DOWNLOAD_CACHE=$HOME/.pip_download_cache
source /usr/local/bin/virtualenvwrapper.sh
alias dj="/home/vagrant/.virtualenvs/wagtaildemo/bin/python /home/vagrant/wagtaildemo/manage.py"
alias djrun="dj runserver 0.0.0.0:8000"

View file

@ -1,68 +0,0 @@
# System-wide .bashrc file for interactive bash(1) shells.
# To enable the settings / commands in this file for login shells as well,
# this file has to be sourced in /etc/profile.
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, overwrite the one in /etc/profile)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
# Commented out, don't overwrite xterm -T "title" -n "icontitle" by default.
# If this is an xterm set the title to user@host:dir
#case "$TERM" in
#xterm*|rxvt*)
# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
# ;;
#*)
# ;;
#esac
# enable bash completion in interactive shells
#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
# . /etc/bash_completion
#fi
# sudo hint
if [ ! -e "$HOME/.sudo_as_admin_successful" ] && [ ! -e "$HOME/.hushlogin" ] ; then
case " $(groups) " in *\ admin\ *)
if [ -x /usr/bin/sudo ]; then
cat <<-EOF
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
EOF
fi
esac
fi
# if the command-not-found package is installed, use it
if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then
function command_not_found_handle {
# check because c-n-f could've been removed in the meantime
if [ -x /usr/lib/command-not-found ]; then
/usr/bin/python /usr/lib/command-not-found -- "$1"
return $?
elif [ -x /usr/share/command-not-found/command-not-found ]; then
/usr/bin/python /usr/share/command-not-found/command-not-found -- "$1"
return $?
else
printf "%s: command not found\n" "$1" >&2
return 127
fi
}
fi
export LANGUAGE=en_GB.UTF-8
export LANG=en_GB.UTF-8
export LC_ALL=en_GB.UTF-8

View file

@ -1,87 +0,0 @@
#!/bin/bash
# Script to set up a Django project on Vagrant.
# Installation settings
PROJECT_NAME=$1
DB_NAME=$PROJECT_NAME
VIRTUALENV_NAME=$PROJECT_NAME
PROJECT_DIR=/home/vagrant/$PROJECT_NAME
VIRTUALENV_DIR=/home/vagrant/.virtualenvs/$PROJECT_NAME
PGSQL_VERSION=9.1
# Need to fix locale so that Postgres creates databases in UTF-8
cp -p $PROJECT_DIR/etc/install/etc-bash.bashrc /etc/bash.bashrc
locale-gen en_GB.UTF-8
dpkg-reconfigure locales
export LANGUAGE=en_GB.UTF-8
export LANG=en_GB.UTF-8
export LC_ALL=en_GB.UTF-8
# Install essential packages from Apt
apt-get update -y
# Python dev packages
apt-get install -y build-essential python python-dev python-setuptools python-pip
# Dependencies for image processing with Pillow (drop-in replacement for PIL)
# supporting: jpeg, tiff, png, freetype, littlecms
# (pip install pillow to get pillow itself)
apt-get install -y libjpeg-dev libtiff-dev zlib1g-dev libfreetype6-dev liblcms2-dev
# Git (we'd rather avoid people keeping credentials for git commits in the repo, but sometimes we need it for pip requirements that aren't in PyPI)
apt-get install -y git
# Optional: install redis (recommended for production sites as a backend
# for Celery and Django cache)
#
# apt-get install -y redis-server
# Postgresql
if ! command -v psql; then
apt-get install -y postgresql-$PGSQL_VERSION libpq-dev
cp $PROJECT_DIR/etc/install/pg_hba.conf /etc/postgresql/$PGSQL_VERSION/main/
/etc/init.d/postgresql reload
fi
# virtualenv global setup
easy_install -U pip
pip install virtualenv virtualenvwrapper stevedore virtualenv-clone
# bash environment global setup
cp -p $PROJECT_DIR/etc/install/bashrc /home/vagrant/.bashrc
su - vagrant -c "mkdir -p /home/vagrant/.pip_download_cache"
# ---
# Optional: install ElasticSearch (for higher-performance / more flexible search functionality)
#
# if ! command -v /usr/share/elasticsearch/bin/elasticsearch; then
# apt-get install -y openjdk-7-jre-headless
# echo "Downloading ElasticSearch..."
# wget -q https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.2.1.deb
# dpkg -i elasticsearch-1.2.1.deb
# service elasticsearch start
# fi
# postgresql setup for project
createdb -Upostgres $DB_NAME
# dependencies for lxml (for HTML whitelisting)
apt-get install -y libxml2-dev libxslt-dev
# virtualenv setup for project
su - vagrant -c "/usr/local/bin/virtualenv $VIRTUALENV_DIR && \
echo $PROJECT_DIR > $VIRTUALENV_DIR/.project && \
PIP_DOWNLOAD_CACHE=/home/vagrant/.pip_download_cache $VIRTUALENV_DIR/bin/pip install -r $PROJECT_DIR/requirements/dev.txt"
echo "workon $VIRTUALENV_NAME" >> /home/vagrant/.bashrc
# Set execute permissions on manage.py, as they get lost if we build from a zip file
chmod a+x $PROJECT_DIR/manage.py
# Django project setup
su - vagrant -c "source $VIRTUALENV_DIR/bin/activate && cd $PROJECT_DIR && python manage.py syncdb --noinput && python manage.py migrate --noinput"

View file

@ -1,89 +0,0 @@
# PostgreSQL Client Authentication Configuration File
# ===================================================
#
# Refer to the "Client Authentication" section in the
# PostgreSQL documentation for a complete description
# of this file. A short synopsis follows.
#
# This file controls: which hosts are allowed to connect, how clients
# are authenticated, which PostgreSQL user names they can use, which
# databases they can access. Records take one of these forms:
#
# local DATABASE USER METHOD [OPTIONS]
# host DATABASE USER CIDR-ADDRESS METHOD [OPTIONS]
# hostssl DATABASE USER CIDR-ADDRESS METHOD [OPTIONS]
# hostnossl DATABASE USER CIDR-ADDRESS METHOD [OPTIONS]
#
# (The uppercase items must be replaced by actual values.)
#
# The first field is the connection type: "local" is a Unix-domain socket,
# "host" is either a plain or SSL-encrypted TCP/IP socket, "hostssl" is an
# SSL-encrypted TCP/IP socket, and "hostnossl" is a plain TCP/IP socket.
#
# DATABASE can be "all", "sameuser", "samerole", a database name, or
# a comma-separated list thereof.
#
# USER can be "all", a user name, a group name prefixed with "+", or
# a comma-separated list thereof. In both the DATABASE and USER fields
# you can also write a file name prefixed with "@" to include names from
# a separate file.
#
# CIDR-ADDRESS specifies the set of hosts the record matches.
# It is made up of an IP address and a CIDR mask that is an integer
# (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that specifies
# the number of significant bits in the mask. Alternatively, you can write
# an IP address and netmask in separate columns to specify the set of hosts.
#
# METHOD can be "trust", "reject", "md5", "password", "gss", "sspi", "krb5",
# "ident", "pam", "ldap" or "cert". Note that "password" sends passwords
# in clear text; "md5" is preferred since it sends encrypted passwords.
#
# OPTIONS are a set of options for the authentication in the format
# NAME=VALUE. The available options depend on the different authentication
# methods - refer to the "Client Authentication" section in the documentation
# for a list of which options are available for which authentication methods.
#
# Database and user names containing spaces, commas, quotes and other special
# characters must be quoted. Quoting one of the keywords "all", "sameuser" or
# "samerole" makes the name lose its special character, and just match a
# database or username with that name.
#
# This file is read on server startup and when the postmaster receives
# a SIGHUP signal. If you edit the file on a running system, you have
# to SIGHUP the postmaster for the changes to take effect. You can use
# "pg_ctl reload" to do that.
# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL listen
# on a non-local interface via the listen_addresses configuration parameter,
# or via the -i or -h command line switches.
#
# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database
# super user can access the database using some other method.
# Noninteractive
# access to all databases is required during automatic maintenance
# (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by UNIX sockets
local all postgres trust
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
#local all all trust
# IPv4 local connections:
#host all all 127.0.0.1/32 md5
# IPv6 local connections:
#host all all ::1/128 md5
# This is for general access databases:
local all all trust
host all all 127.0.0.1/32 trust

View file

@ -0,0 +1,19 @@
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

View file

@ -1,8 +0,0 @@
Django>=1.6.2,<1.7
South>=1.0.0
psycopg2>=2.5.2
django-compressor>=1.4
django-modelcluster>=0.4
wagtail>=0.7
django-taggit>=0.11.2
django-libsass>=0.2

View file

@ -1 +0,0 @@
-r base.txt

View file

@ -1,6 +0,0 @@
-r base.txt
django-celery==3.1.1
gunicorn==18.0
redis==2.9.1
django-redis-cache==0.10.2
elasticsearch==1.0.0

View file

@ -0,0 +1,51 @@
#!/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

View file

@ -0,0 +1,6 @@
from whitenoise.django import DjangoWhiteNoise
from .wsgi import application as _application
application = DjangoWhiteNoise(_application)

View file

@ -3,16 +3,14 @@
import os
PROJECT_ROOT = os.path.join(os.path.dirname(__file__), '..', '..')
BASE_DIR = PROJECT_ROOT
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
# 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'
@ -21,11 +19,6 @@ DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'wagtaildemo',
'USER': 'postgres',
'PASSWORD': '',
'HOST': '', # Set to empty string for localhost.
'PORT': '', # Set to empty string for default.
'CONN_MAX_AGE': 600, # number of seconds database connections should persist for
}
}
@ -54,14 +47,13 @@ USE_I18N = True
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
# Note that with this set to True, Wagtail will fall back on using numeric dates
# in date fields, as opposed to 'friendly' dates like "24 Sep 2013", because
# Python's strptime doesn't support localised month names: https://code.djangoproject.com/ticket/13339
USE_L10N = False
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')
@ -103,13 +95,6 @@ STATICFILES_FINDERS = (
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'wq21wtjo3@d_qfjvd-#td!%7gfy2updj2z+nev^k$iy%=m4_tr'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
@ -123,25 +108,11 @@ MIDDLEWARE_CLASSES = (
'wagtail.wagtailredirects.middleware.RedirectMiddleware',
)
from django.conf import global_settings
TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (
'django.core.context_processors.request',
"fobi.context_processors.theme", # Important!
"fobi.context_processors.dynamic_values", # Optional
"context_processors.testing", # Testing
)
ROOT_URLCONF = 'wagtaildemo.urls'
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'wagtaildemo.wsgi.application'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
@ -150,10 +121,10 @@ INSTALLED_APPS = (
'django.contrib.messages',
'django.contrib.staticfiles',
'south',
'compressor',
'taggit',
'modelcluster',
'rest_framework',
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
@ -169,6 +140,7 @@ INSTALLED_APPS = (
'wagtail.wagtailredirects',
'wagtail.wagtailforms',
'wagtail.wagtailsites',
'wagtail.contrib.wagtailapi',
'demo',
@ -294,19 +266,45 @@ INSTALLED_APPS = (
'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'),
)
# Auth settings
LOGIN_URL = 'django.contrib.auth.views.login'
LOGIN_REDIRECT_URL = 'wagtailadmin_home'
# 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.
@ -340,6 +338,3 @@ LOGGING = {
# WAGTAIL SETTINGS
WAGTAIL_SITE_NAME = 'wagtaildemo'
# Override the search results template for wagtailsearch
WAGTAILSEARCH_RESULTS_TEMPLATE = 'demo/search_results.html'

View file

@ -5,7 +5,7 @@ DEBUG = True
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# BASE_URL required for notification emails
BASE_URL = 'http://localhost:8111'
BASE_URL = 'http://localhost:8000'
try:
from .local import *

View file

@ -0,0 +1,25 @@
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

View file

@ -3,7 +3,7 @@
# 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'
# 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.
@ -12,29 +12,17 @@ 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==1.0.1
# and uncomment the lines below.
# 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 += (
# MIDDLEWARE_CLASSES = [
# 'debug_toolbar.middleware.DebugToolbarMiddleware',
# )
# ] + list(MIDDLEWARE_CLASSES)
# # django-debug-toolbar settings
# DEBUG_TOOLBAR_CONFIG = {
# 'INTERCEPT_REDIRECTS': False,
# }
# If you're developing Wagtail itself (as opposed to building a Wagtail-powered site), you'll
# want to tweak the Python path so that it picks up your working copy of the Wagtail code
# rather than the packaged copy - uncomment the lines below to do that.
# Here we assume that you have it in a 'wagtail' directory at the same level as your
# 'wagtaildemo' checkout - adjust the path as appropriate.
# import sys
# import os
# PATH_TO_WAGTAIL = os.path.join(os.path.dirname(__file__), '..', '..', '..', 'wagtail')
# sys.path.insert(1, PATH_TO_WAGTAIL)

View file

@ -11,13 +11,6 @@ WAGTAILSEARCH_BACKENDS = {
}
INSTALLED_APPS+= (
'djcelery',
'kombu.transport.django',
'gunicorn',
)
CACHES = {
'default': {
'BACKEND': 'redis_cache.cache.RedisCache',
@ -37,14 +30,6 @@ TEMPLATE_LOADERS = (
)),
)
# CELERY SETTINGS
import djcelery
djcelery.setup_loader()
BROKER_URL = 'redis://'
CELERY_SEND_TASK_ERROR_EMAILS = True
CELERYD_LOG_COLOR = False
try:
from .local import *

View file

@ -1,41 +1,59 @@
from django.conf.urls import patterns, include, url
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.views.generic.base import RedirectView
from django.contrib import admin
from django.conf import settings
import os.path
from django.contrib import admin
from wagtail.wagtailcore import urls as wagtail_urls
from wagtail.wagtailadmin import urls as wagtailadmin_urls
from wagtail.wagtaildocs import urls as wagtaildocs_urls
from wagtail.wagtailsearch.urls import frontend as wagtailsearch_frontend_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
admin.autodiscover()
from demo import views
# Signal handlers
from wagtail.wagtailsearch.signal_handlers import register_signal_handlers as wagtailsearch_register_signal_handlers
wagtailsearch_register_signal_handlers()
api = WagtailAPIRouter('api')
api.register_endpoint('pages', PagesAPIEndpoint)
api.register_endpoint('images', ImagesAPIEndpoint)
api.register_endpoint('documents', DocumentsAPIEndpoint)
urlpatterns = patterns('',
urlpatterns = [
url(r'^django-admin/', include(admin.site.urls)),
url(r'^admin/', include(wagtailadmin_urls)),
url(r'^search/', include(wagtailsearch_frontend_urls)),
url(r'^documents/', include(wagtaildocs_urls)),
# For anything not caught by a more specific rule above, hand over to
# Wagtail's serving mechanism
url(r'', include(wagtail_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() # tell gunicorn where static files are in dev mode
urlpatterns += static(settings.MEDIA_URL + 'images/', document_root=os.path.join(settings.MEDIA_ROOT, 'images'))
urlpatterns += patterns('',
(r'^favicon\.ico$', RedirectView.as_view(url=settings.STATIC_URL + 'demo/images/favicon.ico'))
)
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)),
]