From a4a3ef8147f3dfcb36df0a0067924da00dc8b11e Mon Sep 17 00:00:00 2001 From: Eric Drechsel Date: Wed, 21 Jan 2015 10:49:25 -0800 Subject: [PATCH 01/42] #901 allow absolute path references in External link chooser tab --- wagtail/wagtailadmin/forms.py | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/wagtail/wagtailadmin/forms.py b/wagtail/wagtailadmin/forms.py index f62d7ae31..de07ac01c 100644 --- a/wagtail/wagtailadmin/forms.py +++ b/wagtail/wagtailadmin/forms.py @@ -1,4 +1,6 @@ from django import forms +from django.core import validators +from django.forms.widgets import TextInput from django.contrib.auth import get_user_model from django.contrib.auth.forms import AuthenticationForm, PasswordResetForm from django.utils.translation import ugettext as _ @@ -6,6 +8,25 @@ from django.utils.translation import ungettext, ugettext_lazy from wagtail.wagtailadmin.widgets import AdminPageChooser from wagtail.wagtailcore.models import Page +class URLOrAbsolutePathValidator(validators.URLValidator): + @staticmethod + def is_absolute_path(value): + return value.startswith('/') + + def __call__(self, value): + if URLOrAbsolutePathValidator.is_absolute_path(value): + return None + else: + return super(URLOrAbsolutePathValidator, self).__call__(value) + +class URLOrAbsolutePathField(forms.URLField): + widget = TextInput + default_validators = [URLOrAbsolutePathValidator()] + + def to_python(self, value): + if not URLOrAbsolutePathValidator.is_absolute_path(value): + value = super(URLOrAbsolutePathField, self).to_python(value) + return value class SearchForm(forms.Form): def __init__(self, *args, **kwargs): @@ -22,11 +43,11 @@ class SearchForm(forms.Form): class ExternalLinkChooserForm(forms.Form): - url = forms.URLField(required=True) + url = URLOrAbsolutePathField(required=True) class ExternalLinkChooserWithLinkTextForm(forms.Form): - url = forms.URLField(required=True) + url = URLOrAbsolutePathField(required=True) link_text = forms.CharField(required=True) From ca4cc125f252fdef0ec9ea035347d4a3421505fb Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Wed, 4 Feb 2015 23:39:28 +0000 Subject: [PATCH 02/42] Added drone config --- .drone.yml | 8 ++++++++ wagtail/tests/settings.py | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 000000000..eba35f8bc --- /dev/null +++ b/.drone.yml @@ -0,0 +1,8 @@ +image: kaedroho/django-base +script: + - pip3.4 install mock python-dateutil pytz elasticsearch + - python3.4 setup.py install + - python3.4 runtests.py +services: + - postgres + - dockerfile/elasticsearch diff --git a/wagtail/tests/settings.py b/wagtail/tests/settings.py index 461b61fa6..57fd9c101 100644 --- a/wagtail/tests/settings.py +++ b/wagtail/tests/settings.py @@ -16,6 +16,8 @@ DATABASES = { 'TEST_NAME': os.environ.get('DATABASE_NAME', 'test_wagtaildemo'), 'USER': os.environ.get('DATABASE_USER', 'postgres'), 'PASSWORD': os.environ.get('DATABASE_PASS', None), + 'HOST': os.environ.get('POSTGRES_PORT_5432_TCP_ADDR', None), + 'PORT': os.environ.get('POSTGRES_PORT_5432_TCP_PORT', None), } } @@ -121,6 +123,13 @@ try: 'TIMEOUT': 10, 'max_retries': 1, } + + # Check if we're running in Drone + if 'ELASTICSEARCH_PORT_9200_TCP_PORT' in os.environ: + ip = os.environ.get('ELASTICSEARCH_PORT_9200_TCP_ADDR') + port = os.environ.get('ELASTICSEARCH_PORT_9200_TCP_PORT') + + WAGTAILSEARCH_BACKENDS['elasticsearch']['URLS'] = ['http://%s:%s/' % (ip, port)] except ImportError: pass From 0dd16132876045cc86fb45c618ef522fe360b020 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Tue, 10 Feb 2015 10:01:43 +0000 Subject: [PATCH 03/42] Project template Vagrantfile now listens on port 8000 --- docs/getting_started/creating_your_project.rst | 6 +++--- docs/getting_started/installation.rst | 4 ++-- wagtail/project_template/Vagrantfile | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/getting_started/creating_your_project.rst b/docs/getting_started/creating_your_project.rst index 18aaa89be..76559e557 100644 --- a/docs/getting_started/creating_your_project.rst +++ b/docs/getting_started/creating_your_project.rst @@ -126,9 +126,9 @@ To setup the Vagrant box, run the following commands djrun -If you now visit http://localhost:8111 you should see a very basic "Welcome to your new Wagtail site!" page. +If you now visit http://localhost:8000 you should see a very basic "Welcome to your new Wagtail site!" page. -You can browse the Wagtail admin interface at: http://localhost:8111/admin +You can browse the Wagtail admin interface at: http://localhost:8000/admin You can read more about how Vagrant works at: https://docs.vagrantup.com/v2/ @@ -145,4 +145,4 @@ You can read more about how Vagrant works at: https://docs.vagrantup.com/v2/ ``djrun`` - This is short for ``python manage.py runserver 0.0.0.0:8000``. This is used to run the testing server which is accessible from ``http://localhost:8111`` (note that the port number gets changed by Vagrant) + This is short for ``python manage.py runserver 0.0.0.0:8000``. This is used to run the testing server which is accessible from ``http://localhost:8000`` (note that the port number gets changed by Vagrant) diff --git a/docs/getting_started/installation.rst b/docs/getting_started/installation.rst index f946eca8f..1f0fc031c 100644 --- a/docs/getting_started/installation.rst +++ b/docs/getting_started/installation.rst @@ -29,7 +29,7 @@ Then, within the SSH session:: ./manage.py runserver 0.0.0.0:8000 -This will make the demo site available on your host machine at the URL http://localhost:8111/ - you can access the Wagtail admin interface at http://localhost:8111/admin/ . Further instructions can be found at :ref:`editor_manual`. +This will make the demo site available on your host machine at the URL http://localhost:8000/ - you can access the Wagtail admin interface at http://localhost:8000/admin/ . Further instructions can be found at :ref:`editor_manual`. Once you’ve experimented with the demo site and are ready to build your own site, it's time to install Wagtail on your host machine. Even if you intend to do all further Wagtail work within Vagrant, installing the Wagtail package on your host machine will provide the ``wagtail start`` command that sets up the initial file structure for your project. @@ -78,7 +78,7 @@ Your site is now accessible at http://localhost:8000, with the admin backend ava ./manage.py createsuperuser ./manage.py runserver 0.0.0.0:8000 -Your site is now accessible at http://localhost:8111, with the admin backend available at http://localhost:8111/admin/ . +Your site is now accessible at http://localhost:8000, with the admin backend available at http://localhost:8000/admin/ . Optional extras =============== diff --git a/wagtail/project_template/Vagrantfile b/wagtail/project_template/Vagrantfile index 81f62e993..ffd017f24 100644 --- a/wagtail/project_template/Vagrantfile +++ b/wagtail/project_template/Vagrantfile @@ -8,7 +8,7 @@ Vagrant::Config.run do |config| # 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 + config.vm.forward_port 8000, 8000 # 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 From 85aee81808d2f4e9cce606e20e394a4408aa8e56 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Wed, 11 Feb 2015 12:56:17 +0000 Subject: [PATCH 04/42] Fixed system checks import --- wagtail/wagtailcore/models.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/wagtail/wagtailcore/models.py b/wagtail/wagtailcore/models.py index 250a6798d..1a4291e19 100644 --- a/wagtail/wagtailcore/models.py +++ b/wagtail/wagtailcore/models.py @@ -26,11 +26,7 @@ from django.utils.translation import ugettext_lazy as _ from django.core.exceptions import ValidationError, ImproperlyConfigured, ObjectDoesNotExist from django.utils.functional import cached_property from django.utils.encoding import python_2_unicode_compatible - -try: - from django.core import checks -except ImportError: - pass +from django.core import checks from treebeard.mp_tree import MP_Node From 56e398fd6464d9af66c16b74fa34f7199b91e29d Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Wed, 11 Feb 2015 12:57:56 +0000 Subject: [PATCH 05/42] Changed a unittest.skipto unittest.expectedFailure --- wagtail/wagtailusers/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wagtail/wagtailusers/tests.py b/wagtail/wagtailusers/tests.py index 43e52a73e..510e1423b 100644 --- a/wagtail/wagtailusers/tests.py +++ b/wagtail/wagtailusers/tests.py @@ -215,7 +215,7 @@ class TestGroupCreateView(TestCase, WagtailTestUtils): new_group = Group.objects.get(name='test group') self.assertEqual(new_group.page_permissions.all().count(), 2) - @unittest.skip("currently failing on Django 1.7") + @unittest.expectedFailure def test_duplicate_page_permissions_error(self): # Try to submit duplicate page permission entries response = self.post({ From f36836bc48ec7f77ba5e516fa8ec167877510a5f Mon Sep 17 00:00:00 2001 From: Dan Braghis Date: Thu, 12 Feb 2015 11:39:17 +0000 Subject: [PATCH 06/42] Change FileWrapper import location --- wagtail/wagtaildocs/views/serve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wagtail/wagtaildocs/views/serve.py b/wagtail/wagtaildocs/views/serve.py index ff89c4543..5d53544a1 100644 --- a/wagtail/wagtaildocs/views/serve.py +++ b/wagtail/wagtaildocs/views/serve.py @@ -1,6 +1,6 @@ from django.shortcuts import get_object_or_404 -from django.core.servers.basehttp import FileWrapper from django.http import HttpResponse +from wsgiref.util import FileWrapper from wagtail.wagtaildocs.models import Document, document_served From 918f286eeac567ec460d786a6cfd3dd4d95185a6 Mon Sep 17 00:00:00 2001 From: Dan Braghis Date: Thu, 12 Feb 2015 11:39:31 +0000 Subject: [PATCH 07/42] Use StreamingHttpResponse to server documents --- wagtail/wagtaildocs/views/serve.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wagtail/wagtaildocs/views/serve.py b/wagtail/wagtaildocs/views/serve.py index 5d53544a1..c10a36989 100644 --- a/wagtail/wagtaildocs/views/serve.py +++ b/wagtail/wagtaildocs/views/serve.py @@ -1,6 +1,6 @@ from django.shortcuts import get_object_or_404 -from django.http import HttpResponse from wsgiref.util import FileWrapper +from django.http import StreamingHttpResponse from wagtail.wagtaildocs.models import Document, document_served @@ -8,7 +8,7 @@ from wagtail.wagtaildocs.models import Document, document_served def serve(request, document_id, document_filename): doc = get_object_or_404(Document, id=document_id) wrapper = FileWrapper(doc.file) - response = HttpResponse(wrapper, content_type='application/octet-stream') + response = StreamingHttpResponse(wrapper, content_type='application/octet-stream') # TODO: strip out weird characters like semicolons from the filename # (there doesn't seem to be an official way of escaping them) From 29caba921e7c06f77f1bd0fb266c099a144dbca3 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Thu, 12 Feb 2015 12:23:58 +0000 Subject: [PATCH 08/42] Added tests for docs serve view --- wagtail/wagtaildocs/tests.py | 47 +++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/wagtail/wagtaildocs/tests.py b/wagtail/wagtaildocs/tests.py index 117d3bfed..d98b93393 100644 --- a/wagtail/wagtaildocs/tests.py +++ b/wagtail/wagtaildocs/tests.py @@ -1,5 +1,6 @@ from six import b import unittest +import mock from django.test import TestCase from django.contrib.auth import get_user_model @@ -17,9 +18,6 @@ from wagtail.wagtaildocs.models import Document from wagtail.wagtaildocs import models -# TODO: Test serve view - - class TestDocumentPermissions(TestCase): def setUp(self): # Create some user accounts for testing permissions @@ -519,3 +517,46 @@ class TestIssue613(TestCase, WagtailTestUtils): # Check self.assertEqual(len(results), 1) self.assertEqual(results[0].id, document.id) + + +class TestServeView(TestCase): + def setUp(self): + self.document = models.Document(title="Test document") + self.document.file.save('example.doc', ContentFile("A boring example document")) + + def get(self): + return self.client.get(reverse('wagtaildocs_serve', args=(self.document.id, 'example.doc'))) + + def test_response_code(self): + self.assertEqual(self.get().status_code, 200) + + @unittest.expectedFailure # Filename has a random string appended to it + def test_content_disposition_header(self): + self.assertEqual(self.get()['Content-Disposition'], 'attachment; filename=example.doc') + + def test_content_length_header(self): + self.assertEqual(self.get()['Content-Length'], '25') + + def test_is_streaming_response(self): + self.assertTrue(self.get().streaming) + + def test_content(self): + self.assertEqual(b"".join(self.get().streaming_content), b"A boring example document") + + def test_document_served_fired(self): + mock_handler = mock.MagicMock() + models.document_served.connect(mock_handler) + + self.get() + + self.assertEqual(mock_handler.call_count, 1) + self.assertEqual(mock_handler.mock_calls[0][2]['sender'], self.document) + + def test_with_nonexistant_document(self): + response = self.client.get(reverse('wagtaildocs_serve', args=(1000, 'blahblahblah', ))) + self.assertEqual(response.status_code, 404) + + @unittest.expectedFailure + def test_with_incorrect_filename(self): + response = self.client.get(reverse('wagtaildocs_serve', args=(self.document.id, 'incorrectfilename'))) + self.assertEqual(response.status_code, 404) From 76ef1eb41af508887b8226f02fe4787d8f67db14 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Thu, 12 Feb 2015 12:45:38 +0000 Subject: [PATCH 09/42] Fixed spelling mistake --- wagtail/wagtaildocs/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wagtail/wagtaildocs/tests.py b/wagtail/wagtaildocs/tests.py index d98b93393..e0060e49b 100644 --- a/wagtail/wagtaildocs/tests.py +++ b/wagtail/wagtaildocs/tests.py @@ -552,7 +552,7 @@ class TestServeView(TestCase): self.assertEqual(mock_handler.call_count, 1) self.assertEqual(mock_handler.mock_calls[0][2]['sender'], self.document) - def test_with_nonexistant_document(self): + def test_with_nonexistent_document(self): response = self.client.get(reverse('wagtaildocs_serve', args=(1000, 'blahblahblah', ))) self.assertEqual(response.status_code, 404) From 6fef8f441dd95c51fd1e45b405feff8b072bc8ab Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Thu, 12 Feb 2015 13:53:05 +0000 Subject: [PATCH 10/42] Changelog and release notes for #990 --- CHANGELOG.txt | 1 + docs/releases/0.8.5.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c60f672d2..45d6a09d2 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -35,6 +35,7 @@ Changelog * Fix: Punctuation characters are no longer stripped when performing search queries * Fix: When adding tags where there were none before, it is now possible to save a single tag with multiple words in it * Fix: richtext template tag no longer raises TypeError if None is passed into it (Alejandro Varas) +* Fix: Serving documents now uses a streaming HTTP response and will no longer break Djangos cache middleware 0.8.4 (04.12.2014) ~~~~~~~~~~~~~~~~~~ diff --git a/docs/releases/0.8.5.rst b/docs/releases/0.8.5.rst index 482d660a0..f5877583c 100644 --- a/docs/releases/0.8.5.rst +++ b/docs/releases/0.8.5.rst @@ -21,3 +21,4 @@ Bug fixes * Punctuation characters are no longer stripped when performing search queries * When adding tags where there were none before, it is now possible to save a single tag with multiple words in it * ``richtext`` template tag no longer raises ``TypeError`` if ``None`` is passed into it + * Serving documents now uses a streaming HTTP response and will no longer break Djangos cache middleware From 8fe8c5bc134fd78817b9450ce6e525b39461ceb9 Mon Sep 17 00:00:00 2001 From: Dan Braghis Date: Thu, 12 Feb 2015 14:46:31 +0000 Subject: [PATCH 11/42] Add changelog/release notes for #978 --- CHANGELOG.txt | 1 + docs/releases/0.9.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 45d6a09d2..81e123571 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -22,6 +22,7 @@ Changelog * Added validation to prevent pages being crated with only whitespace characters in their title fields (Frank Wiles) * Page model fields without a FieldPanel are no longer displayed in the form * No longer need to specify the base model on InlinePanel definitions + * The project template Vagrantfile now listens on port 8000 0.8.5 (xx.xx.20xx) diff --git a/docs/releases/0.9.rst b/docs/releases/0.9.rst index 0101e0760..e265150ae 100644 --- a/docs/releases/0.9.rst +++ b/docs/releases/0.9.rst @@ -31,6 +31,7 @@ Minor features * Added validation to prevent pages being created with only whitespace characters in their title fields * Page model fields without a FieldPanel are no longer displayed in the form * No longer need to specify the base model on InlinePanel definitions + * The project template Vagrantfile now listens on port 8000 Bug fixes From d9b78580a8fbcf670485cba0518663bf279c6e1f Mon Sep 17 00:00:00 2001 From: John Franey Date: Thu, 12 Feb 2015 12:22:44 -0500 Subject: [PATCH 12/42] Update form_builder.rst Update import statement to include all classes used in the example --- docs/core_components/form_builder.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/core_components/form_builder.rst b/docs/core_components/form_builder.rst index a98284d35..7682bbba6 100644 --- a/docs/core_components/form_builder.rst +++ b/docs/core_components/form_builder.rst @@ -23,7 +23,11 @@ Within the models.py of one of your apps, create a model that extends wagtailfor .. code:: python - + + from modelcluster.fields import ParentalKey + from wagtail.wagtailadmin.edit_handlers import (FieldPanel, InlinePanel, + MultiFieldPanel) + from wagtail.wagtailcore.fields import RichTextField from wagtail.wagtailforms.models import AbstractEmailForm, AbstractFormField class FormField(AbstractFormField): From 9072274a0199732834c0c6ec88688961dfa9eac1 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Wed, 11 Feb 2015 16:12:37 +0000 Subject: [PATCH 13/42] Improved front page --- docs/index.rst | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index c2236810e..d8187fe4b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,19 +1,31 @@ Welcome to Wagtail's documentation ================================== -Wagtail is a modern, flexible CMS, built on Django. +Wagtail is an open source CMS written in `Python `_ and built on the `Django web framework `_. -It supports Django 1.7.0+ on Python 2.7, 3.3 and 3.4. +Below are some useful links to help you get started with Wagtail. -.. toctree:: - :maxdepth: 3 - :titlesonly: - getting_started/index - core_components/index - contrib_components/index - howto/index - reference/index - support - editor_manual/index - releases/index +* **First steps** + + :doc:`Installation ` + + :doc:`Starting a project ` + + +* **Creating your Wagtail site** + + :doc:`core_components/pages/creating_pages` + + :doc:`Writing templates ` + + :doc:`core_components/images/index` + + :doc:`core_components/search/index` + + :doc:`howto/third_party_tutorials` + + +* **Using Wagtail** + + :doc:`Editors guide ` From 5d6aa0c6cac830637a55e61e55d4fc0079d163c8 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Wed, 11 Feb 2015 16:15:52 +0000 Subject: [PATCH 14/42] Started restructuring getting started docs --- .../getting_started/creating_your_project.rst | 132 ++---------------- docs/getting_started/installation.rst | 73 +--------- docs/getting_started/the_template.rst | 81 +++++++++++ docs/getting_started/using_vagrant.rst | 37 +++++ 4 files changed, 139 insertions(+), 184 deletions(-) create mode 100644 docs/getting_started/the_template.rst create mode 100644 docs/getting_started/using_vagrant.rst diff --git a/docs/getting_started/creating_your_project.rst b/docs/getting_started/creating_your_project.rst index 76559e557..6264ef3fd 100644 --- a/docs/getting_started/creating_your_project.rst +++ b/docs/getting_started/creating_your_project.rst @@ -11,7 +11,7 @@ The ``wagtail start`` command The easiest way to start a new project with wagtail is to use the ``wagtail start`` command. This command is installed into your environment when you install Wagtail (see: :doc:`installation`). -The command works the same way as ``django-admin.py startproject`` except that the produced project is pre-configured for Wagtail. It also contains some useful extras which we will look at in the next section. +The command works the same way as ``django-admin.py startproject`` except that the produced project is pre-configured for Wagtail. It also contains some useful extras which are documented :doc:`here `. To create a project, cd into a directory where you would like to create your project and run the following command: @@ -20,129 +20,25 @@ To create a project, cd into a directory where you would like to create your pro wagtail start mysite -The project -=========== +Running it +========== -Lets look at what ``wagtail start`` created:: +TODO - mysite/ - core/ - static/ - templates/ - base.html - 404.html - 500.html - mysite/ - settings/ - base.py - dev.py - production.py - manage.py - vagrant/ - provision.sh - Vagrantfile - readme.rst - requirements.txt - - -The "core" app ----------------- - -Location: ``/mysite/core/`` - -This app is here to help get you started quicker by providing a ``HomePage`` model with migrations to create one when you first setup your app. + cd mysite + pip install -r requirements.txt + python manage.py migrate + python manage.py createsuperuser + python manage.py runserver -Default templates and static files ----------------------------------- - -Location: ``/mysite/core/templates/`` and ``/mysite/core/static/`` - -The templates directory contains ``base.html``, ``404.html`` and ``500.html``. These files are very commonly needed on Wagtail sites to they have been added into the template. - -The static directory contains an empty javascript and sass file. Wagtail uses ``django-compressor`` for compiling and compressing static files. For more information, see: `Django Compressor Documentation `_ +Your site is now accessible at http://localhost:8000, with the admin backend available at http://localhost:8000/admin/ . -Vagrant configuration ---------------------- +Using Vagrant +------------- -Location: ``/Vagrantfile`` and ``/vagrant/`` - -If you have Vagrant installed, these files let you easily setup a development environment with PostgreSQL and Elasticsearch inside a virtual machine. - -See below section `With Vagrant`_ for info on how to use Vagrant in development - -If you do not want to use Vagrant, you can just delete these files. +TODO -Django settings ---------------- - -Location: ``/mysite/mysite/settings/`` - -The Django settings files are split up into ``base.py``, ``dev.py``, ``production.py`` and ``local.py``. - -.. glossary:: - - ``base.py`` - - This file is for global settings that will be used in both development and production. Aim to keep most of your configuration in this file. - - ``dev.py`` - - This file is for settings that will only be used by developers. For example: ``DEBUG = True`` - - ``production.py`` - - This file is for settings that will only run on a production server. For example: ``DEBUG = False`` - - ``local.py`` - - This file is used for settings local to a particular machine. This file should never be tracked by a version control system. - - .. tip:: - - On production servers, we recommend that you only store secrets in local.py (such as API keys and passwords). This can save you headaches in the future if you are ever trying to debug why a server is behaving badly. If you are using multiple servers which need different settings then we recommend that you create a different ``production.py`` file for each one. - - -Getting it running -================== - - -With Vagrant ------------- - -This is the easiest way to get the project running. Vagrant runs your project locally in a virtual machine so you can use PostgreSQL and Elasticsearch in development without having to install them on your host machine. If you haven't yet installed Vagrant, see: `Installing Vagrant `_. - - -To setup the Vagrant box, run the following commands - - .. code-block:: bash - - vagrant up # This may take some time on first run - vagrant ssh - # within the ssh session - dj createsuperuser - djrun - - -If you now visit http://localhost:8000 you should see a very basic "Welcome to your new Wagtail site!" page. - -You can browse the Wagtail admin interface at: http://localhost:8000/admin - -You can read more about how Vagrant works at: https://docs.vagrantup.com/v2/ - - -.. topic:: The ``dj`` and ``djrun`` aliases - - When using Vagrant, the Wagtail template provides two aliases: ``dj`` and ``djrun`` which can be used in the ``vagrant ssh`` session. - - .. glossary:: - - ``dj`` - - This is short for ``python manage.py`` so you can use it to reduce typing. For example: ``python manage.py syncdb`` becomes ``dj syncdb``. - - ``djrun`` - - This is short for ``python manage.py runserver 0.0.0.0:8000``. This is used to run the testing server which is accessible from ``http://localhost:8000`` (note that the port number gets changed by Vagrant) +:doc:`getting_started/using_vagrant` diff --git a/docs/getting_started/installation.rst b/docs/getting_started/installation.rst index 1f0fc031c..823f29818 100644 --- a/docs/getting_started/installation.rst +++ b/docs/getting_started/installation.rst @@ -2,6 +2,7 @@ Installation ============ + Before you start ================ @@ -10,75 +11,13 @@ A basic Wagtail setup can be installed on your machine with only a few prerequis Whether you just want to try out the demo site, or you're ready to dive in and create a Wagtail site with all bells and whistles enabled, we strongly recommend the Vagrant approach. Nevertheless, if you're the sort of person who balks at the idea of downloading a whole operating system just to run a web app, we've got you covered too. Start from `A basic Wagtail installation`_ below. -The demo site (a.k.a. the no-installation route) -================================================ - -We provide a demo site containing a set of standard templates and page types - if you're new to Wagtail, this is the best way to try it out and familiarise yourself with how Wagtail works from the point of view of an editor. - -If you're happy to use Vagrant, and you just want to set up the Wagtail demo site, or any other pre-existing Wagtail site that ships with Vagrant support, you don't need to install Wagtail at all. Install `Vagrant `__ and `VirtualBox `__, and run:: - - git clone https://github.com/torchbox/wagtaildemo.git - cd wagtaildemo - vagrant up - vagrant ssh +Install Python +============== -Then, within the SSH session:: +Install Wagtail +=============== - ./manage.py createsuperuser - ./manage.py runserver 0.0.0.0:8000 - - -This will make the demo site available on your host machine at the URL http://localhost:8000/ - you can access the Wagtail admin interface at http://localhost:8000/admin/ . Further instructions can be found at :ref:`editor_manual`. - -Once you’ve experimented with the demo site and are ready to build your own site, it's time to install Wagtail on your host machine. Even if you intend to do all further Wagtail work within Vagrant, installing the Wagtail package on your host machine will provide the ``wagtail start`` command that sets up the initial file structure for your project. - - -A basic Wagtail installation -============================ - -This provides everything you need to create a new Wagtail project from scratch, containing no page definitions or templates other than a basic homepage as a starting point for building your site. (For a gentler introduction to Wagtail, you may wish to try out the demo site first!) - -You will need Python's `pip `__ package manager. We also recommend `virtualenvwrapper `_ so that you can manage multiple independent Python environments for different projects - although this is not strictly necessary if you intend to do all your development under Vagrant. - -Wagtail is based on the Django web framework and various other Python libraries. Most of these are pure Python and will install automatically using ``pip``, but there are a few native-code components that require further attention: - - * libsass-python (for compiling SASS stylesheets) - requires a C++ compiler and the Python development headers. - * Pillow (for image processing) - additionally requires libjpeg and zlib. - -On Debian or Ubuntu, these can be installed with the command:: - - sudo apt-get install python-dev python-pip g++ libjpeg62-dev zlib1g-dev - -With these dependencies installed, Wagtail can then be installed with the command:: - - pip install wagtail - -(or if you're not using virtualenvwrapper: ``sudo pip install wagtail``.) - -You will now be able to run the following command to set up an initial file structure for your Wagtail project (replace ``myprojectname`` with a name of your choice):: - - wagtail start myprojectname - -**Without Vagrant:** Run the following steps to complete setup of your project (the ``createsuperuser`` step will prompt you to set up a superuser account):: - - cd myprojectname - pip install -r requirements.txt - python manage.py migrate - python manage.py createsuperuser - python manage.py runserver - -Your site is now accessible at http://localhost:8000, with the admin backend available at http://localhost:8000/admin/ . - -**With Vagrant:** Run the following steps to bring up the virtual machine and complete setup of your project (the ``createsuperuser`` step will prompt you to set up a superuser account):: - - cd myprojectname - vagrant up - vagrant ssh - ./manage.py createsuperuser - ./manage.py runserver 0.0.0.0:8000 - -Your site is now accessible at http://localhost:8000, with the admin backend available at http://localhost:8000/admin/ . Optional extras =============== @@ -104,6 +43,7 @@ This assumes that your PostgreSQL instance is configured to allow you to connect ElasticSearch ------------- + Wagtail integrates with ElasticSearch to provide full-text searching of your content, both within the Wagtail interface and on your site's front-end. If ElasticSearch is not available, Wagtail will fall back to much more basic search functionality using database queries. ElasticSearch is pre-installed as part of the Vagrant virtual machine image; non-Vagrant users can use the `debian.sh `__ or `ubuntu.sh `__ installation scripts as a guide. To enable ElasticSearch for your project, uncomment the ``elasticsearch`` line from your project's requirements.txt, and in ``myprojectname/settings/base.py``, uncomment the WAGTAILSEARCH_BACKENDS section. Then run:: @@ -153,6 +93,7 @@ to your deployment preferences. The canonical version is at `github.com/torchbox/wagtail/blob/master/scripts/install/debian.sh `_. + Docker ------ diff --git a/docs/getting_started/the_template.rst b/docs/getting_started/the_template.rst new file mode 100644 index 000000000..34e29d9af --- /dev/null +++ b/docs/getting_started/the_template.rst @@ -0,0 +1,81 @@ +The project template +==================== + + mysite/ + core/ + static/ + templates/ + base.html + 404.html + 500.html + mysite/ + settings/ + base.py + dev.py + production.py + manage.py + vagrant/ + provision.sh + Vagrantfile + readme.rst + requirements.txt + + +The "core" app +---------------- + +Location: ``/mysite/core/`` + +This app is here to help get you started quicker by providing a ``HomePage`` model with migrations to create one when you first setup your app. + + +Default templates and static files +---------------------------------- + +Location: ``/mysite/core/templates/`` and ``/mysite/core/static/`` + +The templates directory contains ``base.html``, ``404.html`` and ``500.html``. These files are very commonly needed on Wagtail sites to they have been added into the template. + +The static directory contains an empty javascript and sass file. Wagtail uses ``django-compressor`` for compiling and compressing static files. For more information, see: `Django Compressor Documentation `_ + + +Vagrant configuration +--------------------- + +Location: ``/Vagrantfile`` and ``/vagrant/`` + +If you have Vagrant installed, these files let you easily setup a development environment with PostgreSQL and Elasticsearch inside a virtual machine. + +See below section `With Vagrant`_ for info on how to use Vagrant in development + +If you do not want to use Vagrant, you can just delete these files. + + +Django settings +--------------- + +Location: ``/mysite/mysite/settings/`` + +The Django settings files are split up into ``base.py``, ``dev.py``, ``production.py`` and ``local.py``. + +.. glossary:: + + ``base.py`` + + This file is for global settings that will be used in both development and production. Aim to keep most of your configuration in this file. + + ``dev.py`` + + This file is for settings that will only be used by developers. For example: ``DEBUG = True`` + + ``production.py`` + + This file is for settings that will only run on a production server. For example: ``DEBUG = False`` + + ``local.py`` + + This file is used for settings local to a particular machine. This file should never be tracked by a version control system. + + .. tip:: + + On production servers, we recommend that you only store secrets in local.py (such as API keys and passwords). This can save you headaches in the future if you are ever trying to debug why a server is behaving badly. If you are using multiple servers which need different settings then we recommend that you create a different ``production.py`` file for each one. diff --git a/docs/getting_started/using_vagrant.rst b/docs/getting_started/using_vagrant.rst new file mode 100644 index 000000000..d04c755d9 --- /dev/null +++ b/docs/getting_started/using_vagrant.rst @@ -0,0 +1,37 @@ +Using Vagrant +============= + +This is the easiest way to get the project running. Vagrant runs your project locally in a virtual machine so you can use PostgreSQL and Elasticsearch in development without having to install them on your host machine. If you haven't yet installed Vagrant, see: `Installing Vagrant `_. + + +To setup the Vagrant box, run the following commands + + .. code-block:: bash + + vagrant up # This may take some time on first run + vagrant ssh + # within the ssh session + dj createsuperuser + djrun + + +If you now visit http://localhost:8111 you should see a very basic "Welcome to your new Wagtail site!" page. + +You can browse the Wagtail admin interface at: http://localhost:8111/admin + +You can read more about how Vagrant works at: https://docs.vagrantup.com/v2/ + + +.. topic:: The ``dj`` and ``djrun`` aliases + + When using Vagrant, the Wagtail template provides two aliases: ``dj`` and ``djrun`` which can be used in the ``vagrant ssh`` session. + + .. glossary:: + + ``dj`` + + This is short for ``python manage.py`` so you can use it to reduce typing. For example: ``python manage.py syncdb`` becomes ``dj syncdb``. + + ``djrun`` + + This is short for ``python manage.py runserver 0.0.0.0:8000``. This is used to run the testing server which is accessible from ``http://localhost:8111`` (note that the port number gets changed by Vagrant) From 3cdedf12f2d9743f32392ee32d69fd078ae7a2f3 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Wed, 11 Feb 2015 17:30:03 +0000 Subject: [PATCH 15/42] Docs updates --- .../getting_started/creating_your_project.rst | 86 ++++++++++++++----- docs/getting_started/index.rst | 1 + docs/getting_started/installation.rst | 5 ++ docs/index.rst | 22 ++++- docs/reference/index.rst | 1 + .../project_template.rst} | 4 +- 6 files changed, 93 insertions(+), 26 deletions(-) rename docs/{getting_started/the_template.rst => reference/project_template.rst} (96%) diff --git a/docs/getting_started/creating_your_project.rst b/docs/getting_started/creating_your_project.rst index 6264ef3fd..322218223 100644 --- a/docs/getting_started/creating_your_project.rst +++ b/docs/getting_started/creating_your_project.rst @@ -1,38 +1,79 @@ -===================== -Creating your project -===================== +=========================== +Starting your first project +=========================== -.. contents:: Contents - :local: +Once you've installed Wagtail, you are ready start your first project. -The ``wagtail start`` command -============================= - -The easiest way to start a new project with wagtail is to use the ``wagtail start`` command. This command is installed into your environment when you install Wagtail (see: :doc:`installation`). - -The command works the same way as ``django-admin.py startproject`` except that the produced project is pre-configured for Wagtail. It also contains some useful extras which are documented :doc:`here `. - -To create a project, cd into a directory where you would like to create your project and run the following command: +Wagtail provides a command to get you started called ``wagtail start``. Open up a command line shell in your project folder and type: .. code-block:: bash wagtail start mysite +This should create a new folder called ``mysite``. Its contents are similar to what ``django-admin.py startproject`` creates but ``wagtail start`` comes with some useful extras that are documented :doc:`here <../reference/project_template>`. + + Running it ========== -TODO - - cd mysite - pip install -r requirements.txt - python manage.py migrate - python manage.py createsuperuser - python manage.py runserver +Firstly, open up a command line shell in your new projects directory. -Your site is now accessible at http://localhost:8000, with the admin backend available at http://localhost:8000/admin/ . +* **1. Create a virtual environment** + + This is only required when you first run your project. This creates a folder to install extra Python modules into. + + **Linux/Mac OSX:** :code:`pyvenv venv` + + **Windows:** :code:`c:\Python34\python -m venv myenv` + + + https://docs.python.org/3/library/venv.html + + + **Python 2.7** + + ``pyvenv`` is only included with Python 3.3 onwards. To get virtual environments on Python 2, use the ``virtualenv`` package: + + .. code-block:: bash + + pip install virtualenv + virtualenv venv + + +* **2. Activate the virtual environment** + + **Linux/Mac OSX:** :code:`source venv/bin/activate` + + **Windows:** :code:`venv/Scripts/activate.bat` + + https://docs.python.org/3/library/venv.html + + +* **3. Install PIP requirements** + + :code:`pip install -r requirements.txt` + + +* **4. Create the database** + + By default, this would create an SQLite database file within the project directory. + + :code:`python manage.py migrate` + + +* **5. Create an admin user** + + :code:`python manage.py createsuperuser` + + +* **6. Run the development server** + + :code:`python manage.py runserver` + + Your site is now accessible at ``http://localhost:8000``, with the admin backend available at ``http://localhost:8000/admin/``. Using Vagrant @@ -40,5 +81,4 @@ Using Vagrant TODO - -:doc:`getting_started/using_vagrant` +:doc:`using_vagrant` diff --git a/docs/getting_started/index.rst b/docs/getting_started/index.rst index c614276e8..239df37e1 100644 --- a/docs/getting_started/index.rst +++ b/docs/getting_started/index.rst @@ -7,3 +7,4 @@ Getting started installation creating_your_project + using_vagrant diff --git a/docs/getting_started/installation.rst b/docs/getting_started/installation.rst index 823f29818..0628f13ad 100644 --- a/docs/getting_started/installation.rst +++ b/docs/getting_started/installation.rst @@ -14,10 +14,15 @@ Whether you just want to try out the demo site, or you're ready to dive in and c Install Python ============== +We recommend installing Python 3.4, but Wagtail also works with Python 2.7 and 3.3. + + Install Wagtail =============== +``pip install wagtail`` + Optional extras =============== diff --git a/docs/index.rst b/docs/index.rst index d8187fe4b..05fe57ce0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,9 +8,9 @@ Below are some useful links to help you get started with Wagtail. * **First steps** - :doc:`Installation ` + :doc:`getting_started/installation` - :doc:`Starting a project ` + :doc:`getting_started/creating_your_project` * **Creating your Wagtail site** @@ -29,3 +29,21 @@ Below are some useful links to help you get started with Wagtail. * **Using Wagtail** :doc:`Editors guide ` + + +Index +----- + + +.. toctree:: + :maxdepth: 2 + :titlesonly: + + getting_started/index + core_components/index + contrib_components/index + howto/index + reference/index + support + editor_manual/index + releases/index diff --git a/docs/reference/index.rst b/docs/reference/index.rst index c144fc6b1..568600b52 100644 --- a/docs/reference/index.rst +++ b/docs/reference/index.rst @@ -6,3 +6,4 @@ Reference :maxdepth: 2 management_commands + project_template diff --git a/docs/getting_started/the_template.rst b/docs/reference/project_template.rst similarity index 96% rename from docs/getting_started/the_template.rst rename to docs/reference/project_template.rst index 34e29d9af..8b5baadbe 100644 --- a/docs/getting_started/the_template.rst +++ b/docs/reference/project_template.rst @@ -1,6 +1,8 @@ The project template ==================== +.. code-block:: text + mysite/ core/ static/ @@ -46,7 +48,7 @@ Location: ``/Vagrantfile`` and ``/vagrant/`` If you have Vagrant installed, these files let you easily setup a development environment with PostgreSQL and Elasticsearch inside a virtual machine. -See below section `With Vagrant`_ for info on how to use Vagrant in development +See :doc:`../getting_started/using_vagrant` for info on how to use Vagrant in development If you do not want to use Vagrant, you can just delete these files. From 495c834ff08bd8bc6429045ffb2d6b11d8f2eec0 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Wed, 11 Feb 2015 17:34:37 +0000 Subject: [PATCH 16/42] Added "Trying wagtail" page --- docs/getting_started/index.rst | 1 + docs/getting_started/installation.rst | 50 --------------------- docs/getting_started/trying_wagtail.rst | 59 +++++++++++++++++++++++++ docs/index.rst | 2 + 4 files changed, 62 insertions(+), 50 deletions(-) create mode 100644 docs/getting_started/trying_wagtail.rst diff --git a/docs/getting_started/index.rst b/docs/getting_started/index.rst index 239df37e1..8b72c0206 100644 --- a/docs/getting_started/index.rst +++ b/docs/getting_started/index.rst @@ -5,6 +5,7 @@ Getting started .. toctree:: :maxdepth: 2 + trying_wagtail installation creating_your_project using_vagrant diff --git a/docs/getting_started/installation.rst b/docs/getting_started/installation.rst index 0628f13ad..9fd94f43e 100644 --- a/docs/getting_started/installation.rst +++ b/docs/getting_started/installation.rst @@ -60,53 +60,3 @@ To enable ElasticSearch for your project, uncomment the ``elasticsearch`` line f Image feature detection ----------------------- Wagtail can use the OpenCV computer vision library to detect faces and other features in images, and use this information to select the most appropriate centre point when cropping the image. OpenCV is pre-installed as part of the Vagrant virtual machine image, and Vagrant users can enable this by setting ``WAGTAILIMAGES_FEATURE_DETECTION_ENABLED`` to True in ``myprojectname/settings/base.py``. For installation outside of Vagrant, see :ref:`image_feature_detection`. - - -Alternative installation methods -================================ - -Ubuntu ------- - -If you have a fresh instance of Ubuntu 13.04 or later, you can install Wagtail, -along with a demonstration site containing a set of standard templates and page -types, in one step. As the root user:: - - curl -O https://raw.githubusercontent.com/torchbox/wagtail/master/scripts/install/ubuntu.sh; bash ubuntu.sh - -This script installs all the dependencies for a production-ready Wagtail site, -including PostgreSQL, Redis, Elasticsearch, Nginx and uwsgi. We -recommend you check through the script before running it, and adapt it according -to your deployment preferences. The canonical version is at -`github.com/torchbox/wagtail/blob/master/scripts/install/ubuntu.sh -`_. - - -Debian ------- - -If you have a fresh instance of Debian 7, you can install Wagtail, along with a -demonstration site containing a set of standard templates and page types, in one -step. As the root user:: - - curl -O https://raw.githubusercontent.com/torchbox/wagtail/master/scripts/install/debian.sh; bash debian.sh - -This script installs all the dependencies for a production-ready Wagtail site, -including PostgreSQL, Redis, Elasticsearch, Nginx and uwsgi. We -recommend you check through the script before running it, and adapt it according -to your deployment preferences. The canonical version is at -`github.com/torchbox/wagtail/blob/master/scripts/install/debian.sh -`_. - - -Docker ------- - -`@oyvindsk `_ has built a Dockerfile for the Wagtail demo. Simply run:: - - docker run -p 8000:8000 -d oyvindsk/wagtail-demo - -then access the site at http://your-ip:8000 and the admin -interface at http://your-ip:8000/admin using admin / test. - -See https://index.docker.io/u/oyvindsk/wagtail-demo/ for more details. diff --git a/docs/getting_started/trying_wagtail.rst b/docs/getting_started/trying_wagtail.rst new file mode 100644 index 000000000..93d5ed077 --- /dev/null +++ b/docs/getting_started/trying_wagtail.rst @@ -0,0 +1,59 @@ +============== +Trying Wagtail +============== + + +Wagtail demo +============ + + + +One line install +================ + + +Ubuntu +------ + +If you have a fresh instance of Ubuntu 13.04 or later, you can install Wagtail, +along with a demonstration site containing a set of standard templates and page +types, in one step. As the root user:: + + curl -O https://raw.githubusercontent.com/torchbox/wagtail/master/scripts/install/ubuntu.sh; bash ubuntu.sh + +This script installs all the dependencies for a production-ready Wagtail site, +including PostgreSQL, Redis, Elasticsearch, Nginx and uwsgi. We +recommend you check through the script before running it, and adapt it according +to your deployment preferences. The canonical version is at +`github.com/torchbox/wagtail/blob/master/scripts/install/ubuntu.sh +`_. + + +Debian +------ + +If you have a fresh instance of Debian 7, you can install Wagtail, along with a +demonstration site containing a set of standard templates and page types, in one +step. As the root user:: + + curl -O https://raw.githubusercontent.com/torchbox/wagtail/master/scripts/install/debian.sh; bash debian.sh + +This script installs all the dependencies for a production-ready Wagtail site, +including PostgreSQL, Redis, Elasticsearch, Nginx and uwsgi. We +recommend you check through the script before running it, and adapt it according +to your deployment preferences. The canonical version is at +`github.com/torchbox/wagtail/blob/master/scripts/install/debian.sh +`_. + + +Docker +====== + +`@oyvindsk `_ has built a Dockerfile for the Wagtail demo. Simply run:: + + docker run -p 8000:8000 -d oyvindsk/wagtail-demo + +then access the site at http://your-ip:8000 and the admin +interface at http://your-ip:8000/admin using admin / test. + +See https://index.docker.io/u/oyvindsk/wagtail-demo/ for more details. diff --git a/docs/index.rst b/docs/index.rst index 05fe57ce0..1f99d42ea 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,6 +8,8 @@ Below are some useful links to help you get started with Wagtail. * **First steps** + :doc:`getting_started/trying_wagtail` + :doc:`getting_started/installation` :doc:`getting_started/creating_your_project` From 88753e4370d1c721b3f433a02e6d34b923893c59 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Wed, 11 Feb 2015 17:55:35 +0000 Subject: [PATCH 17/42] Installation docs --- .../getting_started/creating_your_project.rst | 3 +- docs/getting_started/installation.rst | 34 +++++++++++++++++-- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/docs/getting_started/creating_your_project.rst b/docs/getting_started/creating_your_project.rst index 322218223..6dd60700e 100644 --- a/docs/getting_started/creating_your_project.rst +++ b/docs/getting_started/creating_your_project.rst @@ -2,8 +2,7 @@ Starting your first project =========================== -Once you've installed Wagtail, you are ready start your first project. - +Once you've installed Wagtail, you are ready start your first project. Wagtail projects are ordinary Django projects with a few extra apps installed. Wagtail provides a command to get you started called ``wagtail start``. Open up a command line shell in your project folder and type: diff --git a/docs/getting_started/installation.rst b/docs/getting_started/installation.rst index 9fd94f43e..3714f5bc3 100644 --- a/docs/getting_started/installation.rst +++ b/docs/getting_started/installation.rst @@ -14,14 +14,44 @@ Whether you just want to try out the demo site, or you're ready to dive in and c Install Python ============== -We recommend installing Python 3.4, but Wagtail also works with Python 2.7 and 3.3. +If you haven't got Python installed yet, we recommend installing Python 3.4. You can find the download for it here: https://www.python.org/downloads/ +pip +--- + +Python 3.4 has this built in. If you are using Python 2.7 or 3.3, you will have to install PIP separately + +See: https://pip.pypa.io/en/latest/installing.html + + +Virtual environments +-------------------- + +Python 3.3 and 3.4 has this built in. If you are using Python 2.7 you will have to install the ``virtualenv`` package from pip: + +.. code-block:: bash + + pip install virtualenv + Install Wagtail =============== -``pip install wagtail`` +Wagtail is available as a pip-installable package. To get the latest stable version: + +.. code-block:: bash + + pip install wagtail + + +To check that Wagtail can be seen by Python. Type ``python`` in your shell then try to import ``wagtail`` from the prompt: + +.. code-block:: python + + >>> import wagtail + >>> print(wagtail.get_version()) + 0.9 Optional extras From f52203ec39c6e70494faf725891d0ffce6cf228b Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Thu, 12 Feb 2015 09:01:37 +0000 Subject: [PATCH 18/42] Added wagtaildemo section back --- .../getting_started/creating_your_project.rst | 2 -- docs/getting_started/installation.rst | 2 -- docs/getting_started/trying_wagtail.rst | 19 +++++++++++++++++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/docs/getting_started/creating_your_project.rst b/docs/getting_started/creating_your_project.rst index 6dd60700e..83cb54014 100644 --- a/docs/getting_started/creating_your_project.rst +++ b/docs/getting_started/creating_your_project.rst @@ -78,6 +78,4 @@ Firstly, open up a command line shell in your new projects directory. Using Vagrant ------------- -TODO - :doc:`using_vagrant` diff --git a/docs/getting_started/installation.rst b/docs/getting_started/installation.rst index 3714f5bc3..a3bc9f464 100644 --- a/docs/getting_started/installation.rst +++ b/docs/getting_started/installation.rst @@ -50,8 +50,6 @@ To check that Wagtail can be seen by Python. Type ``python`` in your shell then .. code-block:: python >>> import wagtail - >>> print(wagtail.get_version()) - 0.9 Optional extras diff --git a/docs/getting_started/trying_wagtail.rst b/docs/getting_started/trying_wagtail.rst index 93d5ed077..a277936f7 100644 --- a/docs/getting_started/trying_wagtail.rst +++ b/docs/getting_started/trying_wagtail.rst @@ -6,6 +6,25 @@ Trying Wagtail Wagtail demo ============ +We provide a demo site containing a set of standard templates and page types - if you're new to Wagtail, this is the best way to try it out and familiarise yourself with how Wagtail works from the point of view of an editor. + +If you're happy to use Vagrant, and you just want to set up the Wagtail demo site, or any other pre-existing Wagtail site that ships with Vagrant support, you don't need to install Wagtail at all. Install `Vagrant `__ and `VirtualBox `__, and run:: + + git clone https://github.com/torchbox/wagtaildemo.git + cd wagtaildemo + vagrant up + vagrant ssh + + +Then, within the SSH session:: + + ./manage.py createsuperuser + ./manage.py runserver 0.0.0.0:8000 + + +This will make the demo site available on your host machine at the URL http://localhost:8111/ - you can access the Wagtail admin interface at http://localhost:8111/admin/ . Further instructions can be found at :ref:`editor_manual`. + +Once you’ve experimented with the demo site and are ready to build your own site, it's time to install Wagtail on your host machine. Even if you intend to do all further Wagtail work within Vagrant, installing the Wagtail package on your host machine will provide the ``wagtail start`` command that sets up the initial file structure for your project. One line install From e6da637256201a4a04e65fb00127373eb19f5995 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Mon, 16 Feb 2015 10:28:39 +0000 Subject: [PATCH 19/42] Changed ports to 8000 --- docs/getting_started/trying_wagtail.rst | 2 +- docs/getting_started/using_vagrant.rst | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/getting_started/trying_wagtail.rst b/docs/getting_started/trying_wagtail.rst index a277936f7..ac6541312 100644 --- a/docs/getting_started/trying_wagtail.rst +++ b/docs/getting_started/trying_wagtail.rst @@ -22,7 +22,7 @@ Then, within the SSH session:: ./manage.py runserver 0.0.0.0:8000 -This will make the demo site available on your host machine at the URL http://localhost:8111/ - you can access the Wagtail admin interface at http://localhost:8111/admin/ . Further instructions can be found at :ref:`editor_manual`. +This will make the demo site available on your host machine at the URL http://localhost:8000/ - you can access the Wagtail admin interface at http://localhost:8000/admin/ . Further instructions can be found at :ref:`editor_manual`. Once you’ve experimented with the demo site and are ready to build your own site, it's time to install Wagtail on your host machine. Even if you intend to do all further Wagtail work within Vagrant, installing the Wagtail package on your host machine will provide the ``wagtail start`` command that sets up the initial file structure for your project. diff --git a/docs/getting_started/using_vagrant.rst b/docs/getting_started/using_vagrant.rst index d04c755d9..760d0644b 100644 --- a/docs/getting_started/using_vagrant.rst +++ b/docs/getting_started/using_vagrant.rst @@ -15,9 +15,9 @@ To setup the Vagrant box, run the following commands djrun -If you now visit http://localhost:8111 you should see a very basic "Welcome to your new Wagtail site!" page. +If you now visit http://localhost:8000 you should see a very basic "Welcome to your new Wagtail site!" page. -You can browse the Wagtail admin interface at: http://localhost:8111/admin +You can browse the Wagtail admin interface at: http://localhost:8000/admin You can read more about how Vagrant works at: https://docs.vagrantup.com/v2/ @@ -34,4 +34,4 @@ You can read more about how Vagrant works at: https://docs.vagrantup.com/v2/ ``djrun`` - This is short for ``python manage.py runserver 0.0.0.0:8000``. This is used to run the testing server which is accessible from ``http://localhost:8111`` (note that the port number gets changed by Vagrant) + This is short for ``python manage.py runserver 0.0.0.0:8000``. This is used to run the testing server which is accessible from ``http://localhost:8000`` (note that the port number gets changed by Vagrant) From b73404214009151b4a7d4c817c5024190bf37a6c Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Mon, 16 Feb 2015 13:39:47 +0000 Subject: [PATCH 20/42] Unit test for #917 --- .../wagtailadmin/tests/test_page_chooser.py | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/wagtail/wagtailadmin/tests/test_page_chooser.py b/wagtail/wagtailadmin/tests/test_page_chooser.py index 475e4f7b1..834acde8c 100644 --- a/wagtail/wagtailadmin/tests/test_page_chooser.py +++ b/wagtail/wagtailadmin/tests/test_page_chooser.py @@ -101,9 +101,24 @@ class TestChooserExternalLink(TestCase, WagtailTestUtils): self.assertEqual(self.get({'prompt_for_link_text': 'foo'}).status_code, 200) def test_create_link(self): - request = self.post({'url': 'http://www.example.com'}) - self.assertContains(request, "'url': 'http://www.example.com/',") - self.assertContains(request, "'title': 'http://www.example.com/'") + response = self.post({'url': 'http://www.example.com'}) + self.assertEqual(response.status_code, 200) + self.assertContains(response, "'onload'") # indicates success / post back to calling page + self.assertContains(response, "'url': 'http://www.example.com/',") + self.assertContains(response, "'title': 'http://www.example.com/'") + + def test_invalid_url(self): + response = self.post({'url': 'ntp://www.example.com'}) + self.assertEqual(response.status_code, 200) + self.assertContains(response, "'html'") # indicates failure / show error message + self.assertContains(response, "Enter a valid URL.") + + def test_allow_local_url(self): + response = self.post({'url': '/admin/'}) + self.assertEqual(response.status_code, 200) + self.assertContains(response, "'onload'") # indicates success / post back to calling page + self.assertContains(response, "'url': '/admin/',") + self.assertContains(response, "'title': '/admin/'") class TestChooserEmailLink(TestCase, WagtailTestUtils): From c92102370203379be089c752b52af425e4ce3b16 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Mon, 16 Feb 2015 13:49:01 +0000 Subject: [PATCH 21/42] release note for #917 --- CHANGELOG.txt | 1 + docs/releases/0.9.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 81e123571..8cdf5ca0d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -23,6 +23,7 @@ Changelog * Page model fields without a FieldPanel are no longer displayed in the form * No longer need to specify the base model on InlinePanel definitions * The project template Vagrantfile now listens on port 8000 + * The external link chooser in rich text areas now accepts URLs of the form '/some/local/path', to allow linking to non-Wagtail-controlled URLs within the local site (Eric Drechsel) 0.8.5 (xx.xx.20xx) diff --git a/docs/releases/0.9.rst b/docs/releases/0.9.rst index e265150ae..d0893095a 100644 --- a/docs/releases/0.9.rst +++ b/docs/releases/0.9.rst @@ -32,6 +32,7 @@ Minor features * Page model fields without a FieldPanel are no longer displayed in the form * No longer need to specify the base model on InlinePanel definitions * The project template Vagrantfile now listens on port 8000 + * The external link chooser in rich text areas now accepts URLs of the form '/some/local/path', to allow linking to non-Wagtail-controlled URLs within the local site Bug fixes From 77e99e951dfab77f942f9c87010a303f7d8d0ebf Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Mon, 16 Feb 2015 13:51:14 +0000 Subject: [PATCH 22/42] fix italic vs code formatting mismatches --- docs/releases/0.9.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/releases/0.9.rst b/docs/releases/0.9.rst index d0893095a..2482d718d 100644 --- a/docs/releases/0.9.rst +++ b/docs/releases/0.9.rst @@ -23,10 +23,10 @@ Minor features * Dropped Python 2.6 and 3.2 support * Dropped Elasticsearch 0.90.x support * Search view accepts "page" GET parameter in line with pagination - * Removed the dependency on `LOGIN_URL` and `LOGIN_REDIRECT_URL` settings + * Removed the dependency on ``LOGIN_URL`` and ``LOGIN_REDIRECT_URL`` settings * Password reset view names namespaced to wagtailadmin * Removed the need to add permission check on admin views (now automated) - * Reversing `django.contrib.auth.admin.login` will no longer lead to Wagtails login view (making it easier to have front end views) + * Reversing ``django.contrib.auth.admin.login`` will no longer lead to Wagtails login view (making it easier to have front end views) * Added cache-control headers to all admin views. This allows Varnish/Squid/CDN to run on vanilla settings in front of a Wagtail site * Added validation to prevent pages being created with only whitespace characters in their title fields * Page model fields without a FieldPanel are no longer displayed in the form From a62022d898a71a4f2032d2f9a91a0ebe9f149cda Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Mon, 16 Feb 2015 15:03:49 +0000 Subject: [PATCH 23/42] allow non-digit chars (e.g. '-') in user IDs in URLs; fixes #565 --- wagtail/wagtailusers/tests.py | 11 +++++++++++ wagtail/wagtailusers/urls/users.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/wagtail/wagtailusers/tests.py b/wagtail/wagtailusers/tests.py index 510e1423b..ca2719d54 100644 --- a/wagtail/wagtailusers/tests.py +++ b/wagtail/wagtailusers/tests.py @@ -16,6 +16,8 @@ from wagtail.wagtailcore.models import Page, GroupPagePermission class TestUserIndexView(TestCase, WagtailTestUtils): def setUp(self): + # create a user that should be visible in the listing + self.test_user = get_user_model().objects.create_user(username='testuser', email='testuser@email.com', password='password') self.login() def get(self, params={}): @@ -25,6 +27,15 @@ class TestUserIndexView(TestCase, WagtailTestUtils): response = self.get() self.assertEqual(response.status_code, 200) self.assertTemplateUsed(response, 'wagtailusers/users/index.html') + self.assertContains(response, 'testuser') + + def test_allows_negative_ids(self): + # see https://github.com/torchbox/wagtail/issues/565 + get_user_model().objects.create_user('guardian', 'guardian@example.com', 'gu@rd14n', id=-1) + response = self.get() + self.assertEqual(response.status_code, 200) + self.assertContains(response, 'testuser') + self.assertContains(response, 'guardian') def test_search(self): response = self.get({'q': "Hello"}) diff --git a/wagtail/wagtailusers/urls/users.py b/wagtail/wagtailusers/urls/users.py index 78487fc5a..8ddd0a83d 100644 --- a/wagtail/wagtailusers/urls/users.py +++ b/wagtail/wagtailusers/urls/users.py @@ -4,5 +4,5 @@ from wagtail.wagtailusers.views import users urlpatterns = [ url(r'^$', users.index, name='wagtailusers_users_index'), url(r'^new/$', users.create, name='wagtailusers_users_create'), - url(r'^(\d+)/$', users.edit, name='wagtailusers_users_edit'), + url(r'^([^\/]+)/$', users.edit, name='wagtailusers_users_edit'), ] From 42a48b0085a103d5a9640d1d800a4d466afbf873 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Mon, 16 Feb 2015 15:08:22 +0000 Subject: [PATCH 24/42] release note for 4068385 --- CHANGELOG.txt | 1 + docs/releases/0.8.5.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8cdf5ca0d..3c9f5510d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -38,6 +38,7 @@ Changelog * Fix: When adding tags where there were none before, it is now possible to save a single tag with multiple words in it * Fix: richtext template tag no longer raises TypeError if None is passed into it (Alejandro Varas) * Fix: Serving documents now uses a streaming HTTP response and will no longer break Djangos cache middleware +* Fix: User admin area no longer fails in the presence of negative user IDs (as used by django-guardian's default settings) 0.8.4 (04.12.2014) ~~~~~~~~~~~~~~~~~~ diff --git a/docs/releases/0.8.5.rst b/docs/releases/0.8.5.rst index f5877583c..db3a45c8c 100644 --- a/docs/releases/0.8.5.rst +++ b/docs/releases/0.8.5.rst @@ -22,3 +22,4 @@ Bug fixes * When adding tags where there were none before, it is now possible to save a single tag with multiple words in it * ``richtext`` template tag no longer raises ``TypeError`` if ``None`` is passed into it * Serving documents now uses a streaming HTTP response and will no longer break Djangos cache middleware + * Fix: User admin area no longer fails in the presence of negative user IDs (as used by django-guardian's default settings) \ No newline at end of file From 77340cfe9580ec8510f4af9333cf1aba2d09e70b Mon Sep 17 00:00:00 2001 From: Dan Braghis Date: Thu, 12 Feb 2015 22:22:22 +0000 Subject: [PATCH 25/42] Add tests for the password reset emails --- .../wagtailadmin/tests/test_password_reset.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 wagtail/wagtailadmin/tests/test_password_reset.py diff --git a/wagtail/wagtailadmin/tests/test_password_reset.py b/wagtail/wagtailadmin/tests/test_password_reset.py new file mode 100644 index 000000000..e0a1dd1b4 --- /dev/null +++ b/wagtail/wagtailadmin/tests/test_password_reset.py @@ -0,0 +1,33 @@ +from django.test import TestCase, override_settings +from django.core import mail + +from wagtail.tests.utils import WagtailTestUtils +from wagtail.wagtailcore.models import Site + + +class TestUserPasswordReset(TestCase, WagtailTestUtils): + fixtures = ['test.json'] + + # need to clear urlresolver caches before/after tests, because we override ROOT_URLCONF + # in some tests here + def setUp(self): + from django.core.urlresolvers import clear_url_caches + clear_url_caches() + + def tearDown(self): + from django.core.urlresolvers import clear_url_caches + clear_url_caches() + + @override_settings(ROOT_URLCONF="wagtail.wagtailadmin.urls") + def test_email_found_default_url(self): + response = self.client.post('/password_reset/', {'email': 'siteeditor@example.com'}) + self.assertEqual(response.status_code, 302) + self.assertEqual(len(mail.outbox), 1) + self.assertIn("testserver", mail.outbox[0].body) + + @override_settings(ROOT_URLCONF="wagtail.wagtailadmin.urls", BASE_URL='http://mysite.com') + def test_email_found_base_url(self): + response = self.client.post('/password_reset/', {'email': 'siteeditor@example.com'}) + self.assertEqual(response.status_code, 302) + self.assertEqual(len(mail.outbox), 1) + self.assertIn("mysite.com", mail.outbox[0].body) From 82cca64b2a9a25395b864ca2949050658952147e Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Mon, 16 Feb 2015 18:31:17 +0000 Subject: [PATCH 26/42] Use BASE_URL in password reset email if available - fixes #841 --- .../templates/wagtailadmin/account/password_reset/email.txt | 4 ++-- wagtail/wagtailadmin/templatetags/wagtailadmin_tags.py | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/wagtail/wagtailadmin/templates/wagtailadmin/account/password_reset/email.txt b/wagtail/wagtailadmin/templates/wagtailadmin/account/password_reset/email.txt index b9b64d35e..892a4b93d 100644 --- a/wagtail/wagtailadmin/templates/wagtailadmin/account/password_reset/email.txt +++ b/wagtail/wagtailadmin/templates/wagtailadmin/account/password_reset/email.txt @@ -1,3 +1,3 @@ -{% load i18n %} +{% load i18n wagtailadmin_tags %}{% base_url_setting as base_url %} {% trans "Please follow the link below to reset your password" %} -{{ protocol }}://{{ domain }}{% url 'wagtailadmin_password_reset_confirm' uidb64=uid token=token %} \ No newline at end of file +{% if base_url %}{{ base_url }}{% else %}{{ protocol }}://{{ domain }}{% endif %}{% url 'wagtailadmin_password_reset_confirm' uidb64=uid token=token %} \ No newline at end of file diff --git a/wagtail/wagtailadmin/templatetags/wagtailadmin_tags.py b/wagtail/wagtailadmin/templatetags/wagtailadmin_tags.py index cb049d0e8..3b9302fce 100644 --- a/wagtail/wagtailadmin/templatetags/wagtailadmin_tags.py +++ b/wagtail/wagtailadmin/templatetags/wagtailadmin_tags.py @@ -134,6 +134,11 @@ def usage_count_enabled(): return getattr(settings, 'WAGTAIL_USAGE_COUNT_ENABLED', False) +@register.assignment_tag +def base_url_setting(): + return getattr(settings, 'BASE_URL', None) + + class EscapeScriptNode(template.Node): TAG_NAME = 'escapescript' SCRIPT_RE = re.compile(r'<(-*)/script>') From 610ae217e6479cff12eb1a3c4e5c536d2affe207 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Tue, 17 Feb 2015 12:48:34 +0000 Subject: [PATCH 27/42] Removed Rect.get_key --- wagtail/wagtailimages/rect.py | 10 ---------- wagtail/wagtailimages/tests/tests.py | 4 ---- 2 files changed, 14 deletions(-) diff --git a/wagtail/wagtailimages/rect.py b/wagtail/wagtailimages/rect.py index cd56f4b0d..a398df59a 100644 --- a/wagtail/wagtailimages/rect.py +++ b/wagtail/wagtailimages/rect.py @@ -57,13 +57,3 @@ class Rect(object): x + width / 2, y + height / 2, ) - - - # DELETEME - def get_key(self): - return "%(x)d-%(y)d-%(width)dx%(height)d" % { - 'x': int(self.centroid_x), - 'y': int(self.centroid_y), - 'width': int(self.width), - 'height': int(self.height), - } diff --git a/wagtail/wagtailimages/tests/tests.py b/wagtail/wagtailimages/tests/tests.py index 6df1dba56..2701ab145 100644 --- a/wagtail/wagtailimages/tests/tests.py +++ b/wagtail/wagtailimages/tests/tests.py @@ -237,7 +237,3 @@ class TestRect(TestCase): def test_from_point(self): rect = Rect.from_point(100, 200, 50, 20) self.assertEqual(rect, Rect(75, 190, 125, 210)) - - def test_get_key(self): - rect = Rect(100, 150, 200, 250) - self.assertEqual(rect.get_key(), '150-200-100x100') From 1aa9bae6e8fed765d67f8563c98c15bd216a951a Mon Sep 17 00:00:00 2001 From: Dan Braghis Date: Tue, 17 Feb 2015 14:18:00 +0000 Subject: [PATCH 28/42] Add changelog and release notes for #997 --- CHANGELOG.txt | 2 +- docs/releases/0.9.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3c9f5510d..708cb0763 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -24,7 +24,7 @@ Changelog * No longer need to specify the base model on InlinePanel definitions * The project template Vagrantfile now listens on port 8000 * The external link chooser in rich text areas now accepts URLs of the form '/some/local/path', to allow linking to non-Wagtail-controlled URLs within the local site (Eric Drechsel) - + * Password reset emails now use the ``BASE_URL`` setting for the reset URL 0.8.5 (xx.xx.20xx) ~~~~~~~~~~~~~~~~~~ diff --git a/docs/releases/0.9.rst b/docs/releases/0.9.rst index 2482d718d..b7be93f67 100644 --- a/docs/releases/0.9.rst +++ b/docs/releases/0.9.rst @@ -33,6 +33,7 @@ Minor features * No longer need to specify the base model on InlinePanel definitions * The project template Vagrantfile now listens on port 8000 * The external link chooser in rich text areas now accepts URLs of the form '/some/local/path', to allow linking to non-Wagtail-controlled URLs within the local site + * Password reset emails now use the ``BASE_URL`` setting for the reset URL Bug fixes From 7fabf23fae713d4954e490700a9d0e25de5dc6c2 Mon Sep 17 00:00:00 2001 From: Dan Braghis Date: Tue, 17 Feb 2015 14:41:02 +0000 Subject: [PATCH 29/42] Move changelog entry for 997 to 0.8.5 instead of 0.9 --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 708cb0763..59ec71272 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -24,7 +24,6 @@ Changelog * No longer need to specify the base model on InlinePanel definitions * The project template Vagrantfile now listens on port 8000 * The external link chooser in rich text areas now accepts URLs of the form '/some/local/path', to allow linking to non-Wagtail-controlled URLs within the local site (Eric Drechsel) - * Password reset emails now use the ``BASE_URL`` setting for the reset URL 0.8.5 (xx.xx.20xx) ~~~~~~~~~~~~~~~~~~ @@ -39,6 +38,7 @@ Changelog * Fix: richtext template tag no longer raises TypeError if None is passed into it (Alejandro Varas) * Fix: Serving documents now uses a streaming HTTP response and will no longer break Djangos cache middleware * Fix: User admin area no longer fails in the presence of negative user IDs (as used by django-guardian's default settings) +* Fix: Password reset emails now use the ``BASE_URL`` setting for the reset URL 0.8.4 (04.12.2014) ~~~~~~~~~~~~~~~~~~ From 71315d69101ee67f68621803cb96512524dfa09d Mon Sep 17 00:00:00 2001 From: Dave Cranwell Date: Tue, 17 Feb 2015 15:00:44 +0000 Subject: [PATCH 30/42] making focused menu items more obvious --- .../static/wagtailadmin/scss/components/main-nav.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wagtail/wagtailadmin/static/wagtailadmin/scss/components/main-nav.scss b/wagtail/wagtailadmin/static/wagtailadmin/scss/components/main-nav.scss index 40e227914..181516da0 100644 --- a/wagtail/wagtailadmin/static/wagtailadmin/scss/components/main-nav.scss +++ b/wagtail/wagtailadmin/static/wagtailadmin/scss/components/main-nav.scss @@ -72,7 +72,9 @@ $submenu-color:darken($color-grey-1, 5%); font-size:0.95em; font-weight:300; - &:hover{ + &:hover, + &:focus{ + outline:none; background-color:rgba(100,100,100,0.15); color:white; text-shadow:-1px -1px 0px rgba(0,0,0,0.3); From 82c7a422557966b3a16a1ea405e5ff52c3972d06 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Tue, 17 Feb 2015 15:22:30 +0000 Subject: [PATCH 31/42] Move release note for #997 to 0.8.5 in the docs as well --- docs/releases/0.8.5.rst | 3 ++- docs/releases/0.9.rst | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/releases/0.8.5.rst b/docs/releases/0.8.5.rst index db3a45c8c..2ddfe3c69 100644 --- a/docs/releases/0.8.5.rst +++ b/docs/releases/0.8.5.rst @@ -22,4 +22,5 @@ Bug fixes * When adding tags where there were none before, it is now possible to save a single tag with multiple words in it * ``richtext`` template tag no longer raises ``TypeError`` if ``None`` is passed into it * Serving documents now uses a streaming HTTP response and will no longer break Djangos cache middleware - * Fix: User admin area no longer fails in the presence of negative user IDs (as used by django-guardian's default settings) \ No newline at end of file + * User admin area no longer fails in the presence of negative user IDs (as used by django-guardian's default settings) + * Password reset emails now use the ``BASE_URL`` setting for the reset URL diff --git a/docs/releases/0.9.rst b/docs/releases/0.9.rst index b7be93f67..2482d718d 100644 --- a/docs/releases/0.9.rst +++ b/docs/releases/0.9.rst @@ -33,7 +33,6 @@ Minor features * No longer need to specify the base model on InlinePanel definitions * The project template Vagrantfile now listens on port 8000 * The external link chooser in rich text areas now accepts URLs of the form '/some/local/path', to allow linking to non-Wagtail-controlled URLs within the local site - * Password reset emails now use the ``BASE_URL`` setting for the reset URL Bug fixes From 591478d8dae4347971db465063ad0603682a5bba Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Tue, 17 Feb 2015 15:32:22 +0000 Subject: [PATCH 32/42] Add a default BASE_URL setting to the project template --- wagtail/project_template/project_name/settings/base.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wagtail/project_template/project_name/settings/base.py b/wagtail/project_template/project_name/settings/base.py index d3cbbe729..b84cdc937 100644 --- a/wagtail/project_template/project_name/settings/base.py +++ b/wagtail/project_template/project_name/settings/base.py @@ -28,6 +28,11 @@ TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] +# Base URL to use when referring to full URLs within the Wagtail admin backend - +# e.g. in notification emails. Don't include '/admin' or a trailing slash +BASE_URL = 'http://localhost:8000' + + # Application definition INSTALLED_APPS = ( From 3c3a0c4189888ee6f092964eb28fb96d6c1068b6 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Tue, 17 Feb 2015 15:56:35 +0000 Subject: [PATCH 33/42] use example.com as the default BASE_URL --- wagtail/project_template/project_name/settings/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wagtail/project_template/project_name/settings/base.py b/wagtail/project_template/project_name/settings/base.py index b84cdc937..2af151e58 100644 --- a/wagtail/project_template/project_name/settings/base.py +++ b/wagtail/project_template/project_name/settings/base.py @@ -30,7 +30,7 @@ ALLOWED_HOSTS = [] # Base URL to use when referring to full URLs within the Wagtail admin backend - # e.g. in notification emails. Don't include '/admin' or a trailing slash -BASE_URL = 'http://localhost:8000' +BASE_URL = 'http://example.com' # Application definition From f0f7bc8e3216c09f126d2ac3b762deef5af5c2a9 Mon Sep 17 00:00:00 2001 From: Dave Cranwell Date: Tue, 17 Feb 2015 16:08:01 +0000 Subject: [PATCH 34/42] enforced creation of paragraphs when first typing in a rich text field --- .../js/hallo-plugins/hallo-requireparagraphs.js | 17 +++++++++++++++++ .../static/wagtailadmin/js/page-editor.js | 3 ++- .../wagtailadmin/pages/_editor_js.html | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 wagtail/wagtailadmin/static/wagtailadmin/js/hallo-plugins/hallo-requireparagraphs.js diff --git a/wagtail/wagtailadmin/static/wagtailadmin/js/hallo-plugins/hallo-requireparagraphs.js b/wagtail/wagtailadmin/static/wagtailadmin/js/hallo-plugins/hallo-requireparagraphs.js new file mode 100644 index 000000000..71dd9a76a --- /dev/null +++ b/wagtail/wagtailadmin/static/wagtailadmin/js/hallo-plugins/hallo-requireparagraphs.js @@ -0,0 +1,17 @@ +(function() { + (function(jQuery) { + return jQuery.widget("IKS.hallorequireparagraphs", { + options: { + editable: null, + uuid: '', + blockElements: ["dd", "div", "dl", "figure", "form", "ul", "ol", "table", "p", "h1", "h2", "h3", "h4", "h5", "h6"] + }, + cleanupContentClone: function(el) { + // if the editable element contains no block-level elements wrap the contents in a

