Wykres commitów

5860 Commity (632b0c1821a90c867e8beb30c4f3e448799a01cb)

Autor SHA1 Wiadomość Data
Matt Westcott 8afe69fd72 Release note for #1867 2016-01-25 15:30:18 +00:00
Tim Heap 417cafe69b Add @cached_classmethod, use instead of @classmethod/@lru_cache 2016-01-25 14:18:49 +00:00
Tim Heap 5714a6a3ab Set base_form_class for SimplePage.edit_handler 2016-01-25 14:18:49 +00:00
Tim Heap 077cd6eda8 Add checks for bad forms from Page EditHandlers
Page EditHandlers must return a subclass of WagtailAdminPageForm to work
correctly. A check has been added to ensure this is the case, raising an
error on startup otherwise.
2016-01-25 14:18:48 +00:00
Tim Heap eda5b86bee Add tests for custom page form classes 2016-01-25 14:18:48 +00:00
Tim Heap 83d8c1a50e Move page validation to WagtailAdminPageForm class
Page validation is now done through the WagtailAdminPageForm class,
instead of through a separate function.
2016-01-25 14:18:48 +00:00
Tim Heap 8bb6982175 Allow Pages to use a custom form for validation
The form class assigned to a MyPage.base_form_class will be used to
validate MyPage instances when editing them in the admin.
2016-01-25 14:18:48 +00:00
Tim Heap 92d507752f Allow overriding base form class for EditHandlers
EditHandlers that can produce forms can now specify which base form
class to use. This defaults to WagtailAdminModelForm, which was the hard
coded base class previously.

Only TabbedInterface and ObjectList EditHandlers now support generating
a form. Other EditHandlers generating forms was not used anywhere except
in the tests.
2016-01-25 14:18:48 +00:00
Matt Westcott 73b6ba01a5 Port wagtailimages to OwnershipPermissionPolicy 2016-01-25 09:58:00 +00:00
Matt Westcott b51f8ce338 Port wagtaildocs to use OwnershipPermissionPolicy 2016-01-25 09:58:00 +00:00
Matt Westcott 04307e05b1 Port generic admin views (and thus wagtailsites) to use permission policies 2016-01-25 09:58:00 +00:00
Matt Westcott 56181cf601 Port wagtailredirects to the permission policy mechanism.
A new helper class in wagtailadmin.utils, PermissionPolicyChecker, is added to provide permission check decorators for the admin views. (This is out of scope for the wagtailcore.permissions module, because it depends on wagtailadmin to supply the 'permission denied' response.)

Not currently implemented - disabling the edit links on the index page listing, for users without change permission. To do this efficiently (and within the constraints of Django templating), we'd need to implement a user/instance-specific lookup object, as we do for pages.
2016-01-25 09:58:00 +00:00
Matt Westcott 87b7cbd596 Implement permission policy modules: BlanketPermissionPolicy, AuthenticationOnlyPermissionPolicy, ModelPermissionPolicy, OwnershipPermissionPolicy
These modules allow all permission logic ('can user X do Y', 'can user X do Y on instance Z', 'who are the users who can do Y on instance Z') to be moved into a single module that can be potentially swapped out to provide new permission rules without changing the rest of the code.
2016-01-25 09:58:00 +00:00
Matt Westcott 3e5c665014 Fix CustomUserManager._create_user to allow passing is_active=False 2016-01-25 09:58:00 +00:00
Matt Westcott 097f45f20b Fix Page model recipes to pass 'self' as the page object ('page' is undefined) 2016-01-22 11:24:41 +00:00
Tim Heap b7fd5de8ec Add test for failing StreamBlock validation 2016-01-21 17:36:52 +00:00
Tim Heap 968676c5bb Use a dictionary for StreamField errors
Instead of filling an array with `None` to indicate no errors, a
dictionary is only set when there is an actual error. This will allow
future functionality for errors to be added to the StreamField itself,
rather than a block, similar to adding errors to a form rather than a
specific field.
2016-01-21 17:36:52 +00:00
Matt e0a7a472e6 Clarify what the Administrator flag does 2016-01-21 12:48:34 +00:00
Karl Hobley 2225faae97 Pin Django modelcluster to 1.1
Prevents possibly incompatible versions from being automatically installed in the future.
2016-01-21 11:35:19 +00:00
Karl Hobley ec59c33ce5 Changelog/release note/contributor for #2134 2016-01-21 11:26:19 +00:00
Josh Hurd a96db0e30b Fix Wistia oembed regex pattern 2016-01-21 11:24:18 +00:00
Matt Westcott 88078ac389 Reorder INSTALLED_APPS to put most specific apps first 2016-01-21 10:18:48 +00:00
Matt Westcott 7c211e7ec0 Update settings in 'configuring Django' docs for Django 1.9 2016-01-20 20:11:40 +00:00
Peter Quade 5c0063f429 making datetimepicker aware of FIRST_DAY_OF_WEEK 2016-01-20 16:30:22 +00:00
alexpilot11 5270c14444 ChooserBlock should use pk instead of id 2016-01-20 12:12:27 +00:00
Karl Hobley 690255c2ee Changelog/release note/contributor for #2111 2016-01-19 13:15:43 +00:00
Aarni Koskela 6f18c5ea0f Fix static asset building on Windows
Normalize all paths to have only forward slashes before mangling them.
2016-01-19 13:14:05 +00:00
Karl Hobley 62b996622a Changelog/release note for #2107 2016-01-18 13:16:52 +00:00
Matt Westcott a6d3d23e64 Explicitly set the wagtailcore_page.path column to use the 'C' collation.
Treebeard's path comparison logic can fail on certain locales such as sk_SK, which
sort numbers after letters. To avoid this, we explicitly set the collation for the
'path' column to the (non-locale-specific) 'C' collation.

