Wykres commitów

10772 Commity (2da410b2e0221f084aa7c87f49cc9793be40f4ce)

Autor SHA1 Wiadomość Data
Will Giddens 2da410b2e0 Add combined index for Postgres search backend. (#6548)
Fixes #6546
2021-01-18 12:19:18 +00:00
David Beitey 3a5b7255ad Change UniqueConstraint for wider database support (#6607)
This fixes #6393 by modifying the constraint to use an IN condition
which supports both Postgres and SQL Server. Previously, the `|` (OR)
condition was only supported by Postgres because SQL Server only
supports AND conditions.

The implementation follows suggestions from @gasman in
https://github.com/wagtail/wagtail/issues/6393#issuecomment-732161057:

* Migration 0050 is modified to not break on SQL Server
* Added migration 0060 to add or replace the constraint

Additionally, this allows for and documents a `DATABASE_DRIVER` env
variable to be set for testing, to allow a different SQL Server driver
(e.g. FreeTDS on Mac/Linux); and adds the specific `host_is_server`
option for FreeTDS (won't affect SQL Server Native Client on CI).
2021-01-18 11:52:52 +00:00
Matt Westcott 9f4fe2104e
Upgrade circleci nightly build to use node 10 2021-01-18 00:21:05 +00:00
Joshua Marantz 8e79c61564
Implement CSS variables for admin color theming (#6409)
Co-authored-by: JNaftali <jmarantz@thelabnyc.com>
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2021-01-17 02:17:41 +00:00
Vlad Herasymenko 454002fbd7 Include default emed finders in facebook embeds configuration example (#6625)
Facebook and Instagram embeds configuration section should include the default finders for all other providers. It's unclear for someone who just wants to fix his facebook embeds
2021-01-15 21:15:46 +00:00
Matthias Rohmer 9a1fc6d243 Add missing import to example code snippet (#6638)
Adding this makes the code snippet ready to use via copy and paste.
2021-01-15 21:10:55 +00:00
Matt Westcott 758fa2b863 Release note for #6654/#6658 2021-01-15 20:20:00 +00:00
Matt Westcott 133e2b7a37 Add a base DeleteUploadView class 2021-01-15 20:05:24 +00:00
Matt Westcott 4f4ce7232c Add a base CreateFromUploadView class 2021-01-15 20:05:24 +00:00
Matt Westcott d28295f1bf parameterise CreateFromUploadedDocumentView 2021-01-15 20:05:23 +00:00
Matt Westcott e8d7ff4a45 Add a base DeleteView class 2021-01-15 20:05:23 +00:00
Matt Westcott 13766b8c9d Add a base EditView class 2021-01-15 20:05:22 +00:00
Matt Westcott bdda8bf484 parameterise EditView 2021-01-15 20:05:22 +00:00
Matt Westcott 0fcaf297ee combine identical edit_form.html templates 2021-01-15 20:05:22 +00:00
Matt Westcott 9f9c1ae399 move get-context methods into base class 2021-01-15 20:05:21 +00:00
Matt Westcott 293e29f97d Create a shared base class for AddView 2021-01-15 20:05:21 +00:00
Matt Westcott 40093b6713 Split up wagtail.admin.views.generic module 2021-01-15 20:05:21 +00:00
Matt Westcott e2adb8729c Extract methods for constructing the form/json response context 2021-01-15 20:05:20 +00:00
Matt Westcott 80d142c1e4 make object / upload_object into instance attributes 2021-01-15 20:05:20 +00:00
Matt Westcott 3d0e3ccc99 Convert AddView to a TemplateView 2021-01-15 20:05:20 +00:00
Matt Westcott ad683f219e Make permission_policy into a class property
Also replace permission checker decorator with PermissionCheckedMixin
2021-01-15 20:05:19 +00:00
Matt Westcott ac5730c167 Break out getter methods for models / forms 2021-01-15 20:05:19 +00:00
Matt Westcott 662761b74b Refactor into get/post methods 2021-01-15 20:05:19 +00:00
Matt Westcott 828436ffe3 Convert multiple image/document uploaders into class-based views 2021-01-15 20:05:18 +00:00
Matt Westcott b13641e936 Support custom document models with required fields
Same approach as 4023a90d6e for images - define an UploadedDocument model to hold the uploaded file up to the point where the required metadata has been supplied.
2021-01-15 20:05:08 +00:00
Matt Westcott c29a92f801 Fix trailing whitespace 2021-01-15 19:44:37 +00:00
Fernando 30ad03d4ca Update S3 CORS documentation for Boto3 (#6668)
Boto3 has been around for a long time now. Adding a Boto-specific parameter in a tutorial is confusing (it was for me) as people are likely to install Boto3 directly and skip Boto. The `AWS_HEADERS` parameter was replaced by the `AWS_S3_OBJECT_PARAMETERS` parameter in Boto3 and the parameter that controls the access control list specifically is the `ACL`.

By the way, are the instructions on line 50 still relevant today?
2021-01-15 19:42:41 +00:00
Karl Hobley 5e54382aae Remove userbars dependency on the vendor bundle
Fixes #6657
2021-01-15 17:18:48 +00:00
Karl Hobley 773de3eded Update webpack to version 5 2021-01-15 17:13:39 +00:00
LB 7737497239 fix JS code example in hooks docs
- when returning format_html `{` (brace) characters must be escaped
- https://docs.python.org/3/library/string.html#format-string-syntax
2021-01-15 13:18:15 +00:00
LB 7fb4d69d92 clean up - remove console log (commented out) 2021-01-15 13:17:13 +00:00
David Beitey 3c3df689f7
Fix formatting in Development documentation (#6686)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2021-01-13 13:26:41 +00:00
Thibaud Colas 1914394bc8
Update wagtail forms accessibility considerations to link to Django tickets (#6687) 2021-01-12 16:39:57 +00:00
Luis Nell a726c93df4 fix: signal receivers example raising exception
Signal receivers must accept `**kwargs`, otherwise one runs into this:

```
File "/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 94, in connect
raise ValueError("Signal receivers must accept keyword arguments (**kwargs).")
ValueError: Signal receivers must accept keyword arguments (**kwargs).
```
2021-01-11 11:25:19 +00:00
Matt Westcott 14f63519c2 Rename 'config' to 'options' 2021-01-07 15:03:56 +00:00
Matt Westcott 47d68c7632 Make snippet chooser data available via get_value_data 2021-01-07 15:03:56 +00:00
Matt Westcott 68ee88796e Move snippet-chooser to client, and refactor to expose JS API 2021-01-07 15:03:56 +00:00
Matt Westcott a0cb7a9c81 make document title / edit_url available through get_value_data 2021-01-07 15:03:56 +00:00
Matt Westcott 1606d4d09e Move document-chooser to client, and refactor to expose a js API 2021-01-07 15:03:56 +00:00
Matt Westcott 7b8d5f504c Fix page chooser getValue so that it doesn't fail on an empty state 2021-01-07 15:03:56 +00:00
Matt Westcott afa9b16f13 Make image chooser title/preview/edit url accessible through a get_value_data method 2021-01-07 15:03:56 +00:00
Matt Westcott 4714a8424f Implement public JS API for ImageChooser 2021-01-07 15:03:56 +00:00
Matt Westcott bbc61fb2bc lint image-chooser.js 2021-01-07 15:03:56 +00:00
Matt Westcott fcddbfd58a Move image-chooser.js to client/src/entrypoints 2021-01-07 15:03:56 +00:00
Matt Westcott a2ff3e1252 Move entrypoints into an admin subfolder
This allows us to have entrypoints compiling to other apps besides wagtailadmin.
2021-01-07 15:03:56 +00:00
Robert Rollins d18ffb0233 Implemented a 'choose' permission for Images and Documents (#6466)
This PR adds the 'choose' permission discussed in #4488. It limits Image and Document choosers to showing only those Collections (and their contents) for which the current user has the Choose permission.

It grants Choose permissions to the Root Collection to every existing Group that has the "Can access Wagtail admin" perm, via data migration. So there will be no change in behavior unless the user goes in and alters the Choose perms for their site's groups.

This PR has no effect on anything except choosers. The Image and Document index pages are still controlled solely by the 'add' and 'change' permissions, as those are only accessible by users who have those permissions in the first place. This means that it's now possible to configure a Group to allow its members to choose images from existing Collections when editing pages, *without* them being able to edit said images or add new ones.
2021-01-05 12:23:49 +00:00
Karl Hobley b161b66b79 Add a github action to build the docs into JSON format 2021-01-02 11:01:31 +00:00
Matt Westcott d302bea68c
Prevent remove_stale_contenttypes from removing the access_admin permission (#6652)
Fixes #4444. Thanks to @berekuk for the pointer to how to fix this cleanly.
2020-12-23 23:35:17 +01:00
Karl Hobley fe79fbb48f Remove pre-es6 module patterns 2020-12-22 23:39:24 +00:00
Karl Hobley 9873c23e3c Manually fix/ignore remaining legacy JS linting issues 2020-12-22 23:39:24 +00:00