LB
4ea8365203
Add ability to set custom value_class on StructBlock
2017-12-13 00:00:35 +00:00
Mads Jensen
8b420b9abc
Removed __future__ imports
...
Also delete add_imports directive from isort configuration
2017-11-27 02:18:30 +00:00
Karl Hobley
9a13b09d41
Renamed wagtail.contrib.wagtailstyleguide to wagtail.contrib.styleguide
2017-11-26 22:43:47 +00:00
Karl Hobley
1ecf48fb3f
Rename wagtail.wagtailsnippets to wagtail.snippets
...
Conflicts:
docs/advanced_topics/settings.rst
docs/getting_started/integrating_into_django.rst
docs/topics/pages.rst
docs/topics/snippets.rst
gulpfile.js/config.js
wagtail/contrib/wagtailstyleguide/views.py
wagtail/project_template/project_name/settings/base.py
wagtail/snippets/tests.py
wagtail/snippets/views/chooser.py
wagtail/snippets/views/snippets.py
wagtail/snippets/wagtail_hooks.py
wagtail/tests/settings.py
wagtail/tests/snippets/models.py
wagtail/tests/testapp/models.py
2017-11-26 22:43:47 +00:00
Karl Hobley
bf0f3e02ba
Rename wagtail.wagtailimages to wagtail.images
...
Conflicts:
docs/advanced_topics/api/v2/configuration.rst
docs/advanced_topics/jinja2.rst
docs/advanced_topics/settings.rst
docs/getting_started/integrating_into_django.rst
docs/getting_started/tutorial.rst
docs/topics/pages.rst
docs/topics/streamfield.rst
gulpfile.js/config.js
tox.ini
wagtail/admin/tests/test_compare.py
wagtail/admin/tests/test_edit_handlers.py
wagtail/api/v2/signal_handlers.py
wagtail/contrib/wagtailstyleguide/views.py
wagtail/core/tests/test_streamfield.py
wagtail/documents/tests/test_models.py
wagtail/images/models.py
wagtail/images/permissions.py
wagtail/images/tests/test_admin_views.py
wagtail/images/tests/test_image_operations.py
wagtail/images/tests/test_models.py
wagtail/images/tests/test_signal_handlers.py
wagtail/images/views/chooser.py
wagtail/images/views/images.py
wagtail/images/views/multiple.py
wagtail/images/wagtail_hooks.py
wagtail/images/widgets.py
wagtail/project_template/project_name/settings/base.py
wagtail/tests/demosite/models.py
wagtail/tests/non_root_urls.py
wagtail/tests/settings.py
wagtail/tests/testapp/migrations/0001_initial.py
wagtail/tests/testapp/migrations/0008_inlinestreampage_inlinestreampagesection.py
wagtail/tests/testapp/migrations/0009_defaultstreampage.py
wagtail/tests/urls.py
2017-11-26 22:43:47 +00:00
Karl Hobley
54d8357f96
Rename wagtail.wagtailembeds to wagtail.embeds
...
Conflicts:
gulpfile.js/config.js
wagtail/embeds/blocks.py
wagtail/embeds/tests.py
wagtail/embeds/views/chooser.py
wagtail/embeds/wagtail_hooks.py
2017-11-26 22:43:47 +00:00
Karl Hobley
78b1372cd4
Rename wagtail.wagtaildocs to wagtail.documents
...
Conflicts:
docs/advanced_topics/i18n/index.rst
docs/advanced_topics/settings.rst
docs/getting_started/integrating_into_django.rst
gulpfile.js/config.js
wagtail/admin/tests/test_collections_views.py
wagtail/api/v2/signal_handlers.py
wagtail/contrib/wagtailstyleguide/views.py
wagtail/core/tests/test_collection_permission_policies.py
wagtail/documents/permissions.py
wagtail/documents/tests/test_admin_views.py
wagtail/documents/tests/test_collection_privacy.py
wagtail/documents/tests/test_models.py
wagtail/documents/views/chooser.py
wagtail/documents/views/documents.py
wagtail/documents/views/serve.py
wagtail/documents/wagtail_hooks.py
wagtail/documents/widgets.py
wagtail/project_template/project_name/urls.py
wagtail/tests/demosite/models.py
wagtail/tests/non_root_urls.py
wagtail/tests/settings.py
wagtail/tests/testapp/models.py
wagtail/tests/urls.py
2017-11-26 22:43:47 +00:00
Karl Hobley
062d05189b
Rename wagtail.wagtailadmin to wagtail.admin
...
Conflicts:
docs/advanced_topics/customisation/admin_templates.rst
docs/advanced_topics/customisation/page_editing_interface.rst
docs/advanced_topics/i18n/duplicate_tree.rst
docs/advanced_topics/jinja2.rst
docs/advanced_topics/settings.rst
docs/getting_started/integrating_into_django.rst
docs/getting_started/tutorial.rst
docs/reference/hooks.rst
docs/reference/pages/panels.rst
docs/topics/pages.rst
docs/topics/streamfield.rst
wagtail/admin/blocks.py
wagtail/admin/checks.py
wagtail/admin/edit_handlers.py
wagtail/admin/forms.py
wagtail/admin/rich_text.py
wagtail/admin/search.py
wagtail/admin/site_summary.py
wagtail/admin/templatetags/wagtailadmin_tags.py
wagtail/admin/tests/test_admin_search.py
wagtail/admin/tests/test_buttons_hooks.py
wagtail/admin/tests/test_compare.py
wagtail/admin/tests/test_edit_handlers.py
wagtail/admin/tests/test_page_chooser.py
wagtail/admin/tests/test_pages_views.py
wagtail/admin/tests/test_rich_text.py
wagtail/admin/tests/test_widgets.py
wagtail/admin/tests/tests.py
wagtail/admin/urls/__init__.py
wagtail/admin/views/account.py
wagtail/admin/views/chooser.py
wagtail/admin/views/collection_privacy.py
wagtail/admin/views/collections.py
wagtail/admin/views/home.py
wagtail/admin/views/page_privacy.py
wagtail/admin/viewsets/model.py
wagtail/admin/wagtail_hooks.py
wagtail/admin/widgets.py
wagtail/contrib/settings/registry.py
wagtail/contrib/wagtailsearchpromotions/wagtail_hooks.py
wagtail/contrib/wagtailstyleguide/wagtail_hooks.py
wagtail/project_template/project_name/settings/base.py
wagtail/project_template/project_name/urls.py
wagtail/tests/non_root_urls.py
wagtail/tests/settings.py
wagtail/tests/snippets/models.py
wagtail/tests/testapp/models.py
wagtail/tests/testapp/wagtail_hooks.py
wagtail/tests/urls.py
wagtail/wagtaildocs/models.py
wagtail/wagtaildocs/views/chooser.py
wagtail/wagtaildocs/wagtail_hooks.py
wagtail/wagtailembeds/wagtail_hooks.py
wagtail/wagtailforms/models.py
wagtail/wagtailforms/tests/test_views.py
wagtail/wagtailforms/views.py
wagtail/wagtailforms/wagtail_hooks.py
wagtail/wagtailimages/models.py
wagtail/wagtailimages/views/chooser.py
wagtail/wagtailimages/wagtail_hooks.py
wagtail/wagtailredirects/forms.py
wagtail/wagtailredirects/wagtail_hooks.py
wagtail/wagtailsites/forms.py
wagtail/wagtailsites/views.py
wagtail/wagtailsites/wagtail_hooks.py
wagtail/wagtailsnippets/tests.py
wagtail/wagtailsnippets/wagtail_hooks.py
wagtail/wagtailusers/forms.py
wagtail/wagtailusers/views/groups.py
wagtail/wagtailusers/wagtail_hooks.py
2017-11-26 22:43:47 +00:00
Karl Hobley
4300e19da2
Rename wagtail.wagtailcore to wagtail.core
2017-11-26 22:43:47 +00:00
Matt Westcott
a4b99ce4f0
Change StreamField examples to use explicit required=False instead of required=True
2017-09-18 21:34:35 +01:00
Matt Westcott
addb31c1d6
Explicitly state that required defaults to true on StreamField blocks
2017-09-18 21:34:35 +01:00
Matt Westcott
cc77f8e7d4
Clarify interaction between StreamField's blank property and StreamBlock's required property
2017-09-18 21:34:35 +01:00
Tomasz Knapik
80c846a0cf
Add help_text to DecimalBlock and RegexBlock
2017-08-11 11:48:51 +01:00
Matt Westcott
7c99cad62b
Documentation for rich text features
2017-08-10 14:19:34 +01:00
Matt Westcott
2e5dd9aa55
Refactor #3605 to work alongside 'required' param
2017-08-01 15:02:52 +01:00
ebar0n
993cff3e22
Add validations for min_max_fields on StreamBlock
2017-08-01 10:41:49 +01:00
Edwar Baron
58ad6545be
Add ability to specify min/max block counts on StreamBlock
2017-08-01 10:41:48 +01:00
Matt Westcott
4a5f3072bd
Release note and docs for #3315
2017-08-01 00:17:02 +01:00
Jeffrey Chau
988a2487ef
Update documentation to reflect specific behavior of form_classname meta attribute
2017-07-28 15:41:38 +01:00
Andreas Nüßlein
bfd4a2ef4b
Adding the Meta attribute group
to Blocks.
...
The idea is that Streamfield-Blocks can be grouped in the CMS
by setting Meta's `group` attribute.
This gives a better overview, particularly with many blocks.
If the attribute remains unset, nothing changes.
2017-04-10 20:27:32 +01:00
Matt Westcott
6d553ab396
Document that 'format' on Date(Time)Block must be one of the recognised DATE(TIME)_INPUT_FORMATS
2017-03-31 16:46:00 +01:00
Bojan Mihelac
0f53afc5a6
Adds support for custom date and datetime formats ( #2595 )
...
It is possible to set default format for date/datetime inputs. This works together
with standard django localization.
# django settings
USE_I18N = True
LANGUAGE_CODE = 'sl'
# wagtail settings
WAGTAIL_DATE_FORMAT = '%d.%m.%Y.'
WAGTAIL_DATETIME_FORMAT = '%d.%m.%Y. %H:%M'
DateBlock, DateTimeBlock accepts additional keyword argument `format`.
2017-03-31 16:30:27 +01:00
Nick Smith
48949e69a7
Add to StreamField migrations documentation
...
- Add example code for migrating draft pages and page revisions
2017-03-30 21:37:12 +01:00
Mikalai Radchuk
eb47526888
Enhancement for PageChooserBlock
...
Allow the target_model argument to be a list or tuple.
2017-02-17 11:30:32 +00:00
Matt Westcott
19310a84ed
Documentation and release notes for #3275
2017-01-16 18:51:42 +00:00
Mikela Clemmons
26b7071307
RegexBlock error_message typo in docs
...
In the documention an example had a singular
2017-01-13 10:06:19 +00:00
J. Heasly
9424a8eab9
Give indication that there may be other template bits necessary for tag to work.
...
I came to this page from "Getting Started" template examples where all pages examples are rendered within {% block content %} tags which are not in these template examples."
;
2017-01-05 10:14:07 +00:00
Scot Hacker
2882775842
Add BlockQuoteBlock to core block types
2016-11-29 10:13:10 +00:00
Mikalai Radchuk
55bdae573b
Add support of callable choices for ChoiceBlock
...
Fixes #2809
2016-11-28 17:44:35 +00:00
Benoit Vogel
2fba07ad8e
Implemented StaticBlock
...
Uses admin_text which is a Meta attribute.
* StaticBlock code in wagtailcore/blocks + tests
* StaticBlock in Streamfield docs
2016-11-15 10:29:06 +00:00
Tim Heap
9d54031a50
Add PageChooserBlock target_model option
...
It allows selecting a restricted subset of pages, like with the
PageChooserPanel
2016-10-26 13:01:46 +01:00
David Burke
db54a9f0c4
Update IntegerBlock docs to show correct kwargs ( #2930 )
...
It should be max and min value - not length. See [here](07c3ba84fb/wagtail/wagtailcore/blocks/field_block.py (L306)
).
So this would work
`blocks.IntegerBlock(max_value=10, min_value=0)`
but this wouldn't do anything
`blocks.IntegerBlock(max_length=10, min_length=0)`
2016-08-20 02:38:00 +01:00
Matt Westcott
bc7739e104
Add usage examples for EmailBlock, IntegerBlock, DecimalBlock
...
Thanks to @OktayAltay for the original pull request.
2016-08-08 20:15:45 +01:00
Matt Westcott
be1e1927c5
Promote include_block and unicode page slugs to major features
2016-07-07 11:20:43 +01:00
Matt Westcott
dbc4c9b28e
Adds the include_block template tag ( #2786 )
...
Update render and render_basic methods on Block to take a context kwarg
Update TableBlock to support passing extra context to render
Implement render_as_block on BoundBlock, StreamValue and StructValue.
Collectively, these are the objects encountered during template rendering which typically render
a block template when output inside {{ ... }} tags. Implementing render_as_block allows us to do
the same thing, but passing a template context as well.
Implement include_block tag
Support extra context vars on include_block via 'with foo=bar'
Support 'only' flag on include_block tag, to omit the parent context
Update StreamField documentation to cover the include_block tag
Rewrite 'BoundBlocks and values' docs based on the include_block tag
Add tests for blocks with legacy render / render_basic methods
Any bits of StreamField infrastructure that attempt to call render or render_basic
on a block with a 'context' kwarg, should (for now) also work on blocks that don't
accept the context kwarg, but output a RemovedInWagtail18Warning.
Explicitly test whether render / render_basic will accept a 'context' kwarg
This avoids unexpected behaviour when the method legitimately accepts a context
kwarg, but happens to throw an unrelated TypeError - in this situation, the final
output (or error diagnostics) will behave as if the context was never passed,
making debugging difficult. See https://github.com/torchbox/wagtail/pull/2786#discussion_r69563984
2016-07-06 17:44:02 +03:00
Matt Westcott
9961455c6a
Add formal support for customising the form rendering of StructBlocks
...
The `form_template` attribute was mentioned in passing in the docs, but was missing various things
to make it fully useful:
- context passed to form_template now includes 'prefix' and 'block_definition'
- context for the form is now populated in a separate overrideable `get_form_context` method
- full documentation and tests for form_template and get_form_context added
2016-07-05 11:48:09 +01:00
Matt Westcott
5758b54f2e
Support error_messages
dict as argument to RegexBlock
...
The individual `error_message` kwarg on RegexField is deprecated in Django 1.8
(and removed in Django 1.10), so it's appropriate for RegexBlock to follow the
same convention.
2016-06-28 16:11:52 +01:00
OktayAltay
9358e3b611
Add new FloatBlock, DecimalBlock and a RegexBlock ( #2737 )
2016-06-23 10:14:28 +01:00
Oktay Altay
31ce2e802c
Add new EmailBlock and IntegerBlock
2016-06-17 23:39:49 +01:00
Robert Rollins
11793f88c5
Changed indentation on all code samples to 4 spaces.
...
Most of the samples were already 4-space indented, but a few were using 2-space,
which is both inconsistent and, when it happened with Python code samples,
incompatible with PEP8.
2016-04-28 10:57:22 +01:00
Robert Rollins
6446c42132
Various typo fixes and grammar/clarity improvements.
2016-03-10 15:11:41 +00:00
Matt Westcott
04fdd5f352
Remove Django 1.7 support from documentation, requirements and CI definitions
2016-01-05 17:38:29 +00:00
Matt Westcott
9e124cb9b6
Remove use of value.bound_blocks from basic StructBlock template example.
...
This hasn't been necessary since #1360 was merged, and the new 'BoundBlocks and values' section covers it much better.
2015-12-11 12:48:37 +00:00
Matt Westcott
0e34282646
Add section about BoundBlocks and values
2015-12-11 12:48:37 +00:00
Rich Brennan
2ad3985d67
Move content_panels inside BlogPage definition.
2015-11-19 17:16:02 +00:00
Matt Westcott
f668922893
Add a can_choose_root flag to PageChooserBlock
2015-11-02 15:12:42 +00:00
Matt Westcott
2eb4b4c2c1
Release notes for #1810 , #1835 , #1812
2015-10-20 11:16:09 +01:00
Karl Hobley
26889ba128
Merge pull request #1812 from gasman/feature/block-template-context
...
Allow block subclasses to pass extra context variables to templates
2015-10-19 09:29:59 +01:00
Karl Hobley
6eae465e64
Renamed "self" template variable to "page" in docs
2015-10-13 09:52:16 +01:00
Matt Westcott
46845112e2
Allow block subclasses to pass extra context variables to templates
...
Block now defines a get_context method, which subclasses can override
in the same way as we can for pages.
2015-10-12 13:25:56 +01:00