diff --git a/examples/wagtaildemo/Procfile b/examples/wagtaildemo/Procfile new file mode 100644 index 00000000..9f804e6f --- /dev/null +++ b/examples/wagtaildemo/Procfile @@ -0,0 +1 @@ +web: uwsgi --http :$PORT --module wagtaildemo.heroku_wsgi --master --processes 2 --static-map /media/=/app/media/ --offload-threads 1 diff --git a/examples/wagtaildemo/README.md b/examples/wagtaildemo/README.md index 051cbd46..927a9898 100644 --- a/examples/wagtaildemo/README.md +++ b/examples/wagtaildemo/README.md @@ -1,16 +1,22 @@ -Wagtail demo +[](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. diff --git a/examples/wagtaildemo/Vagrantfile b/examples/wagtaildemo/Vagrantfile index 71342a8a..b0792ccb 100644 --- a/examples/wagtaildemo/Vagrantfile +++ b/examples/wagtaildemo/Vagrantfile @@ -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 diff --git a/examples/wagtaildemo/Vagrantfile.local.example b/examples/wagtaildemo/Vagrantfile.local.example index 99eaff9d..6366f9a1 100644 --- a/examples/wagtaildemo/Vagrantfile.local.example +++ b/examples/wagtaildemo/Vagrantfile.local.example @@ -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. diff --git a/examples/wagtaildemo/app.json b/examples/wagtaildemo/app.json new file mode 100644 index 00000000..e4ceb028 --- /dev/null +++ b/examples/wagtaildemo/app.json @@ -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" + ] +} diff --git a/examples/wagtaildemo/bin/post_compile b/examples/wagtaildemo/bin/post_compile new file mode 100644 index 00000000..366847d7 --- /dev/null +++ b/examples/wagtaildemo/bin/post_compile @@ -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 diff --git a/examples/wagtaildemo/demo/fixtures/demo.json b/examples/wagtaildemo/demo/fixtures/demo.json index 86732b8a..4fe0d79d 100644 --- a/examples/wagtaildemo/demo/fixtures/demo.json +++ b/examples/wagtaildemo/demo/fixtures/demo.json @@ -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": "
mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.
mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.
mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.
", + "body": "[{\"type\": \"paragraph\", \"value\": \"mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
\"}, {\"type\": \"paragraph\", \"value\": \"The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.
\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"Also, there is another superspecies in sub-Saharan Africa
mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
\"}, {\"type\": \"paragraph\", \"value\": \"The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.
\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia
\", \"image\": 15, \"alignment\": \"right\"}}, {\"type\": \"paragraph\", \"value\": \"mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"The remaining five species are highly variable morphologically
\", \"image\": 14, \"alignment\": \"full\"}}, {\"type\": \"paragraph\", \"value\": \"mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
\"}, {\"type\": \"pullquote\", \"value\": {\"quote\": \"There is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band\", \"attribution\": \"Wikipedia\"}}, {\"type\": \"paragraph\", \"value\": \"mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
\"}]", "date": "2013-12-02", "feed_image": 7 } @@ -624,7 +633,7 @@ "pk": 18, "model": "demo.blogpage", "fields": { - "body": "Wagtails are slender, often colourful, ground-feeding insectivores of open country in the Old World. They are ground nesters, laying up to six speckled eggs at a time. Among their most conspicuous behaviours is a near constant tail wagging, a trait that has given the birds their common name. In spite of the ubiquity of the behaviour and observations of it, the reasons for it are poorly understood. It has been suggested that it may flush up prey, or that it may signal submissiveness to other wagtails. Recent studies have suggested instead that it is a signal of vigilance that may aid to deter potential predators.
At first glance, the wagtails appear to be divided into a yellow-bellied group and a white-bellied one, or one where the upper head is black and another where it is usually gray, but may be olive, yellow, or other colours. However, these are not evolutionary lineages; change of belly colour and increase of melanin have occurred independently several times in the wagtails, and the colour patterns which actually indicate relationships are more subtle.
mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.
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.
Prehistoric wagtails known from fossils are Motacilla humata and Motacilla major.
See the species accounts for more on individual species' relationships.
", + "body": "[{\"type\": \"paragraph\", \"value\": \"mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
\"}, {\"type\": \"paragraph\", \"value\": \"The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.
\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"Also, there is another superspecies in sub-Saharan Africa
mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
\"}, {\"type\": \"paragraph\", \"value\": \"The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.
\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia
\", \"image\": 15, \"alignment\": \"right\"}}, {\"type\": \"paragraph\", \"value\": \"mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"The remaining five species are highly variable morphologically
\", \"image\": 14, \"alignment\": \"full\"}}, {\"type\": \"paragraph\", \"value\": \"mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
\"}, {\"type\": \"pullquote\", \"value\": {\"quote\": \"There is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band\", \"attribution\": \"Wikipedia\"}}, {\"type\": \"paragraph\", \"value\": \"mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
\"}]", "date": "2014-01-10", "feed_image": 15 } @@ -633,7 +642,7 @@ "pk": 19, "model": "demo.blogpage", "fields": { - "body": "Wagtails are slender, often colourful, ground-feeding insectivores of open country in the Old World. They are ground nesters, laying up to six speckled eggs at a time. Among their most conspicuous behaviours is a near constant tail wagging, a trait that has given the birds their common name. In spite of the ubiquity of the behaviour and observations of it, the reasons for it are poorly understood. It has been suggested that it may flush up prey, or that it may signal submissiveness to other wagtails. Recent studies have suggested instead that it is a signal of vigilance that may aid to deter potential predators.
At first glance, the wagtails appear to be divided into a yellow-bellied group and a white-bellied one, or one where the upper head is black and another where it is usually gray, but may be olive, yellow, or other colours. However, these are not evolutionary lineages; change of belly colour and increase of melanin have occurred independently several times in the wagtails, and the colour patterns which actually indicate relationships are more subtle.
mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.
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.
Prehistoric wagtails known from fossils are Motacilla humata and Motacilla major.
See the species accounts for more on individual species' relationships.
mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
\"}, {\"type\": \"paragraph\", \"value\": \"The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.
\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"Also, there is another superspecies in sub-Saharan Africa
mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
\"}, {\"type\": \"paragraph\", \"value\": \"The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia. Wagtails spread rapidly across Eurasia and dispersed to Africa in the Zanclean (Early Pliocene) where the sub-Saharan lineage was later isolated. The African Pied Wagtail (and possibly the Mekong Wagtail) diverged prior to the massive radiation of the white-bellied black-throated and most yellow-bellied forms, all of which took place during the late Piacenzian (early Late Pliocene), c. 3 mya.
\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"The origin of the genus appears to be in the general area of Eastern Siberia/Mongolia
\", \"image\": 15, \"alignment\": \"right\"}}, {\"type\": \"paragraph\", \"value\": \"mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
\"}, {\"type\": \"aligned_image\", \"value\": {\"caption\": \"The remaining five species are highly variable morphologically
\", \"image\": 14, \"alignment\": \"full\"}}, {\"type\": \"paragraph\", \"value\": \"mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
\"}, {\"type\": \"pullquote\", \"value\": {\"quote\": \"There is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band\", \"attribution\": \"Wikipedia\"}}, {\"type\": \"paragraph\", \"value\": \"mtDNA cytochrome b and NADH dehydrogenase subunit 2 sequence data (Voelker, 2002) is of limited use: the suspicion that there is a superspecies of probably 3 white-bellied, black-throated wagtails is confirmed. Also, there is another superspecies in sub-Saharan Africa, three white-throated species with a black breast-band. The remaining five species are highly variable morphologically and their relationships with each other and with the two clades have not yet been satisfactorily explained.
\"}]", "date": "2014-02-01", "feed_image": 14 } @@ -784,7 +793,7 @@ "pk": 2, "model": "demo.homepage", "fields": { - "body": "Wagtails are slender, often colourful, ground-feeding insectivores of open country in the Old World. They are ground nesters, laying up to six speckled eggs at a time. Among their most conspicuous behaviours is a near constant tail wagging, a trait that has given the birds their common name. In spite of the ubiquity of the behaviour and observations of it, the reasons for it are poorly understood. It has been suggested that it may flush up prey, or that it may signal submissiveness to other wagtails. Recent studies have suggested instead that it is a signal of vigilance that may aid to deter potential predators.
" + "body": "[{\"type\": \"intro\", \"value\": \"Wagtails are slender, often colourful, ground-feeding insectivores of open country in the Old World.\\u00a0
\"}, {\"type\": \"paragraph\", \"value\": \"They are ground nesters, laying up to six speckled eggs at a time. Among their most conspicuous behaviours is a near constant tail wagging, a trait that has given the birds their common name.\\u00a0
\"}, {\"type\": \"paragraph\", \"value\": \"In spite of the ubiquity of the behaviour and observations of it, the reasons for it are poorly understood. It has been suggested that it may flush up prey, or that it may signal submissiveness to other wagtails. Recent studies have suggested instead that it is a signal of vigilance that may aid to deter potential predators.
\"}]" } }, { @@ -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 } ] diff --git a/examples/wagtaildemo/demo/management/__init__.py b/examples/wagtaildemo/demo/management/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/examples/wagtaildemo/demo/management/commands/__init__.py b/examples/wagtaildemo/demo/management/commands/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/examples/wagtaildemo/demo/management/commands/load_initial_data.py b/examples/wagtaildemo/demo/management/commands/load_initial_data.py new file mode 100644 index 00000000..704702bf --- /dev/null +++ b/examples/wagtaildemo/demo/management/commands/load_initial_data.py @@ -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) diff --git a/examples/wagtaildemo/demo/migrations/0001_initial.py b/examples/wagtaildemo/demo/migrations/0001_initial.py index 1138cf9e..cfd7b7e7 100644 --- a/examples/wagtaildemo/demo/migrations/0001_initial.py +++ b/examples/wagtaildemo/demo/migrations/0001_initial.py @@ -1,695 +1,585 @@ # -*- 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 +from __future__ import unicode_literals + +from django.db import models, migrations +import django.db.models.deletion +import modelcluster.fields +import wagtail.wagtailcore.fields +import modelcluster.tags -class Migration(SchemaMigration): +class Migration(migrations.Migration): - def forwards(self, orm): - # Adding model 'AdvertPlacement' - db.create_table(u'demo_advertplacement', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('page', self.gf('modelcluster.fields.ParentalKey')(related_name='advert_placements', to=orm['wagtailcore.Page'])), - ('advert', self.gf('django.db.models.fields.related.ForeignKey')(related_name='+', to=orm['demo.Advert'])), - )) - db.send_create_signal(u'demo', ['AdvertPlacement']) + dependencies = [ + ('wagtailimages', '0002_initial_data'), + ('wagtaildocs', '0002_initial_data'), + ('wagtailcore', '0002_initial_data'), + ('taggit', '0001_initial'), + ] - # Adding model 'Advert' - db.create_table(u'demo_advert', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='adverts', null=True, to=orm['wagtailcore.Page'])), - ('url', self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True)), - ('text', self.gf('django.db.models.fields.CharField')(max_length=255)), - )) - db.send_create_signal(u'demo', ['Advert']) - - # Adding model 'HomePageCarouselItem' - db.create_table(u'demo_homepagecarouselitem', ( - (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)), - ('link_external', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('link_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtailcore.Page'])), - ('link_document', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtaildocs.Document'])), - ('image', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, on_delete=models.SET_NULL, to=orm['wagtailimages.Image'])), - ('embed_url', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('caption', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('page', self.gf('modelcluster.fields.ParentalKey')(related_name='carousel_items', to=orm['demo.HomePage'])), - )) - db.send_create_signal(u'demo', ['HomePageCarouselItem']) - - # Adding model 'HomePageRelatedLink' - db.create_table(u'demo_homepagerelatedlink', ( - (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)), - ('link_external', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('link_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtailcore.Page'])), - ('link_document', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtaildocs.Document'])), - ('title', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('page', self.gf('modelcluster.fields.ParentalKey')(related_name='related_links', to=orm['demo.HomePage'])), - )) - db.send_create_signal(u'demo', ['HomePageRelatedLink']) - - # Adding model 'HomePage' - db.create_table(u'demo_homepage', ( - (u'page_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['wagtailcore.Page'], unique=True, primary_key=True)), - ('body', self.gf('wagtail.wagtailcore.fields.RichTextField')(blank=True)), - )) - db.send_create_signal(u'demo', ['HomePage']) - - # Adding model 'StandardIndexPageRelatedLink' - db.create_table(u'demo_standardindexpagerelatedlink', ( - (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)), - ('link_external', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('link_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtailcore.Page'])), - ('link_document', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtaildocs.Document'])), - ('title', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('page', self.gf('modelcluster.fields.ParentalKey')(related_name='related_links', to=orm['demo.StandardIndexPage'])), - )) - db.send_create_signal(u'demo', ['StandardIndexPageRelatedLink']) - - # Adding model 'StandardIndexPage' - db.create_table(u'demo_standardindexpage', ( - (u'page_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['wagtailcore.Page'], unique=True, primary_key=True)), - ('intro', self.gf('wagtail.wagtailcore.fields.RichTextField')(blank=True)), - ('feed_image', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, on_delete=models.SET_NULL, to=orm['wagtailimages.Image'])), - )) - db.send_create_signal(u'demo', ['StandardIndexPage']) - - # Adding model 'StandardPageCarouselItem' - db.create_table(u'demo_standardpagecarouselitem', ( - (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)), - ('link_external', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('link_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtailcore.Page'])), - ('link_document', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtaildocs.Document'])), - ('image', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, on_delete=models.SET_NULL, to=orm['wagtailimages.Image'])), - ('embed_url', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('caption', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('page', self.gf('modelcluster.fields.ParentalKey')(related_name='carousel_items', to=orm['demo.StandardPage'])), - )) - db.send_create_signal(u'demo', ['StandardPageCarouselItem']) - - # Adding model 'StandardPageRelatedLink' - db.create_table(u'demo_standardpagerelatedlink', ( - (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)), - ('link_external', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('link_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtailcore.Page'])), - ('link_document', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtaildocs.Document'])), - ('title', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('page', self.gf('modelcluster.fields.ParentalKey')(related_name='related_links', to=orm['demo.StandardPage'])), - )) - db.send_create_signal(u'demo', ['StandardPageRelatedLink']) - - # Adding model 'StandardPage' - db.create_table(u'demo_standardpage', ( - (u'page_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['wagtailcore.Page'], unique=True, primary_key=True)), - ('intro', self.gf('wagtail.wagtailcore.fields.RichTextField')(blank=True)), - ('body', self.gf('wagtail.wagtailcore.fields.RichTextField')(blank=True)), - ('feed_image', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, on_delete=models.SET_NULL, to=orm['wagtailimages.Image'])), - )) - db.send_create_signal(u'demo', ['StandardPage']) - - # Adding model 'BlogIndexPageRelatedLink' - db.create_table(u'demo_blogindexpagerelatedlink', ( - (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)), - ('link_external', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('link_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtailcore.Page'])), - ('link_document', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtaildocs.Document'])), - ('title', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('page', self.gf('modelcluster.fields.ParentalKey')(related_name='related_links', to=orm['demo.BlogIndexPage'])), - )) - db.send_create_signal(u'demo', ['BlogIndexPageRelatedLink']) - - # Adding model 'BlogIndexPage' - db.create_table(u'demo_blogindexpage', ( - (u'page_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['wagtailcore.Page'], unique=True, primary_key=True)), - ('intro', self.gf('wagtail.wagtailcore.fields.RichTextField')(blank=True)), - )) - db.send_create_signal(u'demo', ['BlogIndexPage']) - - # Adding model 'BlogPageCarouselItem' - db.create_table(u'demo_blogpagecarouselitem', ( - (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)), - ('link_external', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('link_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtailcore.Page'])), - ('link_document', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtaildocs.Document'])), - ('image', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, on_delete=models.SET_NULL, to=orm['wagtailimages.Image'])), - ('embed_url', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('caption', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('page', self.gf('modelcluster.fields.ParentalKey')(related_name='carousel_items', to=orm['demo.BlogPage'])), - )) - db.send_create_signal(u'demo', ['BlogPageCarouselItem']) - - # Adding model 'BlogPageRelatedLink' - db.create_table(u'demo_blogpagerelatedlink', ( - (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)), - ('link_external', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('link_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtailcore.Page'])), - ('link_document', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtaildocs.Document'])), - ('title', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('page', self.gf('modelcluster.fields.ParentalKey')(related_name='related_links', to=orm['demo.BlogPage'])), - )) - db.send_create_signal(u'demo', ['BlogPageRelatedLink']) - - # Adding model 'BlogPageTag' - db.create_table(u'demo_blogpagetag', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('tag', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'demo_blogpagetag_items', to=orm['taggit.Tag'])), - ('content_object', self.gf('modelcluster.fields.ParentalKey')(related_name='tagged_items', to=orm['demo.BlogPage'])), - )) - db.send_create_signal(u'demo', ['BlogPageTag']) - - # Adding model 'BlogPage' - db.create_table(u'demo_blogpage', ( - (u'page_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['wagtailcore.Page'], unique=True, primary_key=True)), - ('body', self.gf('wagtail.wagtailcore.fields.RichTextField')()), - ('date', self.gf('django.db.models.fields.DateField')()), - ('feed_image', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, on_delete=models.SET_NULL, to=orm['wagtailimages.Image'])), - )) - db.send_create_signal(u'demo', ['BlogPage']) - - # Adding model 'PersonPageRelatedLink' - db.create_table(u'demo_personpagerelatedlink', ( - (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)), - ('link_external', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('link_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtailcore.Page'])), - ('link_document', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtaildocs.Document'])), - ('title', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('page', self.gf('modelcluster.fields.ParentalKey')(related_name='related_links', to=orm['demo.PersonPage'])), - )) - db.send_create_signal(u'demo', ['PersonPageRelatedLink']) - - # Adding model 'PersonPage' - db.create_table(u'demo_personpage', ( - (u'page_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['wagtailcore.Page'], unique=True, primary_key=True)), - ('telephone', self.gf('django.db.models.fields.CharField')(max_length=20, blank=True)), - ('email', self.gf('django.db.models.fields.EmailField')(max_length=75, blank=True)), - ('address_1', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('address_2', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('city', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('country', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('post_code', self.gf('django.db.models.fields.CharField')(max_length=10, blank=True)), - ('first_name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('last_name', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('intro', self.gf('wagtail.wagtailcore.fields.RichTextField')(blank=True)), - ('biography', self.gf('wagtail.wagtailcore.fields.RichTextField')(blank=True)), - ('image', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, on_delete=models.SET_NULL, to=orm['wagtailimages.Image'])), - ('feed_image', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, on_delete=models.SET_NULL, to=orm['wagtailimages.Image'])), - )) - db.send_create_signal(u'demo', ['PersonPage']) - - # Adding model 'ContactPage' - db.create_table(u'demo_contactpage', ( - (u'page_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['wagtailcore.Page'], unique=True, primary_key=True)), - ('telephone', self.gf('django.db.models.fields.CharField')(max_length=20, blank=True)), - ('email', self.gf('django.db.models.fields.EmailField')(max_length=75, blank=True)), - ('address_1', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('address_2', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('city', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('country', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('post_code', self.gf('django.db.models.fields.CharField')(max_length=10, blank=True)), - ('body', self.gf('wagtail.wagtailcore.fields.RichTextField')(blank=True)), - ('feed_image', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, on_delete=models.SET_NULL, to=orm['wagtailimages.Image'])), - )) - db.send_create_signal(u'demo', ['ContactPage']) - - # Adding model 'EventIndexPageRelatedLink' - db.create_table(u'demo_eventindexpagerelatedlink', ( - (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)), - ('link_external', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('link_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtailcore.Page'])), - ('link_document', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtaildocs.Document'])), - ('title', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('page', self.gf('modelcluster.fields.ParentalKey')(related_name='related_links', to=orm['demo.EventIndexPage'])), - )) - db.send_create_signal(u'demo', ['EventIndexPageRelatedLink']) - - # Adding model 'EventIndexPage' - db.create_table(u'demo_eventindexpage', ( - (u'page_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['wagtailcore.Page'], unique=True, primary_key=True)), - ('intro', self.gf('wagtail.wagtailcore.fields.RichTextField')(blank=True)), - )) - db.send_create_signal(u'demo', ['EventIndexPage']) - - # Adding model 'EventPageCarouselItem' - db.create_table(u'demo_eventpagecarouselitem', ( - (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)), - ('link_external', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('link_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtailcore.Page'])), - ('link_document', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtaildocs.Document'])), - ('image', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, on_delete=models.SET_NULL, to=orm['wagtailimages.Image'])), - ('embed_url', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('caption', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('page', self.gf('modelcluster.fields.ParentalKey')(related_name='carousel_items', to=orm['demo.EventPage'])), - )) - db.send_create_signal(u'demo', ['EventPageCarouselItem']) - - # Adding model 'EventPageRelatedLink' - db.create_table(u'demo_eventpagerelatedlink', ( - (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)), - ('link_external', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('link_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtailcore.Page'])), - ('link_document', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtaildocs.Document'])), - ('title', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('page', self.gf('modelcluster.fields.ParentalKey')(related_name='related_links', to=orm['demo.EventPage'])), - )) - db.send_create_signal(u'demo', ['EventPageRelatedLink']) - - # Adding model 'EventPageSpeaker' - db.create_table(u'demo_eventpagespeaker', ( - (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)), - ('link_external', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('link_page', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtailcore.Page'])), - ('link_document', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, to=orm['wagtaildocs.Document'])), - ('page', self.gf('modelcluster.fields.ParentalKey')(related_name='speakers', to=orm['demo.EventPage'])), - ('first_name', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('last_name', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('image', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, on_delete=models.SET_NULL, to=orm['wagtailimages.Image'])), - )) - db.send_create_signal(u'demo', ['EventPageSpeaker']) - - # Adding model 'EventPage' - db.create_table(u'demo_eventpage', ( - (u'page_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['wagtailcore.Page'], unique=True, primary_key=True)), - ('date_from', self.gf('django.db.models.fields.DateField')()), - ('date_to', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - ('time_from', self.gf('django.db.models.fields.TimeField')(null=True, blank=True)), - ('time_to', self.gf('django.db.models.fields.TimeField')(null=True, blank=True)), - ('audience', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('location', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('body', self.gf('wagtail.wagtailcore.fields.RichTextField')(blank=True)), - ('cost', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('signup_link', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)), - ('feed_image', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, on_delete=models.SET_NULL, to=orm['wagtailimages.Image'])), - )) - db.send_create_signal(u'demo', ['EventPage']) - - - def backwards(self, orm): - # Deleting model 'AdvertPlacement' - db.delete_table(u'demo_advertplacement') - - # Deleting model 'Advert' - db.delete_table(u'demo_advert') - - # Deleting model 'HomePageCarouselItem' - db.delete_table(u'demo_homepagecarouselitem') - - # Deleting model 'HomePageRelatedLink' - db.delete_table(u'demo_homepagerelatedlink') - - # Deleting model 'HomePage' - db.delete_table(u'demo_homepage') - - # Deleting model 'StandardIndexPageRelatedLink' - db.delete_table(u'demo_standardindexpagerelatedlink') - - # Deleting model 'StandardIndexPage' - db.delete_table(u'demo_standardindexpage') - - # Deleting model 'StandardPageCarouselItem' - db.delete_table(u'demo_standardpagecarouselitem') - - # Deleting model 'StandardPageRelatedLink' - db.delete_table(u'demo_standardpagerelatedlink') - - # Deleting model 'StandardPage' - db.delete_table(u'demo_standardpage') - - # Deleting model 'BlogIndexPageRelatedLink' - db.delete_table(u'demo_blogindexpagerelatedlink') - - # Deleting model 'BlogIndexPage' - db.delete_table(u'demo_blogindexpage') - - # Deleting model 'BlogPageCarouselItem' - db.delete_table(u'demo_blogpagecarouselitem') - - # Deleting model 'BlogPageRelatedLink' - db.delete_table(u'demo_blogpagerelatedlink') - - # Deleting model 'BlogPageTag' - db.delete_table(u'demo_blogpagetag') - - # Deleting model 'BlogPage' - db.delete_table(u'demo_blogpage') - - # Deleting model 'PersonPageRelatedLink' - db.delete_table(u'demo_personpagerelatedlink') - - # Deleting model 'PersonPage' - db.delete_table(u'demo_personpage') - - # Deleting model 'ContactPage' - db.delete_table(u'demo_contactpage') - - # Deleting model 'EventIndexPageRelatedLink' - db.delete_table(u'demo_eventindexpagerelatedlink') - - # Deleting model 'EventIndexPage' - db.delete_table(u'demo_eventindexpage') - - # Deleting model 'EventPageCarouselItem' - db.delete_table(u'demo_eventpagecarouselitem') - - # Deleting model 'EventPageRelatedLink' - db.delete_table(u'demo_eventpagerelatedlink') - - # Deleting model 'EventPageSpeaker' - db.delete_table(u'demo_eventpagespeaker') - - # Deleting model 'EventPage' - db.delete_table(u'demo_eventpage') - - - 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'] \ No newline at end of file + operations = [ + migrations.CreateModel( + name='Advert', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('url', models.URLField(null=True, blank=True)), + ('text', models.CharField(max_length=255)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='AdvertPlacement', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('advert', models.ForeignKey(related_name=b'+', to='demo.Advert')), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='BlogIndexPage', + fields=[ + ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), + ('intro', wagtail.wagtailcore.fields.RichTextField(blank=True)), + ], + options={ + 'abstract': False, + }, + bases=('wagtailcore.page',), + ), + migrations.CreateModel( + name='BlogIndexPageRelatedLink', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), + ('link_external', models.URLField(verbose_name=b'External link', blank=True)), + ('title', models.CharField(help_text=b'Link title', max_length=255)), + ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), + ], + options={ + 'ordering': ['sort_order'], + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='BlogPage', + fields=[ + ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), + ('body', wagtail.wagtailcore.fields.RichTextField()), + ('date', models.DateField(verbose_name=b'Post date')), + ('feed_image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), + ], + options={ + 'abstract': False, + }, + bases=('wagtailcore.page',), + ), + migrations.CreateModel( + name='BlogPageCarouselItem', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), + ('link_external', models.URLField(verbose_name=b'External link', blank=True)), + ('embed_url', models.URLField(verbose_name=b'Embed URL', blank=True)), + ('caption', models.CharField(max_length=255, blank=True)), + ('image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), + ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), + ], + options={ + 'ordering': ['sort_order'], + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='BlogPageRelatedLink', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), + ('link_external', models.URLField(verbose_name=b'External link', blank=True)), + ('title', models.CharField(help_text=b'Link title', max_length=255)), + ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), + ], + options={ + 'ordering': ['sort_order'], + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='BlogPageTag', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('content_object', modelcluster.fields.ParentalKey(related_name=b'tagged_items', to='demo.BlogPage')), + ('tag', models.ForeignKey(related_name='demo_blogpagetag_items', to='taggit.Tag')), + ], + options={ + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='ContactPage', + fields=[ + ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), + ('telephone', models.CharField(max_length=20, blank=True)), + ('email', models.EmailField(max_length=75, blank=True)), + ('address_1', models.CharField(max_length=255, blank=True)), + ('address_2', models.CharField(max_length=255, blank=True)), + ('city', models.CharField(max_length=255, blank=True)), + ('country', models.CharField(max_length=255, blank=True)), + ('post_code', models.CharField(max_length=10, blank=True)), + ('body', wagtail.wagtailcore.fields.RichTextField(blank=True)), + ('feed_image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), + ], + options={ + 'abstract': False, + }, + bases=('wagtailcore.page', models.Model), + ), + migrations.CreateModel( + name='EventIndexPage', + fields=[ + ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), + ('intro', wagtail.wagtailcore.fields.RichTextField(blank=True)), + ], + options={ + 'abstract': False, + }, + bases=('wagtailcore.page',), + ), + migrations.CreateModel( + name='EventIndexPageRelatedLink', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), + ('link_external', models.URLField(verbose_name=b'External link', blank=True)), + ('title', models.CharField(help_text=b'Link title', max_length=255)), + ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), + ], + options={ + 'ordering': ['sort_order'], + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='EventPage', + fields=[ + ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), + ('date_from', models.DateField(verbose_name=b'Start date')), + ('date_to', models.DateField(help_text=b'Not required if event is on a single day', null=True, verbose_name=b'End date', blank=True)), + ('time_from', models.TimeField(null=True, verbose_name=b'Start time', blank=True)), + ('time_to', models.TimeField(null=True, verbose_name=b'End time', blank=True)), + ('audience', models.CharField(max_length=255, choices=[(b'public', b'Public'), (b'private', b'Private')])), + ('location', models.CharField(max_length=255)), + ('body', wagtail.wagtailcore.fields.RichTextField(blank=True)), + ('cost', models.CharField(max_length=255)), + ('signup_link', models.URLField(blank=True)), + ('feed_image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), + ], + options={ + 'abstract': False, + }, + bases=('wagtailcore.page',), + ), + migrations.CreateModel( + name='EventPageCarouselItem', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), + ('link_external', models.URLField(verbose_name=b'External link', blank=True)), + ('embed_url', models.URLField(verbose_name=b'Embed URL', blank=True)), + ('caption', models.CharField(max_length=255, blank=True)), + ('image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), + ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), + ], + options={ + 'ordering': ['sort_order'], + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='EventPageRelatedLink', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), + ('link_external', models.URLField(verbose_name=b'External link', blank=True)), + ('title', models.CharField(help_text=b'Link title', max_length=255)), + ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), + ], + options={ + 'ordering': ['sort_order'], + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='EventPageSpeaker', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), + ('link_external', models.URLField(verbose_name=b'External link', blank=True)), + ('first_name', models.CharField(max_length=255, verbose_name=b'Name', blank=True)), + ('last_name', models.CharField(max_length=255, verbose_name=b'Surname', blank=True)), + ('image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), + ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), + ], + options={ + 'ordering': ['sort_order'], + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='FormField', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), + ('label', models.CharField(help_text='The label of the form field', max_length=255)), + ('field_type', models.CharField(max_length=16, choices=[(b'singleline', 'Single line text'), (b'multiline', 'Multi-line text'), (b'email', 'Email'), (b'number', 'Number'), (b'url', 'URL'), (b'checkbox', 'Checkbox'), (b'checkboxes', 'Checkboxes'), (b'dropdown', 'Drop down'), (b'radio', 'Radio buttons'), (b'date', 'Date'), (b'datetime', 'Date/time')])), + ('required', models.BooleanField(default=True)), + ('choices', models.CharField(help_text='Comma separated list of choices. Only applicable in checkboxes, radio and dropdown.', max_length=512, blank=True)), + ('default_value', models.CharField(help_text='Default value. Comma separated values supported for checkboxes.', max_length=255, blank=True)), + ('help_text', models.CharField(max_length=255, blank=True)), + ], + options={ + 'ordering': ['sort_order'], + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='FormPage', + fields=[ + ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), + ('to_address', models.CharField(help_text='Optional - form submissions will be emailed to this address', max_length=255, blank=True)), + ('from_address', models.CharField(max_length=255, blank=True)), + ('subject', models.CharField(max_length=255, blank=True)), + ('intro', wagtail.wagtailcore.fields.RichTextField(blank=True)), + ('thank_you_text', wagtail.wagtailcore.fields.RichTextField(blank=True)), + ], + options={ + 'abstract': False, + }, + bases=('wagtailcore.page',), + ), + migrations.CreateModel( + name='HomePage', + fields=[ + ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), + ('body', wagtail.wagtailcore.fields.RichTextField(blank=True)), + ], + options={ + 'verbose_name': 'Homepage', + }, + bases=('wagtailcore.page',), + ), + migrations.CreateModel( + name='HomePageCarouselItem', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), + ('link_external', models.URLField(verbose_name=b'External link', blank=True)), + ('embed_url', models.URLField(verbose_name=b'Embed URL', blank=True)), + ('caption', models.CharField(max_length=255, blank=True)), + ('image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), + ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), + ], + options={ + 'ordering': ['sort_order'], + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='HomePageRelatedLink', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), + ('link_external', models.URLField(verbose_name=b'External link', blank=True)), + ('title', models.CharField(help_text=b'Link title', max_length=255)), + ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), + ], + options={ + 'ordering': ['sort_order'], + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='PersonPage', + fields=[ + ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), + ('telephone', models.CharField(max_length=20, blank=True)), + ('email', models.EmailField(max_length=75, blank=True)), + ('address_1', models.CharField(max_length=255, blank=True)), + ('address_2', models.CharField(max_length=255, blank=True)), + ('city', models.CharField(max_length=255, blank=True)), + ('country', models.CharField(max_length=255, blank=True)), + ('post_code', models.CharField(max_length=10, blank=True)), + ('first_name', models.CharField(max_length=255)), + ('last_name', models.CharField(max_length=255)), + ('intro', wagtail.wagtailcore.fields.RichTextField(blank=True)), + ('biography', wagtail.wagtailcore.fields.RichTextField(blank=True)), + ('feed_image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), + ('image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), + ], + options={ + 'abstract': False, + }, + bases=('wagtailcore.page', models.Model), + ), + migrations.CreateModel( + name='PersonPageRelatedLink', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), + ('link_external', models.URLField(verbose_name=b'External link', blank=True)), + ('title', models.CharField(help_text=b'Link title', max_length=255)), + ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), + ], + options={ + 'ordering': ['sort_order'], + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='StandardIndexPage', + fields=[ + ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), + ('intro', wagtail.wagtailcore.fields.RichTextField(blank=True)), + ('feed_image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), + ], + options={ + 'abstract': False, + }, + bases=('wagtailcore.page',), + ), + migrations.CreateModel( + name='StandardIndexPageRelatedLink', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), + ('link_external', models.URLField(verbose_name=b'External link', blank=True)), + ('title', models.CharField(help_text=b'Link title', max_length=255)), + ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), + ], + options={ + 'ordering': ['sort_order'], + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='StandardPage', + fields=[ + ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')), + ('intro', wagtail.wagtailcore.fields.RichTextField(blank=True)), + ('body', wagtail.wagtailcore.fields.RichTextField(blank=True)), + ('feed_image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), + ], + options={ + 'abstract': False, + }, + bases=('wagtailcore.page',), + ), + migrations.CreateModel( + name='StandardPageCarouselItem', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), + ('link_external', models.URLField(verbose_name=b'External link', blank=True)), + ('embed_url', models.URLField(verbose_name=b'Embed URL', blank=True)), + ('caption', models.CharField(max_length=255, blank=True)), + ('image', models.ForeignKey(related_name=b'+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)), + ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), + ('link_page', models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True)), + ('page', modelcluster.fields.ParentalKey(related_name=b'carousel_items', to='demo.StandardPage')), + ], + options={ + 'ordering': ['sort_order'], + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='StandardPageRelatedLink', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('sort_order', models.IntegerField(null=True, editable=False, blank=True)), + ('link_external', models.URLField(verbose_name=b'External link', blank=True)), + ('title', models.CharField(help_text=b'Link title', max_length=255)), + ('link_document', models.ForeignKey(related_name=b'+', blank=True, to='wagtaildocs.Document', null=True)), + ('link_page', models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True)), + ('page', modelcluster.fields.ParentalKey(related_name=b'related_links', to='demo.StandardPage')), + ], + options={ + 'ordering': ['sort_order'], + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.AddField( + model_name='standardindexpagerelatedlink', + name='link_page', + field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), + preserve_default=True, + ), + migrations.AddField( + model_name='standardindexpagerelatedlink', + name='page', + field=modelcluster.fields.ParentalKey(related_name=b'related_links', to='demo.StandardIndexPage'), + preserve_default=True, + ), + migrations.AddField( + model_name='personpagerelatedlink', + name='link_page', + field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), + preserve_default=True, + ), + migrations.AddField( + model_name='personpagerelatedlink', + name='page', + field=modelcluster.fields.ParentalKey(related_name=b'related_links', to='demo.PersonPage'), + preserve_default=True, + ), + migrations.AddField( + model_name='homepagerelatedlink', + name='link_page', + field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), + preserve_default=True, + ), + migrations.AddField( + model_name='homepagerelatedlink', + name='page', + field=modelcluster.fields.ParentalKey(related_name=b'related_links', to='demo.HomePage'), + preserve_default=True, + ), + migrations.AddField( + model_name='homepagecarouselitem', + name='link_page', + field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), + preserve_default=True, + ), + migrations.AddField( + model_name='homepagecarouselitem', + name='page', + field=modelcluster.fields.ParentalKey(related_name=b'carousel_items', to='demo.HomePage'), + preserve_default=True, + ), + migrations.AddField( + model_name='formfield', + name='page', + field=modelcluster.fields.ParentalKey(related_name=b'form_fields', to='demo.FormPage'), + preserve_default=True, + ), + migrations.AddField( + model_name='eventpagespeaker', + name='link_page', + field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), + preserve_default=True, + ), + migrations.AddField( + model_name='eventpagespeaker', + name='page', + field=modelcluster.fields.ParentalKey(related_name=b'speakers', to='demo.EventPage'), + preserve_default=True, + ), + migrations.AddField( + model_name='eventpagerelatedlink', + name='link_page', + field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), + preserve_default=True, + ), + migrations.AddField( + model_name='eventpagerelatedlink', + name='page', + field=modelcluster.fields.ParentalKey(related_name=b'related_links', to='demo.EventPage'), + preserve_default=True, + ), + migrations.AddField( + model_name='eventpagecarouselitem', + name='link_page', + field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), + preserve_default=True, + ), + migrations.AddField( + model_name='eventpagecarouselitem', + name='page', + field=modelcluster.fields.ParentalKey(related_name=b'carousel_items', to='demo.EventPage'), + preserve_default=True, + ), + migrations.AddField( + model_name='eventindexpagerelatedlink', + name='link_page', + field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), + preserve_default=True, + ), + migrations.AddField( + model_name='eventindexpagerelatedlink', + name='page', + field=modelcluster.fields.ParentalKey(related_name=b'related_links', to='demo.EventIndexPage'), + preserve_default=True, + ), + migrations.AddField( + model_name='blogpagerelatedlink', + name='link_page', + field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), + preserve_default=True, + ), + migrations.AddField( + model_name='blogpagerelatedlink', + name='page', + field=modelcluster.fields.ParentalKey(related_name=b'related_links', to='demo.BlogPage'), + preserve_default=True, + ), + migrations.AddField( + model_name='blogpagecarouselitem', + name='link_page', + field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), + preserve_default=True, + ), + migrations.AddField( + model_name='blogpagecarouselitem', + name='page', + field=modelcluster.fields.ParentalKey(related_name=b'carousel_items', to='demo.BlogPage'), + preserve_default=True, + ), + migrations.AddField( + model_name='blogpage', + name='tags', + field=modelcluster.tags.ClusterTaggableManager(to='taggit.Tag', through='demo.BlogPageTag', blank=True, help_text='A comma-separated list of tags.', verbose_name='Tags'), + preserve_default=True, + ), + migrations.AddField( + model_name='blogindexpagerelatedlink', + name='link_page', + field=models.ForeignKey(related_name=b'+', blank=True, to='wagtailcore.Page', null=True), + preserve_default=True, + ), + migrations.AddField( + model_name='blogindexpagerelatedlink', + name='page', + field=modelcluster.fields.ParentalKey(related_name=b'related_links', to='demo.BlogIndexPage'), + preserve_default=True, + ), + migrations.AddField( + model_name='advertplacement', + name='page', + field=modelcluster.fields.ParentalKey(related_name=b'advert_placements', to='wagtailcore.Page'), + preserve_default=True, + ), + migrations.AddField( + model_name='advert', + name='page', + field=models.ForeignKey(related_name=b'adverts', blank=True, to='wagtailcore.Page', null=True), + preserve_default=True, + ), + ] diff --git a/examples/wagtaildemo/demo/migrations/0002_auto_20150917_1037.py b/examples/wagtaildemo/demo/migrations/0002_auto_20150917_1037.py new file mode 100644 index 00000000..8a2bc7ed --- /dev/null +++ b/examples/wagtaildemo/demo/migrations/0002_auto_20150917_1037.py @@ -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'))]), + ) + ] diff --git a/examples/wagtaildemo/demo/migrations/0002_auto__add_field_standardpage_postcode.py b/examples/wagtaildemo/demo/migrations/0002_auto__add_field_standardpage_postcode.py deleted file mode 100644 index 12f44764..00000000 --- a/examples/wagtaildemo/demo/migrations/0002_auto__add_field_standardpage_postcode.py +++ /dev/null @@ -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'] \ No newline at end of file diff --git a/examples/wagtaildemo/demo/migrations/0003_auto_20150917_1200.py b/examples/wagtaildemo/demo/migrations/0003_auto_20150917_1200.py new file mode 100644 index 00000000..e501662a --- /dev/null +++ b/examples/wagtaildemo/demo/migrations/0003_auto_20150917_1200.py @@ -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'))]), + ) + ] diff --git a/examples/wagtaildemo/demo/migrations/0003_auto__del_field_standardpage_postcode.py b/examples/wagtaildemo/demo/migrations/0003_auto__del_field_standardpage_postcode.py deleted file mode 100644 index 47b6d133..00000000 --- a/examples/wagtaildemo/demo/migrations/0003_auto__del_field_standardpage_postcode.py +++ /dev/null @@ -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'] \ No newline at end of file diff --git a/examples/wagtaildemo/demo/migrations/0004_auto_20151019_1351.py b/examples/wagtaildemo/demo/migrations/0004_auto_20151019_1351.py new file mode 100644 index 00000000..ab5a987a --- /dev/null +++ b/examples/wagtaildemo/demo/migrations/0004_auto_20151019_1351.py @@ -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'), + ), + ] diff --git a/examples/wagtaildemo/demo/migrations/0004_create_form_page.py b/examples/wagtaildemo/demo/migrations/0004_create_form_page.py deleted file mode 100644 index fa9b43c6..00000000 --- a/examples/wagtaildemo/demo/migrations/0004_create_form_page.py +++ /dev/null @@ -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'] \ No newline at end of file diff --git a/examples/wagtaildemo/demo/migrations/0005_auto_20160531_1736.py b/examples/wagtaildemo/demo/migrations/0005_auto_20160531_1736.py new file mode 100644 index 00000000..29062c9d --- /dev/null +++ b/examples/wagtaildemo/demo/migrations/0005_auto_20160531_1736.py @@ -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'), + ), + ] diff --git a/examples/wagtaildemo/demo/migrations/0006_auto_20160902_1204.py b/examples/wagtaildemo/demo/migrations/0006_auto_20160902_1204.py new file mode 100644 index 00000000..88273fb6 --- /dev/null +++ b/examples/wagtaildemo/demo/migrations/0006_auto_20160902_1204.py @@ -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'), + ), + ] diff --git a/examples/wagtaildemo/demo/models.py b/examples/wagtaildemo/demo/models.py index 0610cb44..cd965258 100644 --- a/examples/wagtaildemo/demo/models.py +++ b/examples/wagtaildemo/demo/models.py @@ -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) diff --git a/examples/wagtaildemo/demo/static/demo/css/admin-streamfield-styles.css b/examples/wagtaildemo/demo/static/demo/css/admin-streamfield-styles.css new file mode 100644 index 00000000..2f8ad2b3 --- /dev/null +++ b/examples/wagtaildemo/demo/static/demo/css/admin-streamfield-styles.css @@ -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; + + } diff --git a/examples/wagtaildemo/demo/static/demo/css/main.scss b/examples/wagtaildemo/demo/static/demo/css/main.scss index 8382879a..dd83dac3 100644 --- a/examples/wagtaildemo/demo/static/demo/css/main.scss +++ b/examples/wagtaildemo/demo/static/demo/css/main.scss @@ -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%); } diff --git a/examples/wagtaildemo/demo/static/demo/css/vendor/images/bx_loader.gif b/examples/wagtaildemo/demo/static/demo/css/vendor/images/bx_loader.gif deleted file mode 100644 index f4ff40ed..00000000 Binary files a/examples/wagtaildemo/demo/static/demo/css/vendor/images/bx_loader.gif and /dev/null differ diff --git a/examples/wagtaildemo/demo/static/demo/css/vendor/images/controls.png b/examples/wagtaildemo/demo/static/demo/css/vendor/images/controls.png deleted file mode 100644 index 28918dde..00000000 Binary files a/examples/wagtaildemo/demo/static/demo/css/vendor/images/controls.png and /dev/null differ diff --git a/examples/wagtaildemo/demo/static/demo/css/vendor/jquery.bxslider.css b/examples/wagtaildemo/demo/static/demo/css/vendor/jquery.bxslider.css deleted file mode 100644 index 3a6588f4..00000000 --- a/examples/wagtaildemo/demo/static/demo/css/vendor/jquery.bxslider.css +++ /dev/null @@ -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; -} \ No newline at end of file diff --git a/examples/wagtaildemo/demo/static/demo/js/main.js b/examples/wagtaildemo/demo/static/demo/js/main.js index 2685cb54..208cf4fb 100644 --- a/examples/wagtaildemo/demo/static/demo/js/main.js +++ b/examples/wagtaildemo/demo/static/demo/js/main.js @@ -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"); diff --git a/examples/wagtaildemo/demo/static/demo/js/vendor/jquery.bxslider.min.js b/examples/wagtaildemo/demo/static/demo/js/vendor/jquery.bxslider.min.js deleted file mode 100644 index e477b6f6..00000000 --- a/examples/wagtaildemo/demo/static/demo/js/vendor/jquery.bxslider.min.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * BxSlider v4.1.1 - Fully loaded, responsive content slider - * http://bxslider.com - * - * Copyright 2012, Steven Wanderski - http://stevenwanderski.com - http://bxcreative.com - * Written while drinking Belgian ales and listening to jazz - * - * Released under the WTFPL license - http://sam.zoy.org/wtfpl/ - */ -!function(t){var e={},s={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",autoHover:!1,autoDelay:0,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,onSliderLoad:function(){},onSlideBefore:function(){},onSlideAfter:function(){},onSlideNext:function(){},onSlidePrev:function(){}};t.fn.bxSlider=function(n){if(0==this.length)return this;if(this.length>1)return this.each(function(){t(this).bxSlider(n)}),this;var o={},r=this;e.el=this;var a=t(window).width(),l=t(window).height(),d=function(){o.settings=t.extend({},s,n),o.settings.slideWidth=parseInt(o.settings.slideWidth),o.children=r.children(o.settings.slideSelector),o.children.lengthA set of demo templates to show you what Wagtail can do.
- {% block search_box %} - {% include "demo/includes/search_box.html" only %} - {% endblock %} -- {{ 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 %}
{% if self.location %}Location: {{ self.location }}
{% endif %} {% if self.audience %} @@ -14,7 +14,7 @@ {{ self.get_audience_display }} {% endif %} {% if self.cost %} -Cost: {{ self.cost|safe }}
+Cost: {{ self.cost }}
{% 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 %} +A set of demo templates to show you what Wagtail can do.
+ {% block search_box %} + {% include "demo/includes/search_box.html" only %} + {% endblock %} +{{ blog.date|date:"j F Y" }}
- {% if blog.search_description or blog.feed_image %} -- {% if blog.feed_image %} - {% image blog.feed_image width-200 %} - {% endif %} - {% if blog.search_description %} - {{ blog.search_description }} - {% endif %} -
+{{ blog.date }}
+ {% if blog.search_description %} +{{ blog.search_description }}
+ {% endif %} ++ {{ child.value.quote }} + {% if child.value.attribution %}- {{ child.value.attribution }}{% endif %} ++ {% elif child.block_type == 'paragraph' %} + {{ child.value|richtext }} + {% elif child.block_type == 'aligned_image' %} +
{{ editors_pick.description|safe }}
-{{ pick.description }}
+{{ advert.text }}
- {% if advert.url or advert.page %}{% endif %} -{% endfor %} \ No newline at end of file + +{% if adverts %} +- {% if person.image %} - {% image person.feed_image width-200 %} - {% endif %} - {% if person.search_description %} - {{ person.search_description }} - {% endif %} -
- {% endif %} - - {% endfor %} +