Commit graph

8985 commits

Author SHA1 Message Date
Matt Westcott
23a89774ad Deprecation note for #5128 2019-03-14 12:11:16 +01:00
Matt Westcott
9ed662a343 Add formal deprecation for is_ajax=1 on pagination_nav.html
Some third-party packages still use it, e.g. 7a74a1d317/wagtailmodelchooser/templates/wagtailmodelchooser/chooser/model_results.html
2019-03-14 11:50:51 +01:00
Matt Westcott
b3ed5cc1cc Deprecate wagtail.utils.pagination 2019-03-14 11:50:25 +01:00
Matt Westcott
1fe844a0e2 Simplify wagtail.utils.pagination using Paginator.get_page
https://docs.djangoproject.com/en/2.1/topics/pagination/#django.core.paginator.Paginator.get_page
2019-03-14 11:50:25 +01:00
Matt Westcott
c827cf0793 Remove URL type switching from pagination_nav; use querystring tag consistently instead
This doesn't preserve the old behaviour exactly, but testing across all paginated interfaces shows that it's better than it was (e.g. we're not forgetting to pass the current search term as query_string).
2019-03-14 11:50:25 +01:00
Matt Westcott
57d15ac635 Drop replace_page_param template tag in favour of the more flexible querystring tag 2019-03-14 11:50:24 +01:00
Matt Westcott
188c731e2c Split ajax pagination nav into its own include 2019-03-14 11:49:17 +01:00
Andy Babic
b2eee20e1b Move reversing_urls.rst into a subdirectory with it's own index, and include that index in the modeladmin docs' main toctree 2019-03-14 09:48:02 +01:00
Esperk
9f2e4033ea Abort unfinished ajax before firing new ajax call. Fix #4594 (#5137)
To prevent showing old results always cancel unfinished query requests before firing a new one
2019-03-13 15:44:12 +01:00
Arthur Holzner
6f6f9b8e46 Added fallback to pageurl (#4603) 2019-03-13 12:17:13 +01:00
Thijs Kramer
fdbd7ca2d3 only append model type to button when there is one target model (#5094) 2019-03-13 11:35:40 +01:00
Matt Westcott
388c8231c1 Add a table_header_label template tag for page listing headers 2019-03-13 11:27:58 +01:00
Matt Westcott
da55e4bca7 Reverse the logic of the not_sortable_by_type flag 2019-03-13 11:27:58 +01:00
Andy Babic
77a8e3b7c0 Do not allow copies of pages that exceed their models' max_count
Update PagePermissionTester.can_move_to() to call on the page class's 'can_create_at()' method, and respond accordingly

Add a SingletonPageViaMaxCount to the test.json fixture for use in page permission tests

Add some tests for PagePermissionTester.can_copy_to()

Create a SingletonPageViaMaxCount in setUp() instead of adding to the fixture
2019-03-13 07:57:25 +10:00
LB Johnston
fc21729a24 add docs with instructions on how to generate urls for modeladmin 2019-03-13 07:41:34 +10:00
Mani
87bbc31d88 Add a setting to apply limit on number of tags that can be added to any tagged model. 2019-03-10 20:48:33 +10:00
Matt Westcott
3fe442ff4d Add Learn Wagtail to third-party tutorials 2019-03-10 15:57:52 +10:00
Tiago Requeijo
4f5b117250 Fix for emails missing the HTML messages. 2019-03-10 15:38:19 +10:00
patta42
be03eeee2e Removed redundant try-except (#5123) 2019-03-07 20:55:27 +00:00
kevinhowbrook
1248279114 Specify a larger length as the default of 200 isn't always enough (#5114) 2019-03-07 11:18:40 +00:00
Andy Babic
e0fc0da491 Remove trailing spaces 2019-03-06 15:14:37 +00:00
Andy Babic
1872865af6 Set self.admin_site to default django admin site in ModelAdmin.__init__() 2019-03-06 15:14:37 +00:00
Thomas Kremmel
4e8f197a9d allow panels & edit_handler to be defined on ModelAdmin (#4900) 2019-03-06 12:26:20 +00:00
Matt Westcott
53cea8bc04 Release note for #4653 2019-03-06 11:24:44 +00:00
Loic Teixeira
9da3a3d975 Update documentation 2019-03-06 11:00:30 +00:00
Loic Teixeira
863d066786 Ensure deconstruct is consistent
Regardless of whether it was created with `page_type` or `target_model`.

Similarly to the `__init__` method, we cannot completely deprecate
`target_model` so the `deconstruct` method has to handle both
parameters.
2019-03-06 11:00:30 +00:00
Loic Teixeira
09bc28fc86 Remove deprecation warning 2019-03-06 11:00:30 +00:00
Loic Teixeira
7600f419e8 Deprecate PageChooserBlock's target_model parameter in favour of page_type 2019-03-06 11:00:30 +00:00
Evan Winter
5a34090b4b Fix typo in api/v2/usage.rst
first_publised_at --> first_published_at
2019-03-06 01:19:07 +00:00
Asanka Lihiniyagoda
74218a7e43 Set data-focal-point-* values to be '' instead of 'None' when they are empty. 2019-03-03 10:06:16 +10:00
Matt Westcott
8b7efc0b16 Output current language code in HTML header (#5091)
Fixes #5051
2019-03-01 11:37:44 +00:00
Matt Westcott
61e1e4c2f9 Add 'wagtail_update_index' as an alias for the 'update_index' command (#5009)
Fixes #2447
2019-03-01 11:01:41 +00:00
LB Johnston
fa2a0c2d02 add ability for page.copy to copy ParentalManyToMany field relations 2019-03-01 07:11:28 +10:00
Sergey Fedoseev
233bb17789 Add missing collection column in wagtaildocs/documents/list.html (#5110) 2019-02-27 19:28:40 +00:00
Sergey Fedoseev
c2a83b92da Fix typo in docs/topics/images.rst 2019-02-27 19:25:06 +00:00
Gassan Gousseinov
d37ce9f699 routablepageurl returns urls only for default site on multisite installation (#5102) 2019-02-27 19:21:26 +00:00
Matt Westcott
34d7efe4e3 Add note to clarify that construct_homepage_panels should modify the ist in place 2019-02-27 14:56:40 +00:00
Neil Lyons
f10c5cab58 Update docs for construct_homepage_panels hook (#5109)
`construct_homepage_panels` hook doesn't need a return statement.

[Looking at the code](https://github.com/wagtail/wagtail/blob/master/wagtail/admin/views/home.py#L101-L102), the user doesn't need to return a list, they need to mutate the list passed in.
2019-02-27 14:50:01 +00:00
Samir Shah
9ae6e9025a Update Django version requirement in setup.py 2019-02-27 14:47:46 +00:00
Evan Winter
a4c3ccc464 Fix typo in docs (#5103) 2019-02-26 21:46:23 +00:00
damianos
20f47ff50e Fixed ValueError not raised (#5095)
Raised `ValueError` in `wagtail/images/utils.py` that was called but not raised

I work for Semmle and I noticed these issues using our LGTM code analyzer
https://lgtm.com/projects/g/wagtail/wagtail/alerts/?mode=tree&severity=error&ruleFocus=1505923886371
2019-02-26 19:48:16 +00:00
Andy Babic
234ee703ed Test against django's stable/2.2 branch 2019-02-26 19:31:53 +00:00
Karl Hobley
04861bc37d Release note / contributor for #5097 2019-02-23 14:15:07 +00:00
tomedelliott
f5654981c8 Add limit image upload size by number of pixels (#5097)
* Add test for Image pixel size

* add pixel size check and update test to match

using djangos get_image_dimensions this maybe a internal function
but the commit adding it is over 9 years old

* Update docs and CHANGELOG

* fix typos
2019-02-23 14:13:00 +00:00
LB (Ben Johnston)
2044b7e930 Add panel configuration checks (#5093)
* checks for Page InlinePanel related model panels

* add panels check to modelAdmin models

* add and revise tests for panel model checks

* revise related model usage

* remove unused keys from format string

* fix up unique error collection

* rework check_panels_in_model - variable names and string formatting

* rework tests for check_panels_in_model to use new string formatting
plus linting of some unused imports

* add checks to snippet models

* use consistent naming for returning errors from checks in modeladmin

* add tests for snippets check_panels_in_model checks

* ignore vscode config files

* remove additional line added
2019-02-21 13:36:31 +01:00
DanAtShenTech
e6e9fd09e2 Highlight "create" and "edit" forms (#5081) 2019-02-19 10:53:29 +00:00
Matt Collins
37a472834a Update legacy wagtail.wagtailadmin paths (#5090)
Update legacy wagtail.wagtailadmin paths to wagtail.admin
2019-02-19 10:49:15 +00:00
Matt Westcott
087434f348 Update links to Draftail documentation 2019-02-14 23:24:30 +01:00
DanAtShenTech
f21e75e95d Fix typo (missing plural) 2019-02-14 23:18:48 +01:00
DanAtShenTech
966ad8658d Properly designate last_name field 2019-02-14 12:05:26 +00:00