Ref: https://groups.google.com/d/msg/wagtail/q0leyuCnYWI/I9uDvVlyBAAJ
2016-01-18 13:13:18 +00:00
Dan Braghis 973529f290 Add python version to all Travis matrix options 2016-01-18 11:29:22 +00:00
Matt Westcott 88d1977d34 Document `site_name` attribute of Site - fixes #2099 2016-01-13 12:49:46 +00:00
Matt Westcott aea3ce67a0 Document setting up MEDIA_ROOT in the Django integration docs
An out-of-the-box Django project is not configured to serve user-uploaded files from MEDIA_ROOT; this needs to be added manually as per https://docs.djangoproject.com/en/1.9/howto/static-files/#serving-files-uploaded-by-a-user-during-development . Fixes #2100
2016-01-12 15:40:35 +00:00
Karl Hobley 9bd91a02e3 Added @abogushov to CONTRIBUTORS.rst 2016-01-12 11:58:08 +00:00
abogushov 887c5b1709 Use translation for Groups 2016-01-12 16:26:18 +05:00
Karl Hobley e45bf70618 Merge pull request #2094 from tony/patch-1
Un-dim shell snippet in README
2016-01-08 14:30:29 +00:00
Karl Hobley 078491b6e0 Prevent cascade deletion of pages when a ContentType is deleted
Fixes #2024
2016-01-07 10:18:38 +00:00
Matt Westcott d8bceff38b Move imports of django.template.engines to the top level 2016-01-06 14:01:58 +00:00
Matt Westcott e16471e662 Fix skip directive on test_sendfile_mod_wsgi_backend.
The test succeeds on Django 1.9.
2016-01-06 14:01:58 +00:00
Matt Westcott 4065bece78 Remove remaining Django 1.7 code and deprecate wagtail.utils.compat functions 2016-01-06 14:01:58 +00:00
Matt Westcott 3e439b7bec Remove Django 1.7 code from migrations and tests 2016-01-06 14:01:58 +00:00
Tony Narlock f54e73adef Un-dim shell snippet in README 2016-01-06 06:51:53 -06: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 bd0ad843fb Version bump to 1.3.1
Conflicts:
	CHANGELOG.txt
	docs/releases/index.rst
	wagtail/project_template/requirements.txt
	wagtail/wagtailcore/__init__.py
2016-01-05 17:19:08 +00:00
Matt Westcott 77163d33ce Remove redundant db_index flag from Filter.spec field
This works around the Django bug https://code.djangoproject.com/ticket/26034
2016-01-05 14:12:28 +00:00
Karl Hobley 53ef320c4e deprecation/1.4: Rotate DeprecationWarning classes 2016-01-05 11:39:34 +00:00
Karl Hobley 848ded8569 deprecation/1.4: Removed Page.search 2016-01-05 11:29:31 +00:00
Karl Hobley 94eb91c2fe deprecation/1.4: Removed ElasticSearchQuery.to_es 2016-01-05 11:29:26 +00:00
Karl Hobley 8b283cdac7 deprecation/1.4: Removed fallback to EMBEDLY_KEY setting
Now must be WAGTAILEMBEDS_EMBEDLY_KEY
2016-01-05 11:29:21 +00:00
Karl Hobley 6888774280 deprecation/1.4: Removed TagSearchable.search 2016-01-05 11:29:15 +00:00
Karl Hobley 84261dec77 deprecation/1.4: WagtailAPI now requires rest_framework 2016-01-05 11:29:08 +00:00