+ if(el.html().length && !jQuery(this.options.blockElements.toString(), el).length){ + this.options.editable.execute('formatBlock', 'p'); + } + } + }); + })(jQuery); +}).call(this); \ No newline at end of file diff --git a/wagtail/wagtailadmin/static/wagtailadmin/js/page-editor.js b/wagtail/wagtailadmin/static/wagtailadmin/js/page-editor.js index 326ea9ca4..673fc8fa4 100644 --- a/wagtail/wagtailadmin/static/wagtailadmin/js/page-editor.js +++ b/wagtail/wagtailadmin/static/wagtailadmin/js/page-editor.js @@ -6,7 +6,8 @@ var halloPlugins = { 'hallolists': {}, 'hallohr': {}, 'halloreundo': {}, - 'hallowagtaillink': {} + 'hallowagtaillink': {}, + 'hallorequireparagraphs': {} }; function registerHalloPlugin(name, opts) { diff --git a/wagtail/wagtailadmin/templates/wagtailadmin/pages/_editor_js.html b/wagtail/wagtailadmin/templates/wagtailadmin/pages/_editor_js.html index b83ca3d6a..94d698673 100644 --- a/wagtail/wagtailadmin/templates/wagtailadmin/pages/_editor_js.html +++ b/wagtail/wagtailadmin/templates/wagtailadmin/pages/_editor_js.html @@ -18,6 +18,7 @@ + From 149da7f5789f54b309aff34f04c2144ae7b2ba9b Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Tue, 17 Feb 2015 16:33:53 +0000 Subject: [PATCH 35/42] Mention the wagtailbakery module --- docs/contrib_components/static_site_generation.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/contrib_components/static_site_generation.rst b/docs/contrib_components/static_site_generation.rst index d6b598520..06e8ae5ff 100644 --- a/docs/contrib_components/static_site_generation.rst +++ b/docs/contrib_components/static_site_generation.rst @@ -3,6 +3,9 @@ Generating a static site This document describes how to render your Wagtail site into static HTML files on your local filesystem, Amazon S3 or Google App Engine, using `django medusa`_ and the ``wagtail.contrib.wagtailmedusa`` module. +.. note:: + + An alternative module based on the `django-bakery`_ package is available as a third-party contribution: https://github.com/mhnbcu/wagtailbakery Installing django-medusa ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -86,3 +89,4 @@ For example, the BlogIndex above would need to yield one URL for each page of re .. _django medusa: https://github.com/mtigas/django-medusa +.. _django-bakery: https://github.com/datadesk/django-bakery \ No newline at end of file From adaf36edd6897d8e77e2f6d7110ac818e6c7bebe Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Tue, 17 Feb 2015 16:42:14 +0000 Subject: [PATCH 36/42] release note for #998 (and add a missing apostrophe) --- CHANGELOG.txt | 3 ++- docs/releases/0.8.5.rst | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 59ec71272..f1c3a4384 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -36,9 +36,10 @@ Changelog * Fix: Punctuation characters are no longer stripped when performing search queries * Fix: When adding tags where there were none before, it is now possible to save a single tag with multiple words in it * Fix: richtext template tag no longer raises TypeError if None is passed into it (Alejandro Varas) -* Fix: Serving documents now uses a streaming HTTP response and will no longer break Djangos cache middleware +* Fix: Serving documents now uses a streaming HTTP response and will no longer break Django's cache middleware * Fix: User admin area no longer fails in the presence of negative user IDs (as used by django-guardian's default settings) * Fix: Password reset emails now use the ``BASE_URL`` setting for the reset URL +* Fix: ``BASE_URL`` is now included in the project template's default settings file 0.8.4 (04.12.2014) ~~~~~~~~~~~~~~~~~~ diff --git a/docs/releases/0.8.5.rst b/docs/releases/0.8.5.rst index 2ddfe3c69..bc7d1445f 100644 --- a/docs/releases/0.8.5.rst +++ b/docs/releases/0.8.5.rst @@ -21,6 +21,7 @@ Bug fixes * Punctuation characters are no longer stripped when performing search queries * When adding tags where there were none before, it is now possible to save a single tag with multiple words in it * ``richtext`` template tag no longer raises ``TypeError`` if ``None`` is passed into it - * Serving documents now uses a streaming HTTP response and will no longer break Djangos cache middleware + * Serving documents now uses a streaming HTTP response and will no longer break Django's cache middleware * User admin area no longer fails in the presence of negative user IDs (as used by django-guardian's default settings) * Password reset emails now use the ``BASE_URL`` setting for the reset URL + * ``BASE_URL`` is now included in the project template's default settings file From 6c9df29e5784732d7b64f90ed1da3ed0a49e9333 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Tue, 17 Feb 2015 16:45:26 +0000 Subject: [PATCH 37/42] no markdown in the changelog, thx --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f1c3a4384..f615cdd96 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -39,7 +39,7 @@ Changelog * Fix: Serving documents now uses a streaming HTTP response and will no longer break Django's cache middleware * Fix: User admin area no longer fails in the presence of negative user IDs (as used by django-guardian's default settings) * Fix: Password reset emails now use the ``BASE_URL`` setting for the reset URL -* Fix: ``BASE_URL`` is now included in the project template's default settings file +* Fix: BASE_URL is now included in the project template's default settings file 0.8.4 (04.12.2014) ~~~~~~~~~~~~~~~~~~ From 735f8797845ebdc01e46b8eca712e655b7459181 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Tue, 17 Feb 2015 16:56:34 +0000 Subject: [PATCH 38/42] version bump 0.8.x branch to 0.8.5 --- CHANGELOG.txt | 2 +- docs/releases/0.8.5.rst | 6 +++--- wagtail/project_template/requirements.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f615cdd96..a65ec52e4 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -25,7 +25,7 @@ Changelog * The project template Vagrantfile now listens on port 8000 * The external link chooser in rich text areas now accepts URLs of the form '/some/local/path', to allow linking to non-Wagtail-controlled URLs within the local site (Eric Drechsel) -0.8.5 (xx.xx.20xx) +0.8.5 (17.02.2015) ~~~~~~~~~~~~~~~~~~ * Fix: On adding a new page, the available page types are ordered by the displayed verbose name diff --git a/docs/releases/0.8.5.rst b/docs/releases/0.8.5.rst index bc7d1445f..07c97b9db 100644 --- a/docs/releases/0.8.5.rst +++ b/docs/releases/0.8.5.rst @@ -1,6 +1,6 @@ -============================================ -Wagtail 0.8.5 release notes - IN DEVELOPMENT -============================================ +=========================== +Wagtail 0.8.5 release notes +=========================== .. contents:: :local: diff --git a/wagtail/project_template/requirements.txt b/wagtail/project_template/requirements.txt index 6ad00ab36..8368db89b 100644 --- a/wagtail/project_template/requirements.txt +++ b/wagtail/project_template/requirements.txt @@ -1,6 +1,6 @@ # Minimal requirements Django>=1.7,<1.8 -wagtail==0.8.4 +wagtail==0.8.5 # Recommended components (require additional setup): # psycopg2==2.5.2 From 3b65bfd378bcc317e02521ed167422cb47eb4350 Mon Sep 17 00:00:00 2001 From: Martin Sanders Date: Tue, 17 Feb 2015 19:54:31 +0000 Subject: [PATCH 39/42] Using absolute imports in SCSS. This allows consumers of the wagtailadmin to override the scss files in the same manner that Django devs override templates. --- .../static/wagtailadmin/scss/core.scss | 34 +++++++++---------- .../wagtailadmin/scss/layouts/home.scss | 6 ++-- .../wagtailadmin/scss/layouts/login.scss | 6 ++-- .../scss/layouts/page-editor.scss | 6 ++-- .../wagtailadmin/scss/layouts/preview.scss | 4 +-- .../wagtailadmin/scss/panels/rich-text.scss | 4 +-- .../static/wagtailadmin/scss/userbar.scss | 8 ++--- 7 files changed, 34 insertions(+), 34 deletions(-) diff --git a/wagtail/wagtailadmin/static/wagtailadmin/scss/core.scss b/wagtail/wagtailadmin/static/wagtailadmin/scss/core.scss index 15a7adfc2..df4a7320f 100644 --- a/wagtail/wagtailadmin/static/wagtailadmin/scss/core.scss +++ b/wagtail/wagtailadmin/static/wagtailadmin/scss/core.scss @@ -1,21 +1,21 @@ -@import "variables.scss"; -@import "mixins.scss"; -@import "grid.scss"; +@import "wagtailadmin/scss/variables.scss"; +@import "wagtailadmin/scss/mixins.scss"; +@import "wagtailadmin/scss/grid.scss"; -@import "components/explorer.scss"; -@import "components/icons.scss"; -@import "components/typography.scss"; -@import "components/tabs.scss"; -@import "components/dropdowns.scss"; -@import "components/modals.scss"; -@import "components/forms.scss"; -@import "components/listing.scss"; -@import "components/messages.scss"; -@import "components/formatters.scss"; -@import "components/header.scss"; -@import "components/progressbar.scss"; -@import "components/datetimepicker.scss"; -@import "components/main-nav.scss"; +@import "wagtailadmin/scss/components/explorer.scss"; +@import "wagtailadmin/scss/components/icons.scss"; +@import "wagtailadmin/scss/components/typography.scss"; +@import "wagtailadmin/scss/components/tabs.scss"; +@import "wagtailadmin/scss/components/dropdowns.scss"; +@import "wagtailadmin/scss/components/modals.scss"; +@import "wagtailadmin/scss/components/forms.scss"; +@import "wagtailadmin/scss/components/listing.scss"; +@import "wagtailadmin/scss/components/messages.scss"; +@import "wagtailadmin/scss/components/formatters.scss"; +@import "wagtailadmin/scss/components/header.scss"; +@import "wagtailadmin/scss/components/progressbar.scss"; +@import "wagtailadmin/scss/components/datetimepicker.scss"; +@import "wagtailadmin/scss/components/main-nav.scss"; @import "fonts.scss"; diff --git a/wagtail/wagtailadmin/static/wagtailadmin/scss/layouts/home.scss b/wagtail/wagtailadmin/static/wagtailadmin/scss/layouts/home.scss index f1e2ee779..3f8e08337 100644 --- a/wagtail/wagtailadmin/static/wagtailadmin/scss/layouts/home.scss +++ b/wagtail/wagtailadmin/static/wagtailadmin/scss/layouts/home.scss @@ -1,6 +1,6 @@ -@import "../variables.scss"; -@import "../mixins.scss"; -@import "../grid.scss"; +@import "wagtailadmin/scss/variables.scss"; +@import "wagtailadmin/scss/mixins.scss"; +@import "wagtailadmin/scss/grid.scss"; h1{ font-weight:300; diff --git a/wagtail/wagtailadmin/static/wagtailadmin/scss/layouts/login.scss b/wagtail/wagtailadmin/static/wagtailadmin/scss/layouts/login.scss index 24762b4dc..d2c8db46c 100644 --- a/wagtail/wagtailadmin/static/wagtailadmin/scss/layouts/login.scss +++ b/wagtail/wagtailadmin/static/wagtailadmin/scss/layouts/login.scss @@ -1,6 +1,6 @@ -@import "../variables.scss"; -@import "../mixins.scss"; -@import "../grid.scss"; +@import "wagtailadmin/scss/variables.scss"; +@import "wagtailadmin/scss/mixins.scss"; +@import "wagtailadmin/scss/grid.scss"; // overrides default nice padding defined in variables.scss $desktop-nice-padding: 100px; diff --git a/wagtail/wagtailadmin/static/wagtailadmin/scss/layouts/page-editor.scss b/wagtail/wagtailadmin/static/wagtailadmin/scss/layouts/page-editor.scss index 5beae3e39..9d78bfffa 100644 --- a/wagtail/wagtailadmin/static/wagtailadmin/scss/layouts/page-editor.scss +++ b/wagtail/wagtailadmin/static/wagtailadmin/scss/layouts/page-editor.scss @@ -1,6 +1,6 @@ -@import "../variables.scss"; -@import "../mixins.scss"; -@import "../grid.scss"; +@import "wagtailadmin/scss/variables.scss"; +@import "wagtailadmin/scss/mixins.scss"; +@import "wagtailadmin/scss/grid.scss"; .page-editor .content-wrapper{ margin-bottom:10em; diff --git a/wagtail/wagtailadmin/static/wagtailadmin/scss/layouts/preview.scss b/wagtail/wagtailadmin/static/wagtailadmin/scss/layouts/preview.scss index c3318a7a7..545c0e7ba 100644 --- a/wagtail/wagtailadmin/static/wagtailadmin/scss/layouts/preview.scss +++ b/wagtail/wagtailadmin/static/wagtailadmin/scss/layouts/preview.scss @@ -1,5 +1,5 @@ -@import "../variables.scss"; -@import "../mixins.scss"; +@import "wagtailadmin/scss/variables.scss"; +@import "wagtailadmin/scss/mixins.scss"; /* This font is just a single spinner glyph */ @font-face { diff --git a/wagtail/wagtailadmin/static/wagtailadmin/scss/panels/rich-text.scss b/wagtail/wagtailadmin/static/wagtailadmin/scss/panels/rich-text.scss index d47ca5ecc..fab5f2ad5 100644 --- a/wagtail/wagtailadmin/static/wagtailadmin/scss/panels/rich-text.scss +++ b/wagtail/wagtailadmin/static/wagtailadmin/scss/panels/rich-text.scss @@ -1,5 +1,5 @@ -@import "../variables.scss"; -@import "../mixins.scss"; +@import "wagtailadmin/scss/variables.scss"; +@import "wagtailadmin/scss/mixins.scss"; .hallotoolbar{ position:absolute; diff --git a/wagtail/wagtailadmin/static/wagtailadmin/scss/userbar.scss b/wagtail/wagtailadmin/static/wagtailadmin/scss/userbar.scss index af9e20195..4fa6cb891 100644 --- a/wagtail/wagtailadmin/static/wagtailadmin/scss/userbar.scss +++ b/wagtail/wagtailadmin/static/wagtailadmin/scss/userbar.scss @@ -1,9 +1,9 @@ -@import "variables.scss"; -@import "mixins.scss"; +@import "wagtailadmin/scss/variables.scss"; +@import "wagtailadmin/scss/mixins.scss"; -@import "components/icons.scss"; +@import "wagtailadmin/scss/components/icons.scss"; -@import "fonts.scss"; +@import "wagtailadmin/scss/fonts.scss"; html, body{ background-color:transparent; From de65f8da8bf064f944b79afb43b60d9816e63d7a Mon Sep 17 00:00:00 2001 From: Daniel Chimeno Date: Wed, 18 Feb 2015 00:29:24 +0100 Subject: [PATCH 40/42] Update third_party_tutorials.rst --- docs/howto/third_party_tutorials.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/howto/third_party_tutorials.rst b/docs/howto/third_party_tutorials.rst index 6a9ca4f70..ce146553e 100644 --- a/docs/howto/third_party_tutorials.rst +++ b/docs/howto/third_party_tutorials.rst @@ -10,7 +10,7 @@ Third-party tutorials * `Upgrading Wagtail to use Django 1.7 locally using vagrant `_ (10 December 2014) * `Wagtail redirect page. Can link to page, URL and document `_ (24 September 2014) * `Outputing JSON for a model with properties and db fields in Wagtail/Django `_ (24 September 2014) -* `Bi-lingual website using Wagtail CMS `_ (17 September 2015) +* `Bi-lingual website using Wagtail CMS `_ (17 September 2014) * `Wagtail CMS – Lesser known features `_ (12 September 2014) * `Wagtail notes: stateful on/off hallo.js plugins `_ (9 August 2014) * `Add some blockquote buttons to Wagtail CMS’ WYSIWYG Editor `_ (24 July 2014) From 763b5df8c4fc98bf51e46ad420c461955c5a52f1 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Wed, 18 Feb 2015 10:19:59 +0000 Subject: [PATCH 41/42] Release note for #1001 --- CHANGELOG.txt | 1 + CONTRIBUTORS.rst | 1 + docs/releases/0.9.rst | 1 + 3 files changed, 3 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a65ec52e4..93bb3642c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -24,6 +24,7 @@ Changelog * No longer need to specify the base model on InlinePanel definitions * The project template Vagrantfile now listens on port 8000 * The external link chooser in rich text areas now accepts URLs of the form '/some/local/path', to allow linking to non-Wagtail-controlled URLs within the local site (Eric Drechsel) + * SCSS files in wagtailadmin now use absolute imports, to permit overriding by user stylesheets (Martin Sanders) 0.8.5 (17.02.2015) ~~~~~~~~~~~~~~~~~~ diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 44992e71a..250d6e944 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -43,6 +43,7 @@ Contributors * Frank Wiles * Sebastian Spiegel * Alejandro Varas +* Martin Sanders Translators =========== diff --git a/docs/releases/0.9.rst b/docs/releases/0.9.rst index 2482d718d..a1609b935 100644 --- a/docs/releases/0.9.rst +++ b/docs/releases/0.9.rst @@ -33,6 +33,7 @@ Minor features * No longer need to specify the base model on InlinePanel definitions * The project template Vagrantfile now listens on port 8000 * The external link chooser in rich text areas now accepts URLs of the form '/some/local/path', to allow linking to non-Wagtail-controlled URLs within the local site + * SCSS files in wagtailadmin now use absolute imports, to permit overriding by user stylesheets Bug fixes From 8f5412e76c1bdc88fc83ed3a1dd5c2a88057d19e Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Wed, 18 Feb 2015 10:50:10 +0000 Subject: [PATCH 42/42] release note for #999 --- CHANGELOG.txt | 1 + docs/releases/0.9.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 93bb3642c..65b83908d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -25,6 +25,7 @@ Changelog * The project template Vagrantfile now listens on port 8000 * The external link chooser in rich text areas now accepts URLs of the form '/some/local/path', to allow linking to non-Wagtail-controlled URLs within the local site (Eric Drechsel) * SCSS files in wagtailadmin now use absolute imports, to permit overriding by user stylesheets (Martin Sanders) + * Bare text entered in rich text areas is now automatically wrapped in a paragraph element 0.8.5 (17.02.2015) ~~~~~~~~~~~~~~~~~~ diff --git a/docs/releases/0.9.rst b/docs/releases/0.9.rst index a1609b935..b6434e117 100644 --- a/docs/releases/0.9.rst +++ b/docs/releases/0.9.rst @@ -34,6 +34,7 @@ Minor features * The project template Vagrantfile now listens on port 8000 * The external link chooser in rich text areas now accepts URLs of the form '/some/local/path', to allow linking to non-Wagtail-controlled URLs within the local site * SCSS files in wagtailadmin now use absolute imports, to permit overriding by user stylesheets + * Bare text entered in rich text areas is now automatically wrapped in a paragraph element Bug fixes