Wykres commitów

15 Commity (74a8cfd8621ef62a30d6e8c0404a11f141d4eef9)

Autor SHA1 Wiadomość Data
Matt Westcott 74a8cfd862 Pass the complete snippet chooser URL as a data attribute, rather than tacking on the model parameter in JS.
I think that's a throwback to when the chooser URL was being passed to the page as a constant in window.chooserUrls...
2021-08-02 17:05:14 +01:00
Matt Westcott 3ac3ffd005 Eliminate top-level uses of versioned_static. Fixes #6801 2021-03-17 23:32:55 +00:00
Matt Westcott d4dc02ad0f Rewrite wagtail.core.telepath to recursively pack constructor args
js_args and get_media methods no longer receive the context object, since they are not responsible for packing their own arguments.
2021-03-17 23:32:23 +00:00
Matt Westcott ac0c5d7ef5 Add telepath adapter for snippet chooser 2021-03-17 23:32:23 +00:00
Matt Westcott 47d68c7632 Make snippet chooser data available via get_value_data 2021-01-07 15:03:56 +00:00
Matt Westcott d2ccd0eb84 Refactor choosers to not pass model instances to templates
Passing the model instance means that logic such as rendering thumbnails and generating URLs to edit pages ends up on the template. This is bad because we're going to want to populate these widgets through mechanisms other than rendering the template (e.g. setState on the widget's Javascript API), and that would end up duplicating the logic on the template.
2020-12-20 12:56:22 +00:00
Karl Hobley 9ad14ea439
Add hooks for snippet listing buttons 2020-08-07 15:47:27 +01:00
Mohamed Feddad bb2e460c0b Replace deprecated ugettext, ungettext with gettext and ngettext. (#5907) 2020-04-02 17:15:26 +01:00
Matt Westcott ffdbe3e26c Avoid calling versioned_static from static form media definitions (#5644)
* Avoid calling versioned_static from static form media definitions

Fixes #5632

Defining media definitions with `class Media:` means that those lines are evaluated on application startup; this means that they cannot contain calls to the Django static file finder, because ManifestStaticFilesStorage doesn't work until collectstatic has completed. Fix this by making those definitions into `def media(self):` methods.

* Add test to confirm that inheritance still works with dynamic form media definitions
2019-10-23 11:52:56 +02:00
Matt Westcott 8711050e49 Add cache-busting parameter to admin static files
Fixes #5493
2019-10-09 12:16:56 +01:00
Matt Westcott 074d9ce3f4 Convert the snippet chooser to use static onload handlers 2018-06-20 15:35:40 +01:00
Matt Westcott 994e793773 Move chooser widget JS from insert_editor_js hook into widget media 2018-06-04 15:03:09 +01:00
Mads Jensen db6d36845f Use Python 3 super() syntax 2017-11-27 18:05:25 +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 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