Compare commits

...
2435 Commits
Author SHA1 Message Date
Angelo Dini 006367b678 Fixes test suite (#6688)
* add information for testing

* fix tests

* updated CHANGELOG

* update

* 1.8.5

* fix tests locally

* update text
2019-06-07 11:02:11 +02:00
Bartosz Płóciennik b810dd4417 Adding support for Django 2.2 LTS (#6655)
* New changes for cms 3.7

* Fix typo

* Fixed issue with force_color

* Removed unused import

* Added docs to index.rst

* Fixed travis jobs

* Fixed force_color command

* Changes after review

* Fixed django version in setup

* Update django-2.2.txt
2019-06-06 10:08:20 +02:00
Craig Anderson 15267a5ddf Add missing parenthesis in code (#6677) 2019-05-28 15:25:18 +02:00
Bartosz Płóciennik eeb1e4712b Restored Django flags in compat file (#6636) 2019-03-19 14:45:07 +01:00
Bartosz Płóciennik c973e9720e Fixed #6615 -- Removed depreciation warnings for imp package (#6637)
* Removed depreciation warnings for imp package

* Change try except
2019-03-19 14:44:44 +01:00
Baptiste Darthenay 91cd10c4a7 typo: added spaces on configuration docs (#6330) 2019-03-11 13:58:44 +01:00
Gourav Chawla(dotgourav) 4b25db2b42 Update copyright year in docs to be dynamic (#6618) 2019-03-11 13:58:11 +01:00
Paweł 4bdbf2b709 Page has no attribute site_id [Docs] (#6614)
* plugin_instance.position = new_plugin.position in CMSPlugin.copy_plugin
fix null position in copy_plugin method. CMSPlugin position not null +
default = 0

* CMSplugin.position not null

Django CMSPlugin.position null raises unorderable types: NoneType() <
int()

* fixed page has not attribute site_id
2019-03-11 13:57:52 +01:00
mobilepattern e9481b3e52 Update install documentation to use re_path (#6613)
* Update install documentation to use re_path 

The example with url(...) no longer works. The correct syntax is re_path(...).

* Changed documentation to based on feedback from Bartosz Płóciennik

The change to use re_path is only necessary when using Django 2.0. Reverted the change and added a note for Django 2.0 users.
2019-03-11 13:57:32 +01:00
Gourav Chawla(dotgourav) a613b53668 Fix typo in documentation (#6612)
- Fix typo in apphooks section of introduction docs
- Fix typo in index of introduction
2019-03-11 13:57:11 +01:00
Sascha Marcel Schmidt 54d1d7bbd4 Update install.rst (#6610)
change MIDDLEWARE_CLASSES to MIDDLEWARE as cms check expects
2019-03-11 13:56:38 +01:00
Robert Stein c5e105efda Fixed #6440 -- render_plugin_block template tag (#6472)
* - Fixes #6440 - `render_plugin_block` template tag
- removes unnecessary template
- updates changelog

* adapted changelog
2019-03-11 13:56:18 +01:00
schwobaseggl 63a0ac1891 Fix wrong field name (#6467)
`extended_page` is not a field of a `PageExtension`. This should be `extended_object`.
2019-03-11 13:55:46 +01:00
Vadim Sikora 7175ce9558 Fixed a bug with top-level object/embed/applet tags (#6497) 2019-03-11 13:55:17 +01:00
Bartosz Płóciennik f3fcf1c3ab Fixed travis matrix by moving menu test to allow_failures section (#6628)
* Moved test menu for python 2.7 to allow_failures section (#6625)

* Removed fast finish

* Add to include

* Restore fast_finish
2019-03-11 08:32:05 +01:00
Bartosz Płóciennik f7839c51d6 Fixed #6457 -- Fixed rendering of permission icons (#6624)
* use SVG icons

* add compatibility layer for Django-1.8
2019-03-07 08:46:24 +01:00
Bartosz Płóciennik 8007ce3d2f Release 3.6.0 (#6604) 2019-01-29 11:40:08 +01:00
Bartosz Płóciennik 2daeb7d63c Release 3.6.0rc3 (#6598)
* Release 3.6.0rc3

* Update translations
2019-01-24 11:47:37 +01:00
Bartosz Płóciennik 9e7c0517df Fixed #6595 -- missing clear cache for a menu after copied page (#6596)
* Add clear cache for copy page form

* Removed fixes for menu cache from changelog
2019-01-23 16:08:54 +01:00
Bartosz Płóciennik 9f71f86fd9 Release 3.6.0rc2 (#6591) 2019-01-14 14:41:01 +01:00
Bartosz Płóciennik 1191c9693e Fixed #6572 -- Added missing clear cache for menu when page moved (#6590) 2019-01-14 13:13:50 +01:00
Bartosz Płóciennik 41a8404032 Fixed #6585 -- Added missing clear cache for menu when page is created (#6584) 2019-01-14 08:02:04 +01:00
Jeroen a6b56a884e Issue #6342: docs of text_enabled
Issue #6342: Extended the docs of `text_enabled` param for plugins
2018-12-14 18:16:28 +00:00
Daniele Procida 9863ecd8ed Merge pull request #6582 from evildmp/evildmp/menu-system-logic
Improved menu logic description
2018-12-14 13:10:12 +00:00
Daniele Procida 5f03ce7acb Improved menu logic description
Flattened the deeply-nested list by breaking it apart into logical
sections. This will remedy issues in the PDF version of the documentation,
which failed to handle the list well.
2018-12-14 12:52:49 +00:00
Daniele Procida e6b5553d9e Updated release notes 2018-12-13 18:39:03 +00:00
Daniele Procida 6be77fd2e8 Fixed broken documentation references 2018-12-13 18:07:23 +00:00
Daniele Procida 68988aced4 Fixed spelling errors 2018-12-13 11:58:47 +00:00
Bartosz Płóciennik 577d8e1299 Release 3.6.0rc1 (#6576) 2018-12-12 15:08:55 +01:00
Bartosz Płóciennik e8e9d41ca8 Added documentation for cms 3.6.0 and 3.5.3 (#6575)
* Added 3.5.3 release notes
* Added documentation for cms 3.6.0
* Updated contributors
* Updated AUTHORS
2018-12-12 14:16:02 +01:00
Bartosz Płóciennik f7e0d19487 Bumped version to 3.6.0rc1 (#6559) 2018-11-15 13:26:28 +01:00
Bartosz Płóciennik 9830032180 Updated core team and version support details (#6555) (#6556) 2018-11-09 09:54:47 +00:00
Vadim Sikora 872d588236 Fixed a bug with deleting a model from changelist inside modal 2018-09-29 22:22:20 +02:00
Jacob Rief 6eaa3b6c1b Fixed #6340 -- Don't handle signals sent on fixture load (#6473) 2018-09-22 17:49:39 +03:00
Katie McLaughlin dc079e12b7 Upgraded test dependency Pillow (#6524) 2018-09-22 17:43:41 +03:00
Julz 66140bd9d8 Fixed #6083 -- Make on_delete configurable (#6487) 2018-09-10 09:58:34 +02:00
Paulo Alvarado 2923f0d919 Fixed #6383 -- Rewriting url of page corrupted after save basic settings of page (#6470) 2018-08-06 13:03:15 +01:00
Daniele Procida 93559da21f Improved how-to guides index page (#6464)
[ci only docs]
2018-07-30 15:23:03 +01:00
Daniele Procida 3ac77e20db Rewrote how-to guide and reference for the toolbar (#6427)
* Rewrote how-to guide and reference for the toolbar
* How-to guide makes best practice clearer.
* Numerous private APIs are no longer mentioned.
* Removed out-of-date comment re request-hook
2018-07-28 23:41:01 +01:00
Mateusz Kamycki 50dee524a1 Introduced Django 2.0 & 2.1 support (#6402) 2018-07-13 18:17:25 -04:00
Vadim Sikora 8964d77b87 Fixed a bug with expanding static placeholder by clicking on "Expand All" button 2018-06-21 14:05:48 +02:00
Daniele Procida 09a82422c0 Updated apphooks (how-to and introduction) (#6409)
* Updated apphooks how-to and introduction

[ci only docs]
2018-06-19 22:52:59 +01:00
Vadim Sikora a210eb71d4 Fixed a bug with not enabling plugins that are not rendered in content 2018-06-18 10:11:29 +02:00
Sergey Fedoseev deeccbc83b Added page_title parameter to create_page API function(#6122) 2018-06-15 13:59:49 -04:00
Chematronix 0507212300 Update apphooks.rst (#6255)
* Update apphooks.rst

You need to add *Application instance name* by hand to a page when you add an ``app_name`` #hopeitsavessomeoneelsethetrouble

* Changed as per czpython's suggestions

While still trying to convey that we're fixing the same problem than the previous paragraphs refers to (and that *Application instance name* only appears after setting ``app_name`` )
2018-06-14 08:07:11 -04:00
Paulo Alvarado 899a3d8cff Fixed #6335 -- Global permissions take precedence over cached page permissions (#6411) 2018-06-12 10:55:49 -04:00
Paulo Alvarado 675de13e6b Fixed #6346 -- Set xframe options exempt on cached response (#6403) 2018-06-10 18:32:01 -04:00
Daniele Procida 25a6e11d66 Docs tutorials small fixes (#6408)
* Made minor improvements to tutorial
2018-06-05 17:04:18 +01:00
Daniele Procida 33bf57dffa Update 03-integrating_applications.rst 2018-06-05 14:31:35 +01:00
Daniele Procida 9381429cd6 Docs tutorials small fixes (#6405)
* Fixed typo
* Improved URLs explanation
2018-06-05 12:44:35 +01:00
Daniele Procida 4205eca24f Improved toolbar tutorial (#6400)
* Improved toolbar tutorial
2018-06-01 17:26:32 +01:00
Daniele Procida d5e25f4992 Cleaned up apphooks documentation (#6397)
* fixes #6377

[ci only docs]
2018-05-31 20:00:58 +01:00
Daniele Procida 32d9b73a42 Fixes/improves introductory tutorial (#6390)
* introduces numbering of sections
* fixes #6359
2018-05-31 14:59:35 +01:00
Daniele Procida 591efd6b12 Fixed some spelling and build issues (#6391) 2018-05-31 14:46:59 +01:00
Vadim Sikora 61dfbdb586 Fixed a bug with incorrect move plugin handling 2018-05-28 17:21:30 +02:00
Vadim Sikora e9c1627941 Fixed a bug where structureboard tried to preload markup with legacy renderer 2018-05-28 14:22:35 +02:00
Aliaksei Urbanski 91b799e4ab Updated links in README to use https where possible (#6375)
Fixed outdated links to documentation pages
2018-05-16 21:33:04 -04:00
Frank 74ca478d49 Fixed #6002 -- Prevent users from moving homepage under another page (#6369) 2018-05-15 10:03:24 -04:00
Vadim Sikora 6d2d14b3ca Fixed #6353 -- Removed extra quotation mark from button sideframe template (#6364) 2018-05-09 10:22:09 -04:00
Krzysztof Socha dc1c19eca0 Refs #6185 -- Moved meta description length restriction from model to form (#6362)
Increased meta description length restriction to 320 characters
2018-05-07 13:18:31 -04:00
Paulo Alvarado fe29ed60d1 Fixed #6336 -- request.current_page should always respect draft/live state (#6350) 2018-05-01 18:05:20 -04:00
heppstux c5780a0df1 Fixed #6340 -- Reorder models to support dumpdata (#6341) 2018-04-25 07:46:41 -04:00
Paulo Alvarado 0b930e5547 Updated links to contributing docs 2018-04-24 14:44:03 -04:00
Paulo 9988097988 Removed signal handlers for Page, Title, Placeholder and CMSPlugin models 2018-04-16 10:34:48 -04:00
Paulo b1d1d50fac Removed the translatable content get / set methods from CMSPlugin model 2018-04-16 10:34:48 -04:00
Paulo 967b838d06 Dropped support for Django < 1.11 2018-04-16 10:34:48 -04:00
Paulo db8b1efcea Removed the cms moderator command 2018-04-16 10:34:48 -04:00
Paulo ed0c72250a Removed backwards compatible shims from 3.5 2018-04-16 10:34:48 -04:00
Paulo 163baaf69d Added 3.6 CHANGELOG 2018-04-16 10:34:48 -04:00
Paulo fc18e2cb40 Use toolbar.request_language instead of deprecated toolbar.language part 2 2018-04-16 09:01:26 -04:00
Paulo 94c295b4c8 Use toolbar.request_language instead of deprecated toolbar.language 2018-04-13 15:02:52 -04:00
Paulo Alvarado 5a84b0851e Release 3.5.2 (#6331)
* Updated css, icon and font files

* Bumped version to 3.5.2
2018-04-11 11:32:30 -04:00
Vadim Sikora 6042ce5ed3 Show Divio cloud banner in the docs [ci skip] 2018-04-06 10:32:54 +02:00
Paulo Alvarado 061b91577a Release 3.5.2rc1 (#6327)
* Added 3.5.2 release notes

* Updated css, icon and font files

* Bumped version to 3.5.2rc1
2018-04-05 10:43:57 -04:00
Daniele Procida 53d59f96f4 Improved static placeholder documentation (#6315)
[ci only docs]
2018-04-05 09:00:31 -04:00
Daniele Procida 94fbf0b230 Clarified apphook documentations (#6318)
[ci only docs]
2018-04-05 09:00:20 -04:00
Paulo Alvarado 92b48869a9 Fixed #6280 -- Split migration 0018 into three separate migration files (#6322) 2018-04-05 08:47:41 -04:00
Aidas Bendoraitis 32ba23ed6f Renamed limit_menu_visibility parameter (#6304)
Renamed limit_menu_visibility to limit_visibility_in_menu
2018-03-29 11:24:25 +01:00
Daniele Procida dacc0ec9dc Updated Makefile 2018-03-27 14:46:47 +01:00
Vadim Sikora 38e517b12f Added docs theme 2018-03-26 18:14:06 +02:00
Stefan Wehrmeyer 6cf1661396 Removed references to admin/img/icon_addlink.gif file (#6319)
Use add-another CSS class which provides the icon in Django 1.8 - 1.11
2018-03-26 09:40:38 -04:00
Vadim Sikora 917d768e4a Fixed a bug where non-staff user would be able to open empty structure board 2018-03-22 14:31:32 +01:00
Daniele Procida b50dd7001d Updated pull request template (for documentation) (#6211)
[ci-skip]
2018-03-21 13:44:45 +00:00
Paulo Alvarado 8cbb02c453 Fixed #6307 -- Don't add a leading / character to url paths (#6311)
This only affected moving / publishing the homepage.
2018-03-16 15:14:42 -04:00
Vadim Sikora 4c0539d2aa Fix sideframe race condition 2018-03-07 17:42:57 +01:00
Vadim Sikora 7429a71414 Fixed a bug with shortcuts modal not opening after toolbar reload 2018-03-07 09:16:44 +01:00
Paulo Alvarado 9ba5a857ae Release 3.5.1 (#6297)
* Updated css, icon and font files

* Added release notes for 3.5.1

* Bumped version to 3.5.1
2018-03-05 14:17:07 -05:00
René Fleschenberg 91fb1f19a7 Fixed #6296 -- Removed localization for pk values in toolbar js (#6294) 2018-03-05 09:14:29 -05:00
Paulo Alvarado 17fc98d4d2 Release 3.5.1rc2 (#6292)
* Updated css, icon and font files

* Bumped version to 3.5.1rc2
2018-02-28 13:09:05 -05:00
Paulo Alvarado 7fbb344766 Fixed #6289 -- Don't fail silently on templates with variable extends (#6291) 2018-02-27 14:46:00 -05:00
Joseph Lin 569e5dc5bf Updated license year (#6264) 2018-02-27 06:38:26 -05:00
Daniele Procida 9652ab4a9c Updated compatibility table (#6275) 2018-02-26 18:47:32 -05:00
Paulo Alvarado 7f91044b4a Release 3.5.1rc1 (#6286)
* Updated css, icon and font files

* Bumped version to 3.5.1rc1
2018-02-21 15:06:15 -05:00
Vadim Sikora 65a3127894 Fixed a bug when CMS would incorrectly highlight plugin content
Invisible elements were reporting 0/0 offset which would essentially
scroll the page higher and higher every time you press shift while
hovering over plugin that has invisible elements
2018-02-19 12:32:33 +01:00
Daniele Procida 7a915f5b35 Added frontend integration topic (#6276) 2018-02-09 11:44:59 +00:00
Vadim Sikora 7d7d4336ba Fixed a bug when toolbar js is rendered before toolbar (#6270) 2018-02-07 16:24:58 +01:00
Paulo Alvarado ee4e3e49cd Fixed #6266 -- Added missing migration operation (#6268) 2018-02-06 14:21:58 -05:00
Laurens Bosscher 6c8ebd802f Fixed #6267 -- Migration 0017 should handle multiple page type roots (one per site) (#6269) 2018-02-05 08:37:03 -05:00
Paulo Alvarado b03ccef0c5 Added CHANGELOG entry for 3.5.1 2018-02-04 10:49:08 -05:00
Tim Graham fd5956bef4 Add stacklevel to Page attribute warnings (#6263) 2018-02-01 18:45:35 -05:00
Paulo Alvarado e02c29bde7 Fixed #6227 -- Migrations should only depend on initial content type migration (#6260) 2018-02-01 13:01:47 -05:00
Paulo Alvarado bf6fb4be5a Fixed #6035 -- Don't alter the AdvancedSettingsForm form data (#6250) 2018-02-01 11:25:48 -05:00
Daniele Procida d5daf79e9e Disabled spelling in documentation (#6257)
Removed sphinxcontrib-spelling from docs/requirements.txt, as it
was causing build errors on Read the Docs.

This will need to be reinstated in due course.
2018-02-01 08:33:49 -05:00
Paulo Alvarado fe553bcc45 Release 3.5.0 (#6253)
* Updated CHANGELOG

* Updated po files

* Updated mo files

* Updated css, icon and font files

* Bumped version to 3.5.0
2018-01-31 17:29:36 -05:00
Daniele Procida bdfe0412ae Noted apphook-related deprecations in release notes (#6252)
[ci only docs]
2018-01-31 15:35:55 -05:00
Daniele Procida 0067571e25 Added new project guide to release notes (#6236) 2018-01-31 14:33:12 -05:00
Jens Diemer cd12c2f6ad Fixed #6196 -- Prevent users from passing a public page as parent in create_page api function (#6126) 2018-01-31 09:22:03 -05:00
Paulo Alvarado 4d720a3c1f Fixed #6245 -- Sitemap should only show public languages (#6247) 2018-01-30 11:19:35 -05:00
Paulo Alvarado 52d31944af Added some tests from the content / structure split (#6244) 2018-01-29 18:54:59 -05:00
André Cruz 53d33b73b3 Fixed #5070 -- Welcome page no longer uses multilingual URLs when not required (#6239) 2018-01-18 16:42:30 -05:00
Vadim Sikora dce435c4c3 Fixed a bug add plugin placeholder position not being updated on external actions 2018-01-15 15:17:58 +01:00
Vadim Sikora 2d024c799e Removed "View on site" button when adding page 2018-01-15 15:17:58 +01:00
Paulo Alvarado ddd3921528 Release 3.5.0rc1 (#6235)
* Updated AUTHORS file

* Updated po files

* Updated mo files

* Updated css, icon and font files

* Bumped version to 3.5.0rc1
2018-01-11 13:04:19 -05:00
Daniele Procida 1a95aaa35b Added 'how to upgrade' section to release notes (#6234)
[ci only docs]
2018-01-11 17:13:02 +01:00
Vadim Sikora 103574dca9 Fixed a rare bug with some plugins expand state not being remembered 2018-01-11 15:46:03 +01:00
Vadim Sikora e1bb8d5a1a Fixed a visual inconsistency between condensed and expanded structureboard 2018-01-11 15:46:03 +01:00
Paulo Alvarado 9c567c2f6b Fixed #6231 -- Pages created under a page-type page should also be page types (#6232) 2018-01-11 08:43:09 -05:00
Daniele Procida a5b521c5a7 Corrected release notes (#6230)
[ci only docs]
2018-01-11 13:22:25 +01:00
Daniele Procida c80cd1fdc6 Release notes updated on the basis of feedback
[ci-skip]
2018-01-11 08:57:54 +01:00
Daniele Procida 161e8531dd Created release notes for django CMS 3.5
[skip-ci]
2018-01-10 21:09:54 +01:00
Paulo Alvarado cfee4ecdf5 Fixed #6225 -- Added get_root method to Page model (#6226) 2018-01-10 11:41:06 -05:00
Paulo Alvarado 6fb9ab0612 Fixed #6220 -- Show descendant pages in the delete confirmation page (#6221) 2018-01-10 09:20:03 -05:00
Paulo Alvarado 0aa2f9eb43 Fixed #6222 -- Shortcircuit page wizard form validation if there's errors (#6223) 2018-01-10 09:19:27 -05:00
Paulo 067460447d Removed usages of site_id and parent_id 2018-01-09 17:26:27 -05:00
Paulo 1d5d902ae5 Added backwards compatible shims for parent and site fields 2018-01-09 15:15:23 -05:00
Paulo Alvarado 53e4e88707 Renamed set_homepage to set_as_homepage (classmethod to method) (#6218)
Also changed the default page cache prefix
2018-01-09 12:19:31 -05:00
Vadim Sikora 84ccbaf562 Fixed the way version check is made in settings 2018-01-09 17:55:08 +01:00
Paulo Alvarado fbcf6d6a01 Refactored PageNode into TreeNode (#6217) 2018-01-09 08:08:04 -05:00
Paulo Alvarado d3eb7b9d80 Removed deprecated code for 3.5 release (#6215)
Summary:

* Renamed menu to menus module
* Removed django_load module in favor of django builtin helpers
* Removed support for django-reversion
* urls and menus attributes are no longer supported on apphook classes
* Removed old wizard settings
2018-01-08 06:37:11 -05:00
Tim Graham 1f78303c1e Refs #6083 -- Added on_delete for all ForeignKeys and OneToOneFields (#6108) 2018-01-06 23:00:01 -05:00
Filipe Waitman fb276127bc Fixed #6213 -- Display aliased content on edit mode regardless of source page status (#6212) 2018-01-06 16:38:13 -05:00
Paulo Alvarado f83fce559e Fixed #6178 -- Keep placeholder declaration order when using block tags (#6208) 2017-12-29 10:00:29 -05:00
Paulo Alvarado 1ff5bf9149 Fixed #6205 -- Require "Change advanced settings" permission to change template (#6206) 2017-12-27 16:17:19 -05:00
Vadim Sikora bd7a63bc6f Added a handler for bad request response in the pagetree 2017-12-21 13:15:33 -05:00
Paulo 0daae01f2f Fixed #6201 -- Don't allow users to paste a page if it doesn't have translations for current site 2017-12-21 13:15:33 -05:00
Vadim Sikora d7ee89da24 Fixed a rare bug with widgets not initializing correctly 2017-12-21 13:38:24 +01:00
Vadim Sikora 1b0eebfe51 Added frontend changes required for copying across sites 2017-12-20 07:30:06 -05:00
Paulo 454e070fd4 Added page copying across sites 2017-12-20 07:30:06 -05:00
Paulo Alvarado 630a50361a Fixed #6199 -- Show all languages on language chooser if user is staff (#6200) 2017-12-20 06:07:54 -05:00
Vadim Sikora e7bba3abae Cleaned up the code for refreshing plugins and fixed missing translation 2017-12-20 10:54:02 +01:00
Vadim Sikora b7247b6004 Fixed loader causing circular dependency between Toolbar and rest of the js modules 2017-12-20 10:54:02 +01:00
Vadim Sikora bf27dcf8bc Refactored modal event system to be consistent 2017-12-20 10:54:02 +01:00
Sergey Fedoseev e1feb9cba0 Removed / updated outdated deprecation notes in docs. (#6128) 2017-12-19 16:11:03 -05:00
Mark Walker 52fb7e00e7 Improved documentation for Wizard classes. 2017-12-19 16:09:56 -05:00
Vadim Sikora f18f993c04 Fixed a couple of rare clipboard bugs 2017-12-14 08:26:03 +01:00
Vadim Sikora 3807136508 Fixed a bug with random collapsing of moved plugins 2017-12-14 08:26:03 +01:00
Vadim Sikora d19dfdd960 Added a regression test for #6162 2017-12-14 08:26:03 +01:00
Vadim Sikora 2159767efc Prevented scrolling of the parent when structureboard is open 2017-12-14 08:26:03 +01:00
Vadim Sikora 06fd906e39 Fixed a bug where welcome page would not respect the toolbar language 2017-12-14 08:26:03 +01:00
Vadim Sikora a4ff7062b9 Made "View on site" links close the sideframe 2017-12-14 08:26:03 +01:00
Paulo Alvarado 53b218c4c5 Fixed #6192 -- Filter out pages in the menu based on supported user languages (#6193) 2017-12-13 21:20:11 -05:00
Paulo Alvarado 2011892309 Fixed #6188 -- Only set published (or once published) languages into the public page (#6191) 2017-12-13 19:53:13 -05:00
Paulo Alvarado 39442083f1 Fixes #6189 -- Use only published languages when rendering LanguageChanger for public page (#6190) 2017-12-13 19:16:55 -05:00
Paulo Alvarado ba16eb9a1d Use Django's language override (#6187) 2017-12-13 14:21:03 -05:00
Paulo Alvarado 19804319f8 Refactored the fallbacks handling logic (#6182) 2017-12-13 09:51:03 -05:00
Sergey Fedoseev a970819be8 Fixed #5952 -- Set touch='selected' in jstree.dnd config.
See https://www.jstree.com/api/#/?f=$.jstree.defaults.dnd.touch

Conflicts:
	cms/static/cms/js/dist/3.4.5/bundle.admin.pagetree.min.js
	cms/static/cms/js/dist/3.4.5/bundle.toolbar.min.js
2017-12-12 14:30:50 +01:00
Vadim Sikora 270509699e Fixed a bug with detecting added plugin 2017-12-12 10:14:37 +01:00
Paulo Alvarado 47c71409bc Fixed #6171 -- Always fallback to a configured site language on the page admin (#6174) 2017-12-11 10:31:05 -05:00
Paulo da37f26fbf Removed plugin_language and page_language GET params from BE 2017-12-07 13:58:35 +01:00
Vadim Sikora 0f2428611a Removed plugin language 2017-12-07 13:58:35 +01:00
Vadim Sikora d9aac20865 Added target language to plugin endpoints 2017-12-07 13:58:35 +01:00
Paulo Alvarado e07e26c0b6 Fixed #6165 -- Don't leak context to aliased plugins (#6166) 2017-12-06 17:03:41 -05:00
Paulo 418b7f9844 Fixed invalid urls generated from toolbar on page-types 2017-12-06 15:40:55 -05:00
Vadim Sikora df1edc14b5 Added a timeout in the integration test to avoid db lock on travis
Ref: https://travis-ci.org/divio/django-cms/jobs/311394078
2017-12-05 10:15:47 +01:00
Vadim Sikora a50a8945b5 Added a check for version mismatch in the localStorage 2017-12-04 17:22:55 +01:00
Paulo ffa4c36a1a Adjust page wizard tests 2017-12-01 11:01:00 -05:00
Paulo 42946981cf Added more detailed __repr__ to Wizard base class 2017-12-01 10:08:29 -05:00
Paulo Alvarado b5070833f9 Fixed #6158 -- Don't show unpublished pages in the menu. (#6159) 2017-11-30 17:22:16 -05:00
Vadim Sikora c9661ea79b Fixed a bug with focusing inputs inside a modal in IE 2017-11-29 15:55:07 +01:00
Paulo 7ed2907bbc Only the PageAdmin can register plugin urls 2017-11-29 08:58:09 -05:00
Vadim Sikora 70d1929954 Fixed a bug where static placeholders wont be togglable after page edits 2017-11-29 14:51:18 +01:00
Vadim Sikora cfbafa2963 Fixed a bug when page nodes wont open when children were added 2017-11-29 14:48:02 +01:00
Paulo a03c7ebcae Use correct db-alias on page nodes migration 2017-11-28 08:48:17 -05:00
Vadim Sikora 5f2a19cf04 Added integration test for adding multiple plugins and correct tooltip 2017-11-24 10:18:03 +01:00
Paulo 8c11e0df2b Added multi-wrap plugin 2017-11-24 10:18:03 +01:00
Vadim Sikora f8bb876268 Fixed a bug when adding multiple plugins
The structure returned into the dataBridge when adding the plugin was
ordered `parent -> child + child` but the frontend expects it to be
`child + child -> parent` because if the plugin doesn't have it's own
markup - the data about the child and parent is added to the same node
and the first one initialized must be the innermost one.
2017-11-24 10:18:03 +01:00
Paulo Alvarado d503b0fb39 Fixed #6151 -- Pages can be copied as the first child of a parent page (#6152) 2017-11-21 18:43:30 -05:00
Paulo Alvarado 9acbf6a281 Fixed #6149 -- Don't render aliased plugins/placeholders if the host page is unpublished (#6150) 2017-11-21 11:19:49 -05:00
Paulo Alvarado e9d419f609 Fixed #6147 -- Show pages in PageField only once, regardless of translations count (#6148) 2017-11-20 13:49:19 -05:00
Paulo Alvarado a019a48d72 Fixed #6143 -- Add -copy to the slug and path if copied page has conflicting slug (#6146) 2017-11-17 19:09:56 -05:00
Paulo Alvarado fb77d60279 Fixed #6144 -- Always append slug prefix when using existing slug in wizard (#6145) 2017-11-17 16:57:12 -05:00
Paulo Alvarado f3978baa56 Fixed #6141 -- Copy plugins for each translation of page (#6142) 2017-11-17 15:17:45 -05:00
Paulo 30680ac0ea Shared pages can't be edited but can be previewed 2017-11-17 13:26:25 -05:00
Paulo 8ccafc3d46 Set "pending" pages as unpublished 2017-11-16 19:12:41 -05:00
Paulo Alvarado f5ae6de1be Fixed #6139 -- Check only for add and view permissions on page copy (#6140) 2017-11-16 18:55:16 -05:00
Paulo Alvarado 4f62056f13 Fixed #6137 -- Don't add "-copy" when using existing slugs on pages in wizard (#6138) 2017-11-16 16:05:38 -05:00
Paulo 16b6dd86cd Users should be able to see unpublished shared pages 2017-11-16 12:21:50 -05:00
Paulo Alvarado 07c7572a75 Fixed #6135 -- Only show overwrite url if the overwrite flag is set (#6136) 2017-11-16 08:24:31 -05:00
Paulo 85991b59f0 Fixed TypeError 2017-11-15 19:41:33 -05:00
Paulo c0c1677d10 Don't use site as a lookup on template tags 2017-11-15 19:40:35 -05:00
Paulo ec086bc771 Moved is_page_type declaration to proper migration 2017-11-15 18:32:00 -05:00
Paulo Alvarado 9361aca524 Fixed #6131 -- Pages can be copied into any position in the page tree (#6133) 2017-11-15 16:59:47 -05:00
Paulo Alvarado acfa6889df Fixed #6130 -- Set overwrite_url initial value on advanced settings form (#6132) 2017-11-15 13:33:46 -05:00
Vadim Sikora 70b88a24b2 Frontend for shared pages (#6129) 2017-11-15 09:59:55 -05:00
Paulo Alvarado f7af69f3e1 Refacted page tree into page nodes (#6112)
Added support for pages shared accross multiple sites
2017-11-14 19:43:16 -05:00
Vadim Sikora 58afb80bb4 Fixed JS error happening when localstorage was cleared 2017-11-14 07:35:00 +08:00
Vadim Sikora b5e344f9ed Fixed unnecessary handlers attached to render models
Fix in 644c04a was incorrect.
2017-11-13 11:56:50 +08:00
Vadim Sikora 6be269707e Fixed "Expand all / Collapse all" not reflecting real state of the tree 2017-11-09 19:10:31 +08:00
Vadim Sikora d5ce5413af Updated required node version in docs [ci only docs] 2017-11-09 14:54:34 +08:00
Vadim Sikora 27071952c8 Fixed a bug with rendering button groups 2017-11-08 17:03:37 +08:00
Vadim Sikora 644c04a60f Fixed a bug where unnecessary handlers were attached to render_model_block's 2017-11-08 17:00:33 +08:00
Tim Graham 07ad704c27 Refs #6083 -- Fixed PageUserGroup manager deprecation warning. (#6111) 2017-11-02 17:40:21 +01:00
Sergey Fedoseev 6a426c23f8 Fixed formatting in How to extend the Toolbar docs (#6096) 2017-10-29 13:35:51 +01:00
Sergey Fedoseev 5eb177fed1 Adjusted stacklevel for CMSPlugin.page warning. (#6099) 2017-10-29 13:21:15 +01:00
Andras Gyömrey 2013321a14 Fixed #6045 -- Validate IP address on toolbar IP check (#6046) 2017-10-29 12:53:33 +01:00
Paulo Alvarado 4d1e0a4f87 Synced CHANGELOG with 3.4.x 2017-10-19 15:22:18 -04:00
Salmanul Farzy 1d92c52951 Removed broken downloads badge (#6095) 2017-10-19 15:14:50 -04:00
Nicolas PASCAL 381450c897 Updated sitemap.rst - Django 1.10 no longer specify views as a string (#6087) 2017-10-19 15:13:05 -04:00
Vadim Sikora f6fc0cc068 Fixed a bug with empty clipboard data throwing an error when update happens on other tab 2017-10-19 17:41:18 +02:00
Paulo Alvarado c5fbbea191 Fixed #6104 -- Set namespace to null when its apphook is removed (#6105) 2017-10-18 12:26:01 -04:00
Vadim Sikora 660e15efe8 Fixed a bug where plugin rendered multiple times won't be editable
This covers more cases then the one that was already in place
Ref: #6012
2017-10-10 08:33:06 +02:00
Daniele Procida 72551e4dac Improved/corrected various notes in the documentation
* Added notes on placeholder & cms_toolbar tags

Fixes #5967

* Added note on show_menu namespace parameter

Fixes #5880

* Removed incorrect note from navigation docs

Fixes #5738
2017-10-06 16:38:15 -04:00
Sergey Fedoseev 9287f6907e Used plugin_pool.register_plugin() and apphook_pool.register() as decorators in examples. (#6088)
* Used plugin_pool.register_plugin() as decorator in examples.

plugin_pool.register_plugin() can be used as decorator since
ac62acd653.

* Used apphook_pool.register() as decorator in examples.

apphook_pool.register() can be used as decorator since
07e2b2e11e.
2017-10-06 16:38:08 -04:00
Gianluca Guarini ae5a5b7c71 Added a destroy method for the Plugin javascript class
- Added the destroy method for the Plugin javascript class #6074
- Added the `uid` helper to properly identify any UI Element
- Created aliases to the wrapped `$(window)` and `$(document)` objects
- Added the `destroy` method to the Plugin class removing DOM and events
- Added unit tests and fix the old failing tests
- Added the .cleanup method to remove plugin DOM nodes
2017-10-06 14:50:35 +02:00
Vadim Sikora 1e875d7461 Merge pull request #6090 from vxsx/bugfix/3.5.x/safari-tooltip
Fixed a bug where tooltip won't show up in some browsers
2017-10-05 09:02:52 +02:00
Daniele Procida 27a3c4672e Added version compatibility chart (#6089)
Fixes #6071
2017-10-04 14:51:39 -04:00
Vadim Sikora 6c8dccfc5e Fixed a bug where tooltip won't show up in some browsers 2017-10-04 17:40:35 +02:00
Paulo Alvarado 47968e1c7a Fixed #6080 -- Adding plugins is allowed on placeholders with fallback content (#6082) 2017-09-27 11:56:35 -05:00
Júlio R. Lucchese 4042770293 Add import MyApp model to the forms.py (#6051) 2017-09-26 14:51:03 -05:00
Vadim Sikora 440ff84801 Merge pull request #6077 from vxsx/feature/3.5.x/integration-tests
Fixed integration tests
2017-09-22 10:08:43 +02:00
Vadim Sikora 42614687ee Fixed integration tests 2017-09-21 17:04:23 +02:00
Paulo Alvarado 6f0cd2eb91 Fixed incorrect entry in CHANGELOG
The fix in question landed on 3.4.5 and not 3.4.4
2017-09-14 09:50:56 -05:00
Ludwig Hähne 74c055ebaf Fixed #5740 -- Use the correct url when ManifestStaticFilesStorage or similar is used (#5993) 2017-09-14 09:50:02 -05:00
Daniele Procida e531488a09 Update ISSUE_TEMPLATE.md 2017-09-14 06:16:13 -05:00
Paulo Alvarado 9f4c076d1f Fixed #6037 -- Placeholders without content in edit mode should also fallback. (#6066) 2017-09-07 08:18:54 -04:00
Paulo 8003cd225e Fixed middleware setting fallback in compatibility function. Take 2 2017-09-05 18:15:28 -04:00
Paulo Alvarado 3b43feb317 Changed rendering logic to use draft page unless live is explicitly requested (#6062) 2017-09-05 08:29:05 -04:00
Paulo 069f75d8e2 Fixed middleware setting fallback in compatibility function 2017-09-05 07:55:58 -04:00
Daniele Procida cc06e0af42 Rewrote permissions topic (#6050)
[skip ci]
2017-09-04 14:14:15 -04:00
Vadim Sikora 927291f837 Fixed a bug in structureboard when overflow would be incorrectly applied 2017-09-01 09:19:51 +02:00
Vadim Sikora c56fff5d78 Merge pull request #6041 from vxsx/bugfix/ie-bugfixes
IE bugfixes
2017-09-01 07:58:55 +02:00
Vadim Sikora c1967bae9c Fixed bundle splitting and async chunks in IE11
Turns out Webpack 2+ uses `Promise`s internally and they have to be
polyfilled. The `admin.widget` bundle wouldn't load correctly in IE due
to #5929 and #5941 not covering all the cases.
2017-08-31 16:54:36 +02:00
Vadim Sikora 74f17a10ec Fixed a bug where structure won't open correctly in IE 2017-08-31 16:52:53 +02:00
Vadim Sikora 20ec493dee Merge pull request #6061 from vxsx/allow-frontend-failures
Temporarily allowed frontend integration tests to fail
2017-08-31 16:49:55 +02:00
Vadim Sikora aa866336f2 Temporarily allowed frontend integration tests to fail 2017-08-31 13:28:55 +02:00
Vadim Sikora 990461f36a Made integration tests run on Django 1.11 2017-08-29 10:53:08 -04:00
Paulo 960f204906 Minor compatibility adjustments 2017-08-29 10:53:08 -04:00
Vadim Sikora 982f911295 Made frontend compatibility fixes for Django 1.11 2017-08-29 10:53:08 -04:00
Iacopo Spalletti b740724656 Initial compatibility 2017-08-29 10:53:08 -04:00
Vadim Sikora d416cf1bb1 Merge pull request #6055 from vxsx/feature/follow-redirect
Added code to handle FOLLOW_REDIRECT
2017-08-25 07:19:06 +02:00
Vadim Sikora ee51877a04 Added code to handle FOLLOW_REDIRECT 2017-08-24 15:09:03 +02:00
Vadim Sikora 7f44887d7f Merge pull request #6054 from vxsx/bugfix/3.5.x/fix-css
Fixed css issues [ci skip]
2017-08-24 14:55:44 +02:00
Vadim Sikora aac7ada5f6 Fixed css issues [ci skip] 2017-08-24 14:52:04 +02:00
Stefan Foulis 9b6264b65b Removes "page" text from the draft/publish buttons (#6052)
The buttons at the top right in the Toolbar used to be called
"Edit page" and "View published page". Since there is an increasing
number of non Page content using those buttons, I removed the reference
to page to make it more universal and shorter.
2017-08-21 16:02:21 -04:00
Daniele Procida dc97d7442d Updated authorship, copyright information (#6048) 2017-08-18 08:58:57 -04:00
Daniele Procida 9b50f2fc62 Added apphook topic (#6047)
Also:

* fixed minor typos
* fixed incorrect "Unreleased" heading for 3.1.4
* reordered topic sections
2017-08-18 08:58:52 -04:00
Robert Stein fbd21da92e Fixes #6027 - Removes prevent_descendant_update flag (#6043) 2017-08-15 13:58:17 -04:00
Shaun Brady 3fe2140564 Changed cache key hashing to use sha1 instead of md5 to be FIPS compliant (#6015) 2017-08-12 12:41:05 -04:00
Paulo e944377b8e Fixed #6000 -- Placeholder inheritance takes precendence over fallback code
Bundled a fix for deeply nested placeholder inheritance.
2017-08-07 16:04:01 -04:00
Vadim Sikora f896b17f6f Merge pull request #6033 from vxsx/bugfix/tap-to-edit
Content/Structure split bugfixes
2017-08-03 12:00:10 +02:00
Vadim Sikora 7dbeab896e Fixed a regression with expand all / collapse all 2017-08-03 11:49:12 +02:00
Vadim Sikora 3b731784d8 Fixed a bug with multiple requests firing on double click to edit 2017-08-02 16:47:57 +02:00
Vadim Sikora 5c854bdb74 Fixed a bug when ?structure would incorrectly be saved into url on first opening 2017-08-02 11:58:35 +02:00
Vadim Sikora 2bc6563fc6 Fixed a bug where only first tap to edit would work 2017-07-31 15:17:23 +02:00
Vadim Sikora 897af3ccc4 Fixed a bug with browser crashing on diffing huge pages
This was supposed to be part of #6017 but was lost during all the
rebasing. Essentially - diffing large parts of dom is very inefficient
due to plugin markup being replaced almost everywhere so it's way
cheaper and faster to just replace the DOM.
2017-07-31 14:29:30 +02:00
Vadim Sikora 5653d92158 Merge pull request #6017 from czpython/feature/3.5.x/new-structure-look
New structure look
2017-07-30 09:50:28 +02:00
Vadim Sikora 1028cf2192 Introduced Webpack 3.0 2017-07-30 08:28:07 +02:00
Vadim Sikora e83afaa258 Different look for the structureboard
- also adds syncing across open tabs
2017-07-28 11:23:44 +02:00
Paulo Alvarado 995fcf79de Fixed TypeError from forward-port 2017-07-25 06:40:14 -04:00
Júlio R. Lucchese 04f34dbf53 Use correct folder name in polls app example (#6018) 2017-07-25 05:29:53 -04:00
Paulo Alvarado 482fb1c1cd Fixed #6021 -- Render inherited content even when the parent is cached (#6023) 2017-07-25 05:29:40 -04:00
Paulo Alvarado 69cacec43f Fixes #6013 -- Show Edit Page button on non-cms pages with placeholders (#6014) 2017-07-18 10:14:18 -04:00
Vadim Sikora 14bab38430 Frontend for the structure / content split
- Upgrade webpack setup
- Upgrade node deps and node requirement itself
- Content reloading
- No-reload when plugins update in the structure
2017-07-10 06:08:32 -04:00
Paulo 0fc0426b13 Refactored placeholder rendering to decouple structure/content 2017-07-10 06:08:32 -04:00
Paulo Alvarado 32a40e756f Fixed #6009 -- Prevent non-staff users from accessing the wizard create endpoint (#6010) 2017-07-04 13:10:23 -04:00
Paulo Alvarado b29783483e Fixed #5982 -- Show Add a page as tab title on add endpoint (#5983) 2017-07-04 05:26:52 -04:00
alskgj 36f24375ee Updated install docs with supported django versions (#6007)
Updated docs to reflect that django'cms supports django 1.9 and 1.10 in addition to django 1.8
2017-07-03 09:36:17 -04:00
Jens Diemer 4c265f3887 Fixed SyntaxError in CMS_PLACEHOLDER_CONF docs (#6003) 2017-07-03 09:31:40 -04:00
Paulo fd467924fb Added copy_plugins method to Placeholder 2017-06-27 11:41:39 -04:00
Vadim Sikora b19601fc08 Added pagetree action to set page as home 2017-06-27 05:18:47 -04:00
Paulo 9aa9a106ff Removed automatic home-page logic.
Added new explicit set-home endpoint.

Also added several performance improvements to publishing.
2017-06-27 05:18:47 -04:00
Vadim Sikora 3446ac3ef8 Changed integration tests to not use external dependencies 2017-06-26 11:40:16 -04:00
Paulo dd3670abc1 Removed test migrations. Tests will now run without them. 2017-06-26 11:40:16 -04:00
Vadim Sikora 98405e85ac Merge pull request #5985 from vxsx/bugfix/slugs-in-wizard
Added slug generation to the wizard as well
2017-06-19 08:30:10 +02:00
Vadim Sikora ff96803649 Added slug generation to the wizard as well 2017-06-18 10:38:41 +02:00
Paulo 944740f40a Adapted test_page_tree_regression_5892 to be more specific 2017-06-13 06:41:40 -04:00
Jacob Rief 1cb4b24453 Modified CMSApp.get_urls handling to allow for urlpatterns directly #5898 2017-06-07 13:31:32 -04:00
Paulo Alvarado 9488d40175 Fixed #5975 -- Modified path validator to allow for a single "/" character (#5978) 2017-06-06 05:44:50 -04:00
Paulo Alvarado 57c00631e8 Updated CHANGELOG for #5959 2017-06-03 17:59:06 -04:00
Nicolas PASCAL 1e7c9fdbc4 Fixed #5871 -- Do not show plugins the user can't add (#5959) 2017-06-03 17:56:18 -04:00
Leon Smith e50ca51dac Replaced deprecated djang-cms-search with aldryn-search in docs (#5977) 2017-06-03 17:54:07 -04:00
Nina Zakharenko fb8fa4f676 Fixed #5897 -- Added descriptive __repr__ for Page, Title, Placeholder, and CMSPlugin 2017-05-24 22:56:55 -07:00
Vadim Sikora e8ead3a3c4 Merge pull request #5968 from vxsx/bugfix/links-in-content-mode
Fixed a bug where links in content mode would not open
2017-05-15 09:43:07 +02:00
Vadim Sikora c41962129a Fixed a bug where links in content mode would not open 2017-05-12 13:03:05 +02:00
Vadim Sikora c9e7094a3e Merge pull request #5955 from vxsx/feature/copy-paste-no-reload
Enhanced copy/paste
2017-05-12 12:58:03 +02:00
Vadim Sikora dae73a17c7 Enhanced copy/paste
It is now possible to paste plugin from a clipboard without reloading
the page after it was copied in a different tab. This also makes
clearing clipboard "optimistic" as it now clears it in the UI
immediately without waiting for ajax call to finish
2017-05-10 13:55:20 +02:00
Alexander Paramonov 2e7b4182d2 Updated templatetags.rst to use correct placeholder tag name (#5966)
Replace {% cms_placeholder %} with {% placeholder %}
2017-05-10 06:01:02 -04:00
Paulo Alvarado 76430c76df Fixed #5562 -- Show welcome screen regardless of DEBUG value (#5759) 2017-05-08 14:49:12 -04:00
Paulo Alvarado bd4c7ae336 Fixed #5924 -- Clear placeholder cache on publish (#5961) 2017-05-07 16:25:51 -04:00
Paulo Alvarado 79e9d846c5 Replaced the internal reset_to_live page method with revert_to_live (#5960) 2017-05-06 10:45:54 -04:00
Daniele Procida c62de10b46 Fixed docs build warning (#5962) 2017-05-06 09:53:50 +01:00
Daniele Procida 0834468ad1 Fixed and updated links throughout the documentation (#5958) 2017-05-05 18:08:04 +01:00
Vadim Sikora 07f6c05511 Merge pull request #5941 from divio/bugfix/get-dist-path
Fixed a regression introduced in #5929
2017-05-05 17:42:53 +02:00
Vadim Sikora bff8e2bb84 Fixed a regression introduced in #5929 2017-05-05 11:23:40 +02:00
Paulo Alvarado 0d25012fce Fixed #5902 -- Speed up rendering when using placeholders with inherited content (#5904) 2017-05-04 07:55:49 -04:00
Daniele Procida 895365a9f7 Improved documentation Makefile (#5956)
* Prepended ". $(VENV);" to lines that invoke sphinx-build
2017-05-04 09:43:17 +01:00
Daniele Procida b06cb51c07 Improved language-related documentation (#5940)
* clarified wording and examples
* created a new how-to section for handling multilingual content
* moved content as appropriate
2017-05-04 00:33:18 +01:00
Daniele Procida 366f125b61 Improved "Commonly-used plugins" section (#5942)
Fixes #5935
2017-05-03 23:22:39 +01:00
Jakub Randák d90102f610 Fixed a 404 raised when clicking the `Delete`
button for a page or title extension on Django >= 1.9
2017-05-03 11:11:05 -04:00
Paulo 829f7e2248 Fixed #5947 -- Don't delete menu cache keys from the database 2017-05-03 07:23:57 -04:00
Paulo cc3d14696e Fixed #5310 -- Always use the request site to render the menu
Also improved menu performance
2017-05-03 07:23:57 -04:00
Daniele Procida cc15e5ab6f Improved documentation (#5939)
* added better ToC for how-tos
* improved ToC listings generally
* corrected spelling errors

[ci only docs]
2017-05-02 15:19:40 +01:00
Nicolas PASCAL 57e8a7cae0 Updated "Handling relations" docs to use "ManyToManyField" instead of "ManyToMany" (#5953) 2017-04-30 12:17:08 -04:00
Paulo Alvarado 6fe8ff3682 Fixed #5900 -- Don't assume a published page has public translation (#5908) 2017-04-26 08:22:23 -04:00
Paulo 0a34a9a930 Bumped version to 3.4.3 2017-04-25 13:35:47 -04:00
Paulo 080b598f8d Updated css, icon and font files 2017-04-25 13:35:47 -04:00
Paulo 92a719c4af Added 3.4.3 release notes 2017-04-25 13:35:47 -04:00
Paulo 8ed4d09ddf Fixed #5938 -- Validate the next parameter on toolbar login 2017-04-25 13:35:47 -04:00
Paulo 186eb70caa Fixed #5938 -- Ensure page redirect url is a valid url 2017-04-25 13:35:47 -04:00
Paulo 20c5bf0b5c Updated CHANGELOG for 3.4.3 release 2017-04-25 13:35:47 -04:00
Vadim Sikora ed9cdad983 Added commit message handler to not run all the tests if only docs were changed (#5945)
Use:

    [ci only docs]

in the commit message to for much shorter test times.
2017-04-24 17:33:39 +01:00
Daniele Procida da5313a2ac Added notes on updating pip to installation docs (#5943) 2017-04-21 20:51:43 -04:00
Jannik V e181a1b668 Improved Documentation on Navigation Modifiers (#5889)
* corrected errors in the examples
* added guidance on avoiding performance issues
2017-04-21 12:37:53 +01:00
Daniele Procida b40e7ae6be Improved issue/pull request templates (#5937) 2017-04-20 16:31:33 +01:00
Paulo Alvarado a8289bea90 Updated CHANGELOG to match new planned releases 2017-04-20 06:51:01 -04:00
Vadim Sikora 637927f49a Merge pull request #5929 from vxsx/bugfix/correct-path-to-async-bundle
Fixed an issue with JS not being able to determine correct path to async bundle
2017-04-18 07:30:16 +02:00
Paulo b539fa7876 Cleaned up the publish button logic on page toolbar 2017-04-13 08:09:46 -04:00
Vadim Sikora 14c733b403 Fixed an issue with JS not being able to determine correct path to bundle
Existing assumption was that filenames would never be rewritten, which
resulted in incorrect matches when filenames were hashed, e.g.
`bundle.forms.apphookselect.min.HASH.js` which never matched the
provided regex and resulted in CMS trying to load admin bundle from
incorrect place.
2017-04-13 09:25:35 +02:00
Paulo Alvarado 647d92d25e Fixed #5916 -- Don't publish all pending descendants directly (#5917) 2017-04-12 13:02:09 -04:00
Vadim Sikora 8f789642ec Fixed split dropdown styles on mobile 2017-04-12 14:11:05 +02:00
Vadim Sikora be3b7d0bca Merge pull request #5926 from vxsx/bugfix/dropdown-publish
Fixed publish button / dropdown interaction
2017-04-11 19:46:49 +02:00
Paulo Alvarado 384fc7d860 Fixed #5925 -- Mark page as dirty when placeholder is cleared (#5927) 2017-04-11 11:02:30 -04:00
Vadim Sikora cdfff9dd33 Fixed publish button / dropdown interaction 2017-04-11 12:59:33 +02:00
Paulo Alvarado 3e3a34f81e Don't override django's fieldset template (#5918) 2017-04-10 17:56:48 -04:00
Vadim Sikora 79425bed92 Merge pull request #5919 from czpython/feature/3.4.x/dropdown-button
Added new dropdown button classes
2017-04-06 16:41:34 +02:00
Vadim Sikora 87bdcaadac Fixed improper hash handling 2017-04-06 13:36:31 +02:00
Vadim Sikora 1d46e18000 Added dropdown templates and styles 2017-04-06 13:36:31 +02:00
Paulo e8d37978ac Added new dropdown button classes 2017-04-04 06:04:32 -04:00
Anthony Steinhauser c9fd903c88 Adjusted the toolbar javascript template to escape
values coming from the request.
2017-04-02 11:36:18 -04:00
Nicolas 6700e699ff Update docs to use new toolbar file name (#5915) 2017-03-30 10:16:12 -04:00
Paulo Alvarado 252300ce31 Fixed #5892 -- Use html escaping instead of js escape on page tree (#5905) 2017-03-30 07:53:52 -04:00
Paulo Alvarado 7342535415 Revert "Fixed #5740 -- Issue when CachedStaticFilesStorage or similar is used" (#5909)
This reverts commit 8fabb5c3ef.
2017-03-24 18:05:53 -04:00
Paulo Alvarado c330dae6db Added successful flag to page publish operation (#5891) 2017-03-21 07:27:20 -04:00
Iacopo Spalletti b252f53d1a Fixed #5492 - Use get_placeholder_conf fallback for PlaceholderModel.get_label (#5877) 2017-02-23 20:20:31 -05:00
Paulo Alvarado 63e51f37ea Avoid calling get_plugin_class for every plugin 2017-02-21 11:37:24 -05:00
Jacob Rief c9c4665b85 Added logic to allow plugins to determine which child and parent classes are allowed
per plugin instance.
2017-02-21 11:36:43 -05:00
Jacob Rief 84c9b1bec7 Added backward incompatibility notice about 2 methods in CMSPluginBase 2017-02-21 11:36:35 -05:00
cezar77 ec42adb3c7 Fixed typo in Application Integration docs 2017-02-19 12:23:54 -04:00
Daniele Procida c195fc9fad Pinned intersphinx_mapping for Django to version 1.10 (#5873) 2017-02-13 15:56:19 +00:00
uno 8fabb5c3ef Fixed #5740 -- Issue when CachedStaticFilesStorage or similar is used 2017-02-12 02:38:51 -05:00
Arcady Usov 2321f0a545 Fixed #5858 -- Double slashes in admin login url (#5857) 2017-02-12 01:08:53 -05:00
Andreas Elvers bad722e15c Added missing quotes to language argument for {% page_language_url %} (#5875) 2017-02-09 22:14:29 -05:00
Cezar Pendarovski 1ef83443e7 Corrected typo in documentation
* "placehilder" > placeholder
2017-02-07 15:49:12 +00:00
Vadim Sikora cee33f76d6 Merge pull request #5861 from vxsx/bugfix/publish-cancel-not-respected
Fixed a bug where publish cancel wasn't respected
2017-02-07 13:25:31 +01:00
Vadim Sikora 1fe0ab8421 Fixed a bug where publish cancel wasn't respected
If the page is being published for the first time the confirmation
dialog had no effect on other event handlers, notably the one that
was actually publishing the page.
2017-02-07 11:14:24 +01:00
Stefano Probst de736b7a06 Fixed white space in documentation (#5870) 2017-02-05 10:04:45 -05:00
Paulo Alvarado 1b67021ba8 Added 3.4.3 changelog 2017-02-03 17:49:49 -05:00
Paulo Alvarado 99234309c7 Fixed failing tests. Removed obsolete placeholder editor test case (#5863) 2017-02-02 08:19:35 -05:00
Angelo Dini 7278db5201 Merge pull request #5855 from FinalAngel/release/3.4.x
Use latest link setup for Demo
2017-01-27 11:16:32 +01:00
Angelo Dini e83a45016d update link 2017-01-26 13:06:30 +01:00
Paulo Alvarado a7ad5efb69 Bumped version to 3.4.2 (#5852)
* Updated CHANGELOG

* Updated css, icon and font files

* Updated po files

* Updated mo files

* Bumped version to 3.4.2
2017-01-23 15:57:01 -05:00
Daniele Procida 42d6d7b7ca Updated documentation (#5847)
* Fixes 5846 (removed out-of-date section)
* Fixed a typo
2017-01-16 10:42:16 -05:00
Daniele Procida 580d06e0ad Improved Page and Title extension documentation (#5845)
* improved Page example
* corrected Title example so it actually works properly
* removed broken example from cms.toolbar.ExtensionToolbar comments
bonus: removed out-of-date note about redo/undo from documentation home page

Fixes #5092
Fixes #5083
2017-01-11 14:27:14 +00:00
Paulo Alvarado fac5767199 Release 3.4.2rc1 (#5843)
* Updated AUTHORS file

* Updated css, icon and font files

* Updated po files

* Updated mo files

* Bumped version to 3.4.2rc1
2017-01-09 17:23:34 -05:00
Daniele Procida 10c574891b Created 3.4.2 release notes (#5842) 2017-01-09 10:44:09 -05:00
Daniele Procida ab62e7d139 Fixed a typo in the CMS_TOOLBAR_HIDE reference. (#5837) 2017-01-09 08:38:22 +00:00
Daniele Procida 3678ef5eeb Fixed typos in CLI documentation (#5840)
* Fixed typos in CLI documentation
2017-01-08 21:15:29 +00:00
Paulo Alvarado 097fe820a0 Register revert-to-live as page translation operation (#5838) 2017-01-06 04:47:04 -05:00
Daniele Procida 105fe2a343 Added templates for GitHub issues and pull requests (#5836)
* Added templates for GitHub issues and pull requests
* Moved and updated CONTRIBUTING.rst

[ci skip]
2017-01-04 17:39:28 +00:00
Daniele Procida 47884a48b3 Re-wrote manual installation how-to documentation (#5826) 2017-01-04 16:12:25 +00:00
Paulo Alvarado 593968328e Don't reload plugins on move (#5835) 2017-01-04 08:08:55 -05:00
Paulo Alvarado bc32c15a95 Fixed #5830 -- Added django-reversion >=2 support (#5833) 2017-01-03 13:42:11 -05:00
Paulo Alvarado 386a467e7c Re-introduced "Revert to live" menu option (#5825) 2017-01-03 09:44:55 -05:00
Paulo ebb7b96a75 Deprecate PlaceholderAdminMixin plugin hooks 2017-01-03 06:55:54 -05:00
Paulo e82cc3ff2e Added placeholder & page operation signals 2017-01-03 06:55:54 -05:00
Daniele Procida 9e508ff1c4 Deprecated CMSPluginBase attribute; removed deprecated CMSPlugin methods (#5829)
* Removed the deprecated add_url(), edit_url(), move_url(), delete_url(), copy_url() methods of
  CMSPlugin model.
* Deprecated frontend_edit_template of CMSPluginBase.
* Updated documentation for above.
* Also corrected now-deprecated frontend_edit_template attribute name in documentation
2016-12-31 01:03:21 -05:00
Daniele Procida a9efe5e98d Simplified and improved toolbar tutorial (#5827) 2016-12-28 20:41:54 +00:00
Vadim Sikora 291028b4a1 Updated cms_path when adding plugin
Ref: #5822
2016-12-27 21:26:04 +01:00
Vadim Sikora 865087b904 Updated cms_path with page querystring (#5822) 2016-12-27 11:55:03 -05:00
Paulo Alvarado 4b8089b8b6 Fixed #5752 -- Move pages relative to left or right siblings (#5770) 2016-12-27 06:37:45 -05:00
Daniele Procida 5e032e6933 Replaced outdated reference to MPTT with correct django-treebeard link (#5818) 2016-12-23 19:47:01 -05:00
Jacob Rief a9e2a8d3b7 Mark CMSPlugin.render_plugin as PendingDeprecation 2016-12-23 18:29:11 -05:00
Daniele Procida 78bb22df5c Updated installation documents to reflect installer's wizard mode (#5815) 2016-12-22 08:57:32 -05:00
Jacob Rief 138abbb7e5 More efficient implementation of get_text_enabled_plugins (#5816) 2016-12-21 19:36:27 -05:00
Paulo ad20bd3eee Updated changelog 2016-12-19 07:50:39 -05:00
Paulo c882e3a096 Removed dummy test entry 2016-12-19 07:50:39 -05:00
Vadim Sikora c4aaed3463 Added cms_path to plugin / placeholder operations
This is required for undo/redo functionality.
2016-12-19 07:50:39 -05:00
Paulo Alvarado f0ca708e66 Fixed #5745 -- Set page as dirty when changing the overwrite url field (#5762) 2016-12-17 19:14:09 -05:00
Oliver Thane 7e2e499574 Fixed template inheritance setting creates migration (#5808)
modifying the inheritance setting would cause a spurious migration

See #3479
2016-12-15 07:45:02 -05:00
Sylvain Fankhauser b0de980a08 Fix language used in page settings link (#5801) 2016-12-14 10:12:43 -05:00
Vadim Sikora d83bb11c02 Merge pull request #5791 from divio/bugfix/ff-for-mac-cmd-enter
Fixed a bug where plugin save would be triggered incorrectly
2016-12-13 15:44:20 +01:00
Jacob Rief 824f389ee4 removed deprecated argument current_app (#5795) 2016-12-11 18:12:57 -05:00
Vadim Sikora ec4eb8309e Fixed a bug where plugin save would be triggered incorrectly
Firefox for mac has different keycode for "Command" button, and on
keypress it was checked to set the trigger, but on keyup it wasn't which
resulted in the trigger not releasing properly and in turn in incorrect
plugin save
2016-12-05 13:25:07 +01:00
Iacopo Spalletti 1670ea9ef2 Merge pull request #5786 from yakky/feature/official_110
Added official Django 1.10 support
2016-11-30 11:36:08 +01:00
Iacopo Spalletti dd1b6ee9fc Added official Django 1.10 support 2016-11-30 04:59:17 +01:00
Paulo Alvarado 1619f4b0d1 Fixed #5781 -- Don't inherit content if user has overridden it. (#5782) 2016-11-29 17:19:51 -05:00
Paulo Alvarado 76c8129bd3 Fixed failing tests 2016-11-29 11:36:32 -05:00
Angelo Dini b34aaba6be Merge pull request #5779 from czpython/fixes/3.4.x/5778
Fixed #5778 -- Don't set cache when cms_edit is True on session.
2016-11-29 13:18:27 +01:00
Paulo 157cf7c374 Fixed #5778 -- Don't set cache when cms_edit is True on session. 2016-11-25 19:44:45 -05:00
Gokmen Gorgen 956e4669e7 Fixed #5663 -- Add name of template tags to be discoverable by IDEs 2016-11-24 15:46:23 -05:00
Vadim Sikora c0ead03359 Merge pull request #5775 from Mimino666/3.4.x-escapejs-fix
Escaped strings in ``close_frame`` JS template.
2016-11-24 18:02:07 +01:00
Michal Danilak 37912ec8a7 Escaped strings in `close_frame` JS template. 2016-11-24 15:31:12 +01:00
thomas-d 4cdf61fd2a Fixed #5765 -- Change exclude_plugins to excluded_plugins in docs 2016-11-19 11:18:52 -05:00
Angelo Dini 2770e13a25 hotfix for image 2016-11-17 10:30:48 +01:00
Angelo Dini 3c1b15f50f rename “Aldryn” to “Divio Cloud” 2016-11-17 10:13:52 +01:00
Venelin Stoykov 9c79fae2f8 Improve documentation for copy_relations method (#5750)
Before coping related objects from old instance current one need
to be deleted or at public version of the page can appear duplicates
2016-11-10 10:41:06 -05:00
Paulo Alvarado e077b5e450 Update CHANGELOG.txt 2016-11-07 07:21:15 -05:00
Vadim Sikora 819b5273df Fixed a typo in the confirmation message for copying plugins from different language (#5751) 2016-11-07 07:15:19 -05:00
Iacopo Spalletti 35553169f5 Merge pull request #5753 from Air-Mark/bf/is_popup_pages
bf/is_popup_pages
2016-11-07 12:06:09 +01:00
Mark 48ba718670 review fix: is_popup in GET or POST 2016-11-07 12:11:13 +03:00
Mark f4e2c68f47 missing is_popup variable in context fo render_admin_rows 2016-11-04 00:18:53 +03:00
Vadim Sikora ac41c3defd Merge pull request #5749 from vxsx/bugfix/ttn
Fixed a bug with `text-transform` styles on inputs affecting CMS login
2016-11-01 10:26:36 +01:00
Vadim Sikora 98f100b792 Fixed a bug with text-transform styles on inputs affecting CMS login 2016-10-31 13:27:47 +01:00
Paulo Alvarado d1f6f8961b Fixes #5093 -- Use passed database alias in migrations (#5731) 2016-10-26 18:53:53 -04:00
cworth-gh bd64c85f94 Fixed bug where empty placeholder would render as 'None' (#5734)
This bug would appear when "placeholder" template tag appeared in a
template being rendered by a non-CMS view.

The render_page_placeholder function had a bare "return" instead of
returning an explicit empty string.

See also the code that would be executed for the same case in
django-cms 3.3.x (in cms_tags.py:render_tag in that release):

        page = request.current_page
        if not page or page == 'dummy':
            if nodelist:
                return nodelist.render(context)
            return ''
2016-10-26 18:28:18 -04:00
meomap a63a6e378f Remove usage of plugin.render() in sample code (#5735) 2016-10-23 12:15:13 -04:00
Vadim Sikora 2949e3f3c8 Merge pull request #5727 from vxsx/bugfix/logo-welcome-page
Changed logo on welcome page to svg background-image
2016-10-12 17:57:47 +02:00
Vadim Sikora bf8561ad63 Changed logo on welcome page to svg background-image
There is a bug in Chrome 52+ that renders the glyph we were using for
logo incorrectly on HiDPI screens, given that this bug is fairly rare,
we are switching to background image.
2016-10-12 16:08:28 +02:00
Paulo Alvarado 845c5fdd3d Bumped version to 3.4.1 (#5720)
* Updated CHANGELOG

* Updated css, icon and font files

* Bumped version to 3.4.1
2016-10-04 14:24:56 -04:00
Paulo Alvarado 60d19cb729 Bumped version to 3.4.1rc2 (#5717)
* Updated css, icon and font files

* Bumped version to 3.4.1rc2
2016-10-03 07:36:02 -04:00
Vadim Sikora 26ff0be72b Merge pull request #5714 from vxsx/bugfix/multiple-static-placeholders
Fixed a bug with multiple static placeholders
2016-10-03 09:16:19 +02:00
Vadim Sikora 32d67ca54d Fixed a bug with multiple static placeholders 2016-09-30 19:11:54 +02:00
Paulo Alvarado 85c1abe08a Release 3.4.1rc1 (#5711)
* Added 3.4.1 release notes

* Updated AUTHORS file

* Updated po files

* Updated mo files

* Updated css, icon and font files

* Bumped version to 3.4.1rc1
2016-09-29 10:11:11 -04:00
Vadim Sikora 78613eab1e Merge pull request #5707 from vxsx/bugfix/reset-for-shortcuts
Fixed css reset issue with shortcuts modal
2016-09-28 18:41:33 +02:00
Vadim Sikora c9c46709a7 Merge pull request #5706 from vxsx/bugfix/plugin-content-overlay-positioning
Fixed a bug with positioning of plugin overlay
2016-09-27 14:04:09 +02:00
Vadim Sikora b6ea29627e Fixed css reset issue with shortcuts modal 2016-09-27 14:00:11 +02:00
Vadim Sikora 210d7783e4 Fixed a bug with positioning of plugin overlay
There is a difference in calculation of the offset based on the
"position" property of `html` element, now we take it into account.
2016-09-27 12:04:03 +02:00
Paulo Alvarado d49b5449af Fixed a bug where plugins would be rendered as editable if toolbar was shown (#5703) 2016-09-24 17:32:09 -04:00
Paulo Alvarado 71554122f5 Fixed #5694 -- Mark show_admin_menu_for_pages output as safe (#5702) 2016-09-24 07:19:48 -04:00
Florian Verdet 72be54842a Fixed CMS_TEMPLATES_DIR without __init__.py (#5649) 2016-09-23 20:52:15 -04:00
Vadim Sikora ac0d2347fa Merge pull request #5701 from vxsx/bugfix/svg-plugins
Fixed a bug with svg plugins
2016-09-21 14:05:49 +02:00
Vadim Sikora ef4247f38a Merge pull request #5700 from vxsx/bugfix/shift-space-structureboard-highlight
Fixed a bug with `shift + space` shortcut
2016-09-21 09:45:50 +02:00
Vadim Sikora ee92bf955a Fixed a bug with svg plugins
If a plugin has a top-level `svg` element, it's `className` property is
not a string and that was causing a js error which in turn would break
structureboard actions, like editing plugins etc.
2016-09-21 09:34:24 +02:00
Vadim Sikora 40a401d6c7 Fixed a bug when shift + space shortcut wouldn't correctly highlight a plugin in the structure board 2016-09-20 17:41:30 +02:00
Vadim Sikora e8e1c868a2 Merge pull request #5699 from vxsx/bugfix/keyboard-shortcuts-inside-forms
Fixed a bug when keyboard shorcuts were triggered when form fields were focused
2016-09-20 15:08:49 +02:00
Vadim Sikora 9962117093 Fixed a bug when keyboard shorcuts were triggered when form fields were focused
Keyboardjs doesn't support this out of the box, so we introduce a patch
to prevent callbacks running when input is focused.
2016-09-20 12:20:01 +02:00
Vadim Sikora ffeb6003a7 Merge pull request #5695 from vxsx/bugfix/pagetree-min-height
Fixed invalid min-height value for the pagetree [ci skip]
2016-09-19 11:13:45 +02:00
Vadim Sikora 5a61d00bcf Fixed invalid min-height value for the pagetree [ci skip] 2016-09-19 09:15:49 +02:00
Iacopo Spalletti f6e39aea72 Merge pull request #5681 from timgraham/unused-var
Removed unused context variables in Page change_view().
2016-09-18 11:05:46 +02:00
Iacopo Spalletti c4814a2894 Merge pull request #5692 from yakky/feature/new_middlewares
Fixed #5688 -- Support new-style middlewares
2016-09-18 11:03:04 +02:00
Iacopo Spalletti 9a341b50aa Merge pull request #5693 from yakky/merge/5458
Fixed #5684 -- Removed globally unique constraint for Apphook configs
2016-09-18 11:02:45 +02:00
Iacopo Spalletti d0f7b38f98 Support new-style middlewares 2016-09-18 02:00:15 +02:00
John-Scott Atlakson cb9fa2b46a Fixed example code for custom render_placeholder. (#5689)
Fixed indentation so copy/paste works for end users.
2016-09-17 10:47:55 -04:00
Iacopo Spalletti 9b34f6342e Removed globally unique constraint for Apphook configs 2016-09-17 16:14:00 +02:00
Vadim Sikora d4b8d17e47 Merge pull request #5685 from vxsx/bugfix/multiple-static-placeholders-on-same-page
Fixed a regression when static placeholder was uneditable
2016-09-16 13:30:43 +02:00
Vadim Sikora ac9ce10ad4 Fixed a regression when static placeholder was uneditable
Plugin code assumed that if there are multiple containers then it is a
plugin wrapped with `<template>` tags. That is not the case with
multiple static placeholders on the same page.
2016-09-16 11:52:52 +02:00
Paulo 4e2ac3e738 Bumped version to 3.4.0 (#5682)
* Updated CHANGELOG

* Updated css, icon and font files

* Bumped version to 3.4.0
2016-09-14 18:05:12 -04:00
Tim Graham 9c7cb105c3 Removed unused context variables in Page change_view()
Unused after 49c8d4c290 and
785b31a1a0.
2016-09-13 21:57:05 -04:00
Paulo 3b43f39953 Bumped version to 3.4.0rc3 (#5680)
* Updated css, icon and font files

* Bumped version to 3.4.0rc3
2016-09-13 20:04:27 -04:00
Paulo 7f50bb8b7c Fixed double-escaping when rendering placeholder with dashes (#5679) 2016-09-13 16:36:40 -04:00
Vadim Sikora 5108b173b5 Fixed a bug when empty structureboard could be accessed via space shortcut (#5678) 2016-09-13 15:06:49 -04:00
Paulo 62b638f815 Bumped version to 3.4.0rc2 (#5676)
* Updated AUTHORS file

* Updated po files

* Updated mo files

* Updated css, icon and font files

* Bumped version to 3.4.0rc2
2016-09-12 13:59:33 -04:00
Venelin Stoykov a468385b5b Allways escape text passed from django to JS (#5672) 2016-09-10 15:49:30 -04:00
Paulo 791c7cece6 Fixed #5652 -- Make sure API is atomic (#5658) 2016-09-10 14:06:16 -04:00
Paulo 1ef28b9070 Adjust release notes and page extension docs to reflect permission changes (#5662) 2016-09-09 12:06:00 -04:00
Vadim Sikora 9cd62fa3e0 Merge pull request #5665 from vxsx/bugfix/permission-to-move-nodes
Fixed a bug where pages would appear to be movable without permissions
2016-09-08 11:51:43 +02:00
Vadim Sikora 782b9905c7 Fixed a bug where pages would appear to be movable without permissions 2016-09-08 09:40:36 +02:00
Venelin Stoykov 52d80990e7 Fixed #5651 -- Correctly get language from request (#5664)
If for some reason local variable language becomes empty string instead of None then treat is as None. (Duck typing)

Fixes #5651
2016-09-07 14:37:48 -04:00
Paulo f4c8448a19 Pinned test requirements to avoid random failing tests (#5666) 2016-09-07 12:30:59 -04:00
Paulo 9e0dc69321 Removed revision related permission checks (#5659) 2016-09-06 09:32:44 -04:00
Jens Diemer e897ba0bd9 fix #5502 (#5508) 2016-09-06 07:18:01 -04:00
Vadim Sikora ed72cf7f28 Merge pull request #5660 from vxsx/feature/remove-releases
Removed releases.json from develop [ci skip]
2016-09-06 11:12:24 +02:00
Vadim Sikora 7c151371db Removed releases.json from develop [ci skip] 2016-09-06 09:13:40 +02:00
Paulo 55250cec8c Bumped version to 3.4.0rc1 2016-08-29 21:43:27 -04:00
Paulo 7854103d04 Fixed regression on fix-tree command 2016-08-29 21:42:40 -04:00
Angelo Dini 615517665a Merge branch 'develop' of github.com:divio/django-cms into develop 2016-08-29 14:12:20 +02:00
Angelo Dini cdf9867022 Create releases.json 2016-08-29 10:28:16 +02:00
Angelo Dini 0e8832b300 adapted roadmap link 2016-08-29 10:08:32 +02:00
Paulo a9910d7bf7 Fixed several tree related corruptions. (#5644)
Ticket #5640
Ticket #5641
Ticket #5642
Ticket #5643
2016-08-28 17:35:54 -04:00
Venelin Stoykov 60d7202b73 Fixed #5627 Do not set session cookie on every request (#5628) 2016-08-26 16:22:56 -04:00
Paulo 9fc90eb04b Use pinned djangocms-video 2016-08-26 16:03:56 -04:00
Paulo a0e25894a0 Removed revision support from core (#5615) 2016-08-26 11:39:28 -04:00
Paulo a3a1b33ed3 Added logic to turn off permission cache on demand 2016-08-26 08:11:37 -04:00
Paulo 7a54f8d5ae Finalized permissions refactor.
Added new in-memory permissions caching.
2016-08-26 08:11:37 -04:00
Vadim Sikora 7374742260 Added frontend changes required for refactored permissions system
Lazy dropdowns in the pagetree, logic to disable items, multiple ui
changes and tests.
2016-08-26 08:11:37 -04:00
Paulo b4ca4580aa Removed deprecated features (#5633)
* Removed deprecated features

* Removed deprecated CMS_UNESCAPED_RENDER_MODEL_TAGS setting and behavior

* Added notes for preventing escape on render_x tags
2016-08-25 19:16:33 -04:00
Paulo 16e3bbecb7 Alias plugin enhancements (#5639) 2016-08-25 13:05:24 -04:00
Vadim Sikora af21e0c352 Merge pull request #5638 from vxsx/bugfix/widget-init-fp
Fixed a bug with multiple admin bundles
2016-08-25 09:49:51 +02:00
Paulo e686f74542 Fixed failing ghost plugin test 2016-08-24 20:45:41 -04:00
Paulo 355b7671b6 Added back select_placeholder 2016-08-24 20:10:05 -04:00
Paulo aabeb755ee Added small optimization to downcast_plugins 2016-08-24 20:04:56 -04:00
Paulo db2b69ba80 removed unused parameter 2016-08-24 20:01:06 -04:00
Paulo c6e7ccd9c1 Minor adjustments to downcast_plugins 2016-08-24 19:59:46 -04:00
Vadim Sikora c7617f3150 Fixed a bug with multiple admin bundles
In case there were two bundles on the page, all the subsequent ones were
overriding CMS namespace, which could contain widget information, which
would in turn result in errors.
2016-08-24 17:52:34 +02:00
Iacopo Spalletti 59d303bb0b Merge pull request #5636 from yakky/version_bump
Bump 3.4.0dev1
2016-08-24 13:03:20 +02:00
Iacopo Spalletti bc1ae40a84 Bump 3.4.0dev1 2016-08-24 09:26:46 +02:00
Iacopo Spalletti 4989c294bc Merge pull request #5635 from yakky/feature/travis_pip
Fix typo in travis
2016-08-23 22:23:33 +02:00
Iacopo Spalletti 1c92e02c8b Fix typo in travis 2016-08-23 20:06:47 +02:00
Iacopo Spalletti 035de0310f Django 1.10 compatibility (#5626) 2016-08-22 21:21:09 -04:00
Paulo 046dc3e937 Fixed #5622 -- Let the advanced settings form fail gracefully (#5624) 2016-08-22 15:28:24 -04:00
Paulo 70a5c61500 Fixed #5587 -- Incorrect language used for plugin list (#5620) 2016-08-22 10:23:37 -04:00
Paulo f96c80357c Fixed an error caused by a ghost plugin with children (#5630) 2016-08-22 09:17:47 -04:00
Paulo 0136232ded Pin sphinx to 1.4.5 due to breaking changes in 1.4.6 2016-08-21 17:22:40 -04:00
Angelo Dini 8e2e049eaa Merge pull request #5623 from FinalAngel/develop
Fixed logo on welcome screen
2016-08-19 09:52:04 +02:00
Angelo Dini 153b3d5625 fixed issues with the welcome screen logo 2016-08-18 16:31:15 +02:00
Vadim Sikora 365e503f7e Merge pull request #5619 from vxsx/feature/improve-shift-space-ux
Improved `shift+space` shortcut UX
2016-08-18 10:08:13 +02:00
David D Lowe 4fd0d66ecd Fix example in doc about ModelForm (#5606)
This fixes the bug that would cause the error:

django.core.exceptions.ImproperlyConfigured: Please set entry 'model' attribute or use ModelForm subclass as a form
2016-08-17 14:14:09 -04:00
Vadim Sikora a4c0cb5d99 Improved shift+space shortcut UX
Content is now scrolled to the top of the plugin, putting the
plugin at 20% of window height vs putting window center in the
middle of the plugin. In case the plugin is very big you would end
up in the middle of nowhere.

This also increases overlay fade out timeout so it's more visible.
2016-08-17 15:58:52 +02:00
Vadim Sikora d41b42316e Merge pull request #5618 from vxsx/feature/fuzzy-matching-plugin-picker
Added fuzzy matching to the plugin picker
2016-08-17 15:53:39 +02:00
Vadim Sikora 08c51d30a0 Added fuzzy matching to the plugin picker 2016-08-17 09:55:06 +02:00
Vadim Sikora 9b4af053b1 Merge pull request #5616 from vxsx/bugfix/dynamic-plugin-markup
Fixed a bug when some plugins wouldn't be editable
2016-08-16 20:42:47 +02:00
Vadim Sikora 9158768c85 Fixed a bug when some plugins wouldn't be editable
Since real preview now stores the data about corresponding plugins
on actual plugin markup (in forms of classes and jQuery data) -
plugins that have their markup somehow modified or cloned wouldn't
appear triggering tooltip or being editable by double clicking on
them. That was happening because libraries usually keep classes but
they do not keep the data and event handlers associated with the
plugin, so in case e.g. a slide was cloned - it wouldn't be
editable, you would have to find the original slide and double
click on that. This commit changes the way handlers for plugins are
attached so the only thing that is required from a library
modifying the plugin markup is the `cms-plugin-x` class.
2016-08-16 18:20:51 +02:00
Paulo 5c09f1d731 Refactored permissions (#5532) 2016-08-16 11:20:03 -04:00
Vadim Sikora 689b29c255 Merge pull request #5602 from vxsx/feature/shortcuts
Shortcuts
2016-08-16 11:35:32 +02:00
Vadim Sikora c9d8d7fbba Added shortcuts to control structureboard and toolbar
This improves keyboard handling in toolbar / structureboard and
modal.
2016-08-15 16:52:56 +02:00
Vadim Sikora 14a36fa9bd Merge pull request #5605 from vxsx/bugfix/refactor-pagetree-dropdowns
Refactored Pagetree dropdowns
2016-08-12 08:59:23 +02:00
Vadim Sikora 8cb2643eaa Refactored Pagetree dropdowns
This fixes a bug when there is a different number of triggers and
menus on the page (due to missing permissions etc) and click on a
trigger would open wrong menu because indexes wouldn't match.
2016-08-11 18:39:39 +02:00
Vadim Sikora b42ff01985 Merge pull request #5600 from vxsx/feature/enhance-space-shortcut
Added `shift + space` shortcut
2016-08-11 13:53:02 +02:00
Vadim Sikora 562a9570b3 Added shift + space shortcut
New shortcut toggles structureboard if you hover over a plugin and
then highlights the plugin in the appropriate place.

As part of this commit, `Mousetrap` library is added since in
future we want to add more keyboard shortcuts to the CMS.
2016-08-11 13:52:27 +02:00
Vadim Sikora 2a0f7211b8 Merge pull request #5596 from vxsx/feature/modal-submit-external-events-forwardport
Fixed submit handlers not being executed on modal form
2016-08-11 13:49:29 +02:00
Vadim Sikora cf46814afe Fixed submit handlers not being executed on modal form
This is a regression from the #5312, submitting form with jQuery
doesn't run event handlers that are attached with `addEventListener`,
e.g Django's `filter_horizontal` field.

Ref: #5590
2016-08-11 13:48:56 +02:00
Paulo 5a7169c49c Fixes #5589 -- Use pk explicitly when filtering relations in migrations (#5592) 2016-08-09 15:08:03 -04:00
Paulo fa9459952c Fixed regression from speed refactor -- Show placeholder names unescaped (#5599) 2016-08-09 15:07:18 -04:00
Paulo 617c2c4088 Refactored plugin rendering (#5558) 2016-08-08 14:10:16 -04:00
Venelin Stoykov 0c1ef4ffbc Fixed #5494 -- Make it possible to use multi-table inheritance for extensions (#5497) 2016-08-05 15:05:47 -04:00
Paulo d648239f0c Fixed #5402 -- Recursion error when referencing same Alias plugin (#5568) 2016-08-03 11:14:24 -04:00
Paulo 81b779eba7 Fixed #5564 -- Removed html5lib from setup.py (#5581) 2016-08-03 10:10:40 -04:00
Vadim Sikora 2a403115a6 Merge pull request #5571 from vxsx/bugfix/plugin-save-callback-fix
Fixed race condition in plugin save callback.
2016-07-31 12:25:06 +02:00
Vadim Sikora d9edf75de6 Fixed race condition in plugin save callback.
PR #5560 introduced plugin save callback, but it reset the
`isReloading` flag right before the actual reload. Murphy's law
kicked in and on the pages with extreme amount of plugins
 the `onPluginSave` callback was fired right after the actual
reload already started. This commit fixes it, by not resetting the
flag at all.

Also, it is not recommended to use Class.js mixins feature anymore,
as it copies the methods and internal state, which can lead to
problems.
2016-07-31 10:14:59 +02:00
Paulo 94114bc0ab Fixed tests to match updates on ckeditor (#5521) 2016-07-29 14:15:00 -04:00
Vadim Sikora 675276422a Created onPluginSave callback to get rid of unnecessary requests (#5560)
Modal has it's won mechanism for reloading when the plugin is
saved. However when the plugin is saved - close_frame template is
rendered where reloadBrowser is called again. So whenever the
plugin is saved - server takes 2x time to process the response. We
cannot remove the template since it can be used by other plugins
for their own means (most notably djangocms-text-ckeditor).
2016-07-22 08:00:47 -04:00
Vadim Sikora 49092ff578 Merge pull request #5553 from vxsx/bugfix/widgets-forwardport
Fixed a regression when standalone widgets wouldn't work
2016-07-20 09:44:11 +02:00
Vadim Sikora 285500f2de Fixed a regression when standalone widgets wouldn't work
The regression happened because in
https://github.com/divio/django-cms/commit/a44cf25d6d5fd63cd2e9bd2ad1b5e14ae15c7d7b
and before that in 3.3.0 the files required for widgets were
removed from media js class on the assumption that the CMS provided
bundles would be loaded anyway. This commit changes the way
requirements are loaded for those widgets so they can be used
standalone and on CMS pages as well.
2016-07-19 17:36:18 +02:00
Vadim Sikora 32cb213a88 Merge pull request #5551 from vxsx/bugfix/mobile-scroll-on-disabled-item-forwardport
Fixed toolbar menu scrolling on mobile.
2016-07-19 15:04:23 +02:00
Vadim Sikora eb4fce255f Fixed toolbar menu scrolling on mobile.
It wasn't possible to scroll the menu if it was initiated on
disabled item.
2016-07-19 09:23:43 +02:00
Vadim Sikora d7d45049c5 Merge pull request #5542 from vxsx/feature/forwardport-infra
Fixed test server to never start on the port already in use
2016-07-18 16:24:19 +02:00
Vadim Sikora d0aeecafed Merge branch 'develop' of github.com:divio/django-cms into develop 2016-07-18 08:43:19 +02:00
Simon Charette 29fa0d2131 Fixed render_model template tags to work with models containing deferred fields. (#5516) 2016-07-16 14:55:56 -04:00
Paulo 834f7d7a38 Fixed failing tests because of new html5lib release. 2016-07-16 11:12:24 -04:00
Vadim Sikora 3691a21319 Fixed test server to never start on the port already in use
Ref: https://github.com/divio/djangocms-casper-helpers/pull/4
Ref: https://github.com/divio/django-cms/issues/5424
2016-07-14 16:25:22 +02:00
Vadim Sikora 2c7664e251 Merge pull request #5529 from vxsx/feature/infra-gulp-errors-forwardport
Forwardport #5528 & #5525
2016-07-12 09:30:54 +02:00
Paulo 031cb7c783 Fixed #5522 -- Don't override global context in render_plugin_toolbar_config tag (#5523) (#5531) 2016-07-11 12:52:16 -04:00
Thibaud Colas 08357be70f Fix link to AUTHORS file in README (#5524) 2016-07-11 07:51:07 -04:00
Vadim Sikora d3986bef3b Fixed plugin form false positive "edited" state
When plugin is being edited we track the changes in order to have
the mechanism for saving user's unsaved content. When the
"trackChange" is triggered it didn't take into account actual
values and always considered the field as changed thus prompting
the user even if the form wasn't really changed.
2016-07-11 09:38:46 +02:00
Vadim Sikora c0bd6459a2 Fixed gulp watch task breaking on lint errors.
The default gulp task starts webpack, eslint and sass watchers. If
ever there was a linting error, linting and sass watchers would
stop because of the unhandled ESLintPlugin error. Gulp-plumber is a
tool to swallow unhandled errors and display them in the console
without breaking the gulp streams.
2016-07-11 09:37:46 +02:00
Paulo 38621b4b3e Fixed #5490 -- Allow non-ascii to print on publisher-publish (#5496) (#5515) 2016-07-08 07:13:36 -04:00
Paulo eef8578eaf Merge pull request #5489 from czpython/feature/permissions-cleanup
Permissions cleanup (part 1)
2016-07-07 20:10:46 -04:00
Venelin Stoykov a0eeea8b88 Using exists() instead of count() for existance checks (#5514) 2016-07-07 20:02:53 -04:00
Venelin Stoykov 4f83dd1ef5 extension_pool.register can be used as a decorator (#5495)
Fixes #5493
2016-07-06 19:55:16 -04:00
Vadim Sikora 5220673d2e Merge pull request #5509 from vxsx/bugfix/fix-migration-forwardport
Fixed migration 0014 use of ContentType model
2016-07-06 12:40:41 +02:00
Vadim Sikora 89baa76ec6 Fixed migration 0014 use of ContentType model 2016-07-06 09:21:11 +02:00
Vadim Sikora 2dc0bb29b7 Merge pull request #5506 from vxsx/bugfix/disable-multiple-submits-forwardport
Disabled multiple submits possiblity when copying pages
2016-07-05 14:20:09 +02:00
Vadim Sikora 06e391c9a6 Disabled multiple submits possiblity when copying pages 2016-07-05 14:17:57 +02:00
Vadim Sikora f3c3d61374 Merge pull request #5505 from vxsx/bugfix/legend-icon-colors-forwardport
Changed legend icon colors to match page tree ones [ci skip]
2016-07-05 13:15:17 +02:00
Vadim Sikora f0c12805fe Changed legend icon colors to match page tree ones [ci skip] 2016-07-05 13:14:09 +02:00
Vadim Sikora ba1c269c0e Merge pull request #5500 from charettes/adjust-two-templattags-tests
Adjusted two template tags tests to test the correct string.
2016-07-05 09:24:35 +02:00
Vadim Sikora 5e1533a6c7 Merge pull request #5485 from vxsx/bugfix/link-plugins-not-editable
Fixed an issue when link plugin couldn't be edited
2016-07-05 09:24:08 +02:00
Vadim Sikora 85aaa47b26 Fixed an issue when link plugin couldn't be edited
Since #5429 the plugin markup has `cms-plugin` class, which means
that link plugins markup would look like `<a class="cms-plugin" ...>`
which wasn't handled by that doubleclick handler that previously
allowed editing of plugins that contain links.
2016-07-05 09:23:46 +02:00
Vadim Sikora 1c455a2cba Merge pull request #5487 from vxsx/bugfix/copy-pasting-plugins-forwardport
Renamed copy/pasting/updating events
2016-07-05 09:21:51 +02:00
Simon Charette 0e799fcf5d Adjusted two template tags tests to test the correct string. 2016-07-04 14:19:02 -04:00
Vadim Sikora ddcd2308a8 Renamed copy/pasting/updating events
In the past we were using namespaced events for moving/pasting and
updating structureboard events. Due to the nature of jQuery events
namespaces `cms.update` event could trigger `cms.plugins.update`
where it wasn't required, which in turn led to incorrect tree when
pasting plugins. This pr replaces custom events to be unique
strings so they don't interfere with each other.
2016-07-04 11:33:57 +02:00
Paulo 1ec6ef76c3 Refactored page admin tests 2016-07-01 23:13:18 -04:00
Paulo 8fcb1f9607 Adapted test to reflect that un-saved plugins are no longer rendered. 2016-07-01 15:21:39 -04:00
Paulo 7c73dd1e31 Cleaned up failing tests 2016-07-01 15:21:38 -04:00
Paulo d91ea493d9 Added tests for custom apps that user PlaceholderAdminMixin 2016-07-01 15:21:38 -04:00
Paulo 1ac063f803 Added has_paste_plugin_permission method 2016-07-01 15:21:38 -04:00
Paulo 960466fbb9 page, user & group tests passing 2016-07-01 15:21:24 -04:00
Paulo 21ec5ecb79 adjust permission checks to not ignore django's 2016-07-01 15:02:57 -04:00
Paulo 1334c6d425 remove ghost plugin handling 2016-07-01 15:02:57 -04:00
Paulo ca86368c7a initial draft of page admin permissions 2016-07-01 15:02:57 -04:00
Paulo 27273f0a28 finalized page user admin and group tests 2016-07-01 15:02:57 -04:00
Paulo 3a2157c0e2 fixes inconsistencies with user and group admins 2016-07-01 15:02:57 -04:00
Paulo d58e797a1c adds (failing) page user admin tests 2016-07-01 15:02:57 -04:00
Paulo 7c23fd6c13 all page user group tests are passing 2016-07-01 15:02:57 -04:00
Paulo 0c1517acb6 fixes infinite recursion 2016-07-01 15:02:57 -04:00
Paulo 5501a1846d adds failing user group admin tests 2016-07-01 15:02:57 -04:00
Paulo 975449425e extend base testcase to add more helpers 2016-07-01 15:02:57 -04:00
Paulo d4096d18e7 adds can_change_global_permissions utility 2016-07-01 15:02:57 -04:00
Paulo 631653b12a start by separating page and page admin tests 2016-07-01 15:02:57 -04:00
Vadim Sikora d735c4554f Merge pull request #5478 from vxsx/feature/pagetree-drag-n-drop-copy-paste
Added the ability to copy/paste pages by drag'n'drop
2016-07-01 15:42:56 +02:00
Vadim Sikora 6ad1ecc1e2 Added the ability to copy/paste pages by drag'n'drop 2016-07-01 11:26:32 +02:00
Vadim Sikora 48adc2c7a7 Merge pull request #5479 from vxsx/feature/forwardport-3.3.x
Forwardport 3.3.x
2016-07-01 09:02:00 +02:00
Paulo 85a5885951 updated some tests to avoid patching the request object. (#5474) 2016-06-30 17:26:18 +02:00
Martin Owens c3cb3961df Fixed migration 0010 to avoid using model classes directly (#5473) 2016-06-30 17:26:18 +02:00
Vadim Sikora 08957915e0 Moved child-plugin-classes templates out of "js" sekizai block
In commit 4f2ec23, a ``<script type="text/cms-template">`` (for
holding client-side content that is not to be rendered until
runtime, and which we will use until the HTML element
``<template>`` is fully supported) was placed inside a Sekizai
block where it would not interfere with page rendering.

Unfortunately, this turned out to be incompatible with Django
Compressor https://github.com/divio/django-cms/issues/5454, which
raises an error on the (deliberately invalid)
``type="text/cms-template"``.

It has been moved out of the Sekizai block to fix this problem. The
render-blocking effects of the script are negligible.
2016-06-30 17:26:18 +02:00
Iacopo Spalletti 4535135883 Fix test failure (#5457) 2016-06-30 17:23:24 +02:00
Vadim Sikora 841d8c64d7 Added minor improvements for Plugin initialization.
When _setAddPluginModal is called it was previously creating Modal
instances that weren't likely to be used until later, so now we
instantiate them on demand. This saves about 1-2 ms per plugin,
which doesn't seem like much, but makes a big difference on a page
with 450 plugins, there initialization went down by ~400ms.

Also caching some jQuery variables, and getting rid of unnecessary
loops helps to improve the speed as well.
2016-06-30 17:23:24 +02:00
Vadim Sikora 9ccb4d2637 Fixed dropdowns not showing up when user has limited permissions.
The dropdowns show up as a result of a combination of css classes
added to correct nodes. This functionality relies on having the
same amount of triggers and dropdowns on the page, since they are
referenced by their index and not by parent.
2016-06-30 17:21:47 +02:00
Daniele Procida b3eab693d1 Updated contribution documentation. (#5455)
* Added notes about 3.4 LTS version.
* Moved development policies documentation to a new page.
* Corrected commit-squashing example in the documentation.
2016-06-30 17:21:47 +02:00
Daniele Procida 599999d9ab Fixed broken references across the documentation (#5427)
In many places in the documentation, we have used references
of the form:

    :meth:`~cms.models.pluginmodel.CMSPlugin.copy_relations()`

to the referent:

    ..  class:: cms.models.pluginmodel.CMSPlugin

    [...]

        ..  method:: copy_relations()

Often, this has not been done correctly, with either the
directive or the role that links to it incorrectly formatted, and
the directive often simply missing.

This patch fixes 176 warnings across the documentation.
2016-06-30 17:21:47 +02:00
Iacopo Spalletti 5f61ea19d0 Edit code style 2016-06-30 17:21:47 +02:00
Iacopo Spalletti 841021afc1 We don't need placeholder permissions checking in view mode 2016-06-30 17:21:46 +02:00
Vadim Sikora 8c9f2af276 Merge pull request #5466 from vxsx/feature/static-cache-busting
Changed cache-busting implementation for static files
2016-06-30 10:16:31 +02:00
Vadim Sikora 6c41c31634 Changed cache-busting implementation for static files
Since 3.2.1 django CMS has used the ``GET`` parameter to reset the cache of its
static files. This doesn't play well with proxies, CDNs and so on.

This patch invalidates caching by changing the paths of static files instead.

The django CMS release process now requires additional steps to account for the
change (documented).
2016-06-29 16:56:55 +02:00
Angelo Dini 9485daf76f Merge pull request #5429 from vxsx/feature/no-markup-edit-mode
No-markup-edit-mode*
2016-06-29 10:05:59 +02:00
Vadim Sikora a4c141cf26 Changed rendering to no longer wrap a div around plugin contents
This essentially eliminates most of the rendering issues with extra
divs - carousels, lists etc.
2016-06-28 15:22:02 +02:00
Daniele Procida 7632db76ab Improved apphooks documentation. (#5399)
* Improved how_to/apphooks.
* Improved how_to/namespaced_apphooks.
* Corrected examples and docs to refer to get_urls() and get_menus()
  methods of CMSApp.
* Amended conf.py to read references from http://docs.djangoproject.com.
2016-06-22 16:53:18 +01:00
Martin Koistinen 8c1976e1c8 Fix failing tests (#5439)
* Updated test pattern to reflect recent changes in djangocms-link

* Disabled failing test

NOTE: This test will need to be re-created because the object of this test, djangocms-google-maps, no longer uses the Media class, which renders it useless for this otherwise novel test.

A ticket will be created to create a new version of this test that uses a test plugin built into the CMS.

* Adds a comment

* Fix flake issue

* One more?
2016-06-22 09:39:57 -04:00
Philipp Zedler aaf3654bb9 Corrected in docs: frontend_edit_template default value (#5438) 2016-06-21 07:55:19 +01:00
Paulo 7aadb310ba Merge pull request #5436 from czpython/fixes/3.3.x/5405
Fixes #5405 -- Let Django handle pickling
2016-06-20 11:51:26 -04:00
Iacopo Spalletti d65517e022 Merge pull request #5412 from yakky/feature/global_placeholder_conf
Implement four-level CMS_PLACEHOLDER_CONF
2016-06-20 17:43:37 +02:00
Paulo 2db956d0fa fixes #5405 -- Let Django handle pickling 2016-06-20 09:46:19 -04:00
Paulo ef906e95c1 adds tests for #5405 2016-06-20 09:44:50 -04:00
Daniele Procida a238849952 Merge pull request #5435 from k-funk/patch-3
Corrected example Class Name PollsApp -> PollsApphook
2016-06-20 12:57:58 +01:00
Iacopo Spalletti 74f5fa50ad Remove unneeded force_text 2016-06-20 13:55:06 +02:00
Kevin Funk 2d00b1f06f Corrected example Class Name PollsApp -> PollsApphook 2016-06-18 18:37:46 -07:00
Iacopo Spalletti 32fb17a9ed Add documentation 2016-06-18 19:40:05 +02:00
Iacopo Spalletti 74c0304f64 xRemove the pluggable parser and stick with the simplistic approach 2016-06-18 19:39:39 +02:00
Iacopo Spalletti 5461a59e97 Implement simpler parser but make it pluggable 2016-06-18 19:39:27 +02:00
Marco Federighi ff8515529d Restructure and extend CMS_PLACEHOLDER_CONF to handle regexp 2016-06-18 19:39:17 +02:00
Iacopo Spalletti efc74846a7 Implement four-level CMS_PLACEHOLDER_CONF 2016-06-18 19:39:10 +02:00
Paulo c0b79087a6 updates changelog [ci skip] 2016-06-18 11:27:54 -04:00
Paulo 1a83e97dad Merge pull request #5428 from czpython/fixes/3.3.x/5422
Fixed #5422 -- Check plugin permissions when deleting page or translation
2016-06-17 17:21:49 -04:00
Paulo 1186fb3f8a make sure to exclude the clipboard 2016-06-17 15:49:59 -04:00
Paulo 5336b672ed Fixed #5422 -- Check plugin permissions when deleting page or translation. 2016-06-17 14:22:20 -04:00
Paulo 5e671475c2 Fixed #5418 -- Check plugin permissions when clearing placeholder. 2016-06-17 13:43:44 -04:00
Paulo 79d707b706 Fixed #3414 -- Allow non-superusers to copy all plugins. 2016-06-17 13:43:25 -04:00
Daniele Procida 34e78f52fb Merge pull request #5426 from timgraham/contributing-link2
Fix link in CONTRIBUTING.rst
2016-06-17 16:15:31 +01:00
Tim Graham 54dc1b49c3 Fix link in CONTRIBUTING.rst 2016-06-17 10:27:26 -04:00
Angelo Dini 65ed1c7801 Merge pull request #5423 from itbabu/release/3.3.x
Fix #5391:  page tree dropdown menu text overflow
2016-06-17 11:26:20 +02:00
Marco Badan 8c4a0259b9 Fix #5391: page tree dropdown menu text overflow 2016-06-16 17:15:22 +02:00
Martin Koistinen a31fd37571 Changed default value for CMS_INTERNAL_IPS (#5409)
* Changed default value for CMS_INTERNAL_IPS

* Fix typos
2016-06-14 10:21:47 -04:00
Adam Chainz 39b5d6db06 Convert readthedocs links for their .org -> .io migration for hosted projects
As per [their blog post of the 27th April](https://blog.readthedocs.com/securing-subdomains/) ‘Securing subdomains’:

> Starting today, Read the Docs will start hosting projects from subdomains on the domain readthedocs.io, instead of on readthedocs.org. This change addresses some security concerns around site cookies while hosting user generated data on the same domain as our dashboard.

Test Plan: Manually visited all the links I’ve modified.
2016-06-14 10:13:52 -04:00
Daniele Procida b73c64cbb9 Merge pull request #5407 from k-funk/patch-4
docs:intro:apphooks: "next" section wasn't Third-Party Apps
2016-06-14 13:49:24 +01:00
Kevin Funk 328d20473f docs:intro:apphooks: "next" section wasn't Third-Party Apps 2016-06-13 13:45:06 -07:00
Paulo cb1409f723 Merge pull request #5396 from czpython/fixes/3.3.x/3547
forward port of #2212 to fix #3547
2016-06-13 10:31:22 -04:00
Paulo 2d0778c2bf forward port of #2212 to fix #3547 2016-06-10 20:11:57 -04:00
Gavin Wahl 93a43ba873 It's "Its", not "It's" 2016-06-10 14:47:32 -04:00
Paulo 5e845e1de3 updates changelog 2016-06-08 21:15:22 -04:00
Martin Koistinen 5fb33bf676 Update translations (#5389) 2016-06-08 18:49:10 -04:00
Paulo 225e3a23d0 Merge pull request #5385 from czpython/fixes/3.3/4599
Allow apphook endpoints to disable csrf checks
2016-06-08 16:48:06 -04:00
Paulo 64cb6f2e5f adds django migration for related name changes 2016-06-08 15:39:59 -04:00
Paulo ff1e668187 fixes #4599 2016-06-08 14:00:43 -04:00
Paulo ccfa8b7e65 adds test for #4599 2016-06-08 14:00:43 -04:00
Paulo f86c8f9d65 updates changelog 2016-06-08 13:37:15 -04:00
Paulo e40f84ec39 Merge pull request #5379 from mkoistinen/feature/improve_plugin_related_names
feature/improve plugin related names
2016-06-08 08:41:22 -04:00
Paulo 8255317bac flakes modification 2016-06-07 17:24:39 -04:00
Paulo 3dfc71dcc2 don't skip abstract classes 2016-06-07 17:15:34 -04:00
Paulo a2fb98b6ba adjust tests once more to reflect new behavior aligned with django multi-table inheritance 2016-06-07 17:15:22 -04:00
Paulo 871a16433f fixes regression introduced by pr. 2016-06-07 16:02:17 -04:00
Paulo ee836c4bd3 adds test for new regression introduced by this pr 2016-06-07 15:54:02 -04:00
Paulo 96a18245c9 adjust tests because the cms does not support subclassing concrete plugins 2016-06-07 15:53:48 -04:00
Piotr Jakimiak 75f8479c66 Fix #5371. Properly check parent_classes in get_child_classes 2016-06-07 09:29:28 -04:00
Paulo c1ef8c691d fixes bug in related_name 2016-06-06 18:22:14 -04:00
Paulo 8be925817b use rel. remote_field is in the future 2016-06-06 16:42:57 -04:00
Paulo 6c17d1b640 adds django fix backport 2016-06-06 16:27:13 -04:00
Iacopo Spalletti a506e66004 Add a test for related_name 2016-06-06 16:27:13 -04:00
Iacopo Spalletti 82f43d88b1 Tweak the related_name logic a bit 2016-06-06 16:27:13 -04:00
Martin Koistinen 2dc5d67f77 Explicitly set related_names for "internal" plugins 2016-06-06 16:25:58 -04:00
Martin Koistinen b6e4316fc7 Re-implement Yakky's fix, with improvements 2016-06-06 16:25:58 -04:00
Martin Koistinen dfe49744ca This was a long-standing bug, fixed! 2016-06-06 16:25:58 -04:00
Vadim Sikora 9c0e1c6403 Merge pull request #5375 from vxsx/bugfix/edit-move-plugins-that-have-no-dom
Fixed an issue where plugins with no DOM weren't editable.
2016-06-06 17:52:42 +02:00
Vadim Sikora 154e2dc718 Fixed an issue where plugins with no DOM weren't editable.
We relied on the data stored in the cms-plugin divs, now we rely on
data stored on cms-draggable divs for moving/editing.

Ref #5085
2016-06-06 17:52:12 +02:00
Vadim Sikora 7c8d197257 Merge pull request #5374 from divio/develop
Backport #5373
2016-06-06 14:00:51 +02:00
Vadim Sikora 5eeaa730eb Merge pull request #5373 from vxsx/feature/fix-plugins-that-require-widgets
Fix plugins that require widgets
2016-06-06 14:00:13 +02:00
Vadim Sikora 5f9d7a7626 Fixed errors with plugins that require widgets. 2016-06-06 12:37:57 +02:00
Vadim Sikora 9e727f314a Merge pull request #5370 from divio/develop
Backporting webpack bundling
2016-06-06 09:48:52 +02:00
Vadim Sikora 854a4c245d Merge pull request #5364 from vxsx/feature/webpack-bundling
Webpack
2016-06-06 09:47:47 +02:00
Vadim Sikora a44cf25d6d Changed JS bundling from simple concat to webpack based.
This enables smarter bundling, explicit dependencies, makes way for
future support for ES6, better libraries integration (e.g. jQuery
is no longer exposed to window, so no overlap with other libs).

This disables, however, the possibility for external apps to
directly use CMS modules, only the bundles (which is how it should
be).

However, for backwards compatibility cms.base has a typeof require
check for now.
2016-06-06 09:46:29 +02:00
Vadim Sikora 7b9ee2ab70 Merge pull request #5368 from divio/release/3.3.x
Forwardport #5367
2016-06-04 22:42:45 +02:00
Vadim Sikora 9d74faf3b6 Merge pull request #5367 from vxsx/bugfix/1password-conflict
Added a workaround for 1Password on firefox
2016-06-04 22:41:24 +02:00
Vadim Sikora 5bcb54a5fc Added a workaround for 1Password on firefox 2016-06-04 17:30:02 +02:00
Vadim Sikora a4e66596eb Merge pull request #5366 from divio/release/3.3.x
Forwardport #5360
2016-06-04 14:28:16 +02:00
Vadim Sikora cca826f8f1 Merge pull request #5360 from vxsx/bugfix/edit-form-response-error-handling
Fixed save error handling in the modal.
2016-06-04 14:27:26 +02:00
Vadim Sikora ac8c732cff Fixed save error handling in the modal.
Whenever form is submitted in the modal and the reponse returns
http error the cms assumed everything went correctly and closed the
modal thus not showing an error to an unsuspecting user. This
commit changes that and requires the non-error message to be there to
properly trigger closing of the modal in this case.

Same goes for the error that happens when iframe couldn't be loaded
at all, previously it was throwing DOM Exception and that DOM
exception was being displaying to the user. Now it shows the actual
error that is happening.

Ref: #3028, #3748
2016-06-04 12:27:59 +02:00
Vadim Sikora 8ebe2c3f50 Merge pull request #5365 from divio/release/3.3.x
forwardport #5356
2016-06-03 17:43:22 +02:00
Vadim Sikora bb8d9d6563 Merge pull request #5356 from genti94/click-on-sideframe-closes-toolbar-dropdown
Click on sideframe closes toolbar dropdown
2016-06-03 17:40:55 +02:00
genti94 e2b33a224f Fixed a bug when clicking inside of sideframe didn't close toolbar dropdown 2016-06-02 10:26:08 +02:00
Vadim Sikora 670a84223f Merge pull request #5359 from divio/release/3.3.x
Forwardport #5355
2016-06-02 09:31:32 +02:00
Vadim Sikora 35749d287e Merge pull request #5355 from vxsx/feature/inform-user-about-unsaved-changes
Added confirmation for reload/ESC when user has unsaved changes
2016-06-02 09:30:06 +02:00
Vadim Sikora fe8215646c Added confirmation for reload/ESC when user has unsaved changes
When content editor has unsaved changes and tries to leave the page
or presses ESC, CMS will now ask if user really wants to do that.

Ref: #3349
2016-06-02 09:29:02 +02:00
Martin Koistinen 0d3f3c182e Bump version to 3.3.0 2016-05-26 15:36:18 -04:00
Martin Koistinen 04907cf3dd Update changelog (with nothing…) 2016-05-26 15:35:24 -04:00
Martin Koistinen 2f27bbbbec Build statics 2016-05-26 15:25:28 -04:00
Martin Koistinen 7eebceebeb Update translations 2016-05-26 15:16:28 -04:00
Martin Koistinen 0e655fc9fc Bump to 3.3.0.rc4 2016-05-24 21:13:35 -04:00
Martin Koistinen 28f5628d5f Update changelog 2016-05-24 21:13:26 -04:00
Martin Koistinen 8e68505684 Update statics 2016-05-24 21:13:19 -04:00
Paulo eaed3e4b01 Merge pull request #5340 from czpython/fixes/3.3.x/5326
fixes regression in command options
2016-05-24 15:50:50 -04:00
Martin Koistinen 29f423c7f8 Delete stray colon =/ (#5341) 2016-05-24 15:32:14 -04:00
Paulo 587cdbdf46 fixes regression in command options 2016-05-24 12:11:50 -04:00
Vadim Sikora 895bdeac5a Merge pull request #5335 from vxsx/feature/extract-djangocms-casper-helpers
Extract djangocms casper helpers to a separate repo
2016-05-24 14:51:17 +02:00
Vadim Sikora 490c3781e5 Extracted djangocms-casper-helpers to a separate repo
Helpers will be used to test the addons, it makes more sense to
keep them there.

Ref: #5329
2016-05-24 14:50:53 +02:00
Vadim Sikora 8e9fe4a32a Merge pull request #5338 from vxsx/feature/plugin-save-loaders
Fixed a bug with loaders not being shown on plugin save
2016-05-24 14:49:35 +02:00
Vadim Sikora c089f633ef Fixed a bug with loaders not being shown on plugin save
In #5229 the bug was fixed that always shown loader even if page
was already loaded. This commit shows the loader if the subsequent
reload is required, which makes for better user experience.
2016-05-24 14:49:13 +02:00
Vadim Sikora ad0870e8ce Merge pull request #5339 from vxsx/feature/cache-bust-pagetree-requests
Added cachebusting to pagetree menu endpoints
2016-05-24 14:48:14 +02:00
Vadim Sikora 3b30a2fc1b Added cachebusting to pagetree menu endpoints
The issue was encountered when some browsers were caching the
output of `get-tree` endpoint which resulted in new pages created
by e.g. wizard not being shown in the pagetree.
2016-05-24 11:35:10 +02:00
Martin Koistinen 14e0dd735a Bump to 3.3.0.rc3 2016-05-23 21:06:26 -04:00
Martin Koistinen b6c5ee3ccf Update changelog, authors, release notes 2016-05-23 21:05:55 -04:00
Martin Koistinen 1cd9946b9c Re-pin django-treebeard to >=4.0.1 2016-05-23 21:05:43 -04:00
Martin Koistinen 6ee54ae2a7 Update locales 2016-05-23 20:55:57 -04:00
Martin Koistinen bf7b97d206 Remove unused sub-locales 2016-05-23 20:55:45 -04:00
WYSIATI 0574e63e0b Fix a typo in tutorial docs. (#5331) 2016-05-23 18:40:37 -04:00
Daniele Procida fd58d91224 Updated development-related documentation. (#5290)
* Updated contributor notes in README
* Updated list of core developers
* Updated branch policy
* Added commit and changelog policies
* Fixed some spelling and minor other issues
# Conflicts:
#	CHANGELOG.txt
2016-05-23 18:38:41 -04:00
Martin Koistinen 9b89513083 Check command fix (#5337)
* Fixes typo in check feedback

* Wrap lines to 120 chars
2016-05-23 18:33:18 -04:00
Paulo 7a947f30b7 Merge pull request #5333 from czpython/feature/publish-wizard-page-if-first
feature/publish wizard page if first
2016-05-23 17:40:25 -04:00
Paulo 457ae84b79 don't make query unless needed 2016-05-23 09:14:55 -04:00
Vadim Sikora e3dd8d8cbe Merge pull request #5329 from vxsx/feature/extract-integration-tests
Extract integration tests helpers
2016-05-23 14:56:09 +02:00
Paulo 6c00aa6da5 publish first page if created through wizard 2016-05-23 08:42:15 -04:00
Paulo 016dcb12f5 adds tests 2016-05-23 08:41:54 -04:00
Vadim Sikora def802a448 find path to phantomjs correctly 2016-05-23 11:49:07 +02:00
Vadim Sikora 9bc3ee3ad4 add possibility to specify own path to phantom and casper 2016-05-23 11:49:06 +02:00
Vadim Sikora 2909462d1f add package.json for djangocms-casper-helpers package 2016-05-23 11:49:06 +02:00
Vadim Sikora 7641ad9891 move helpers and gulp task to a package 2016-05-23 11:49:06 +02:00
Vadim Sikora a05d5beaec 755 -> 644 2016-05-23 11:49:06 +02:00
Vadim Sikora aacade0fd3 fix comment 2016-05-23 11:49:06 +02:00
Vadim Sikora 172d3235e7 add height in test_utils template for mobile devices 2016-05-23 11:49:06 +02:00
Vadim Sikora a6fa4337e9 move settings and helpers out 2016-05-23 11:49:06 +02:00
Vadim Sikora c27bea3f7d Merge pull request #5332 from vxsx/feature/pagetree-cleanup
Pagetree cleanup
2016-05-23 11:48:03 +02:00
Vadim Sikora c7e7b96fee compiled css files 2016-05-23 10:18:33 +02:00
Vadim Sikora 25d06245a1 fix multiple page icons in pagetree
page can be a root and an apphook, so we need to be sure that
multiple icons would look correct
2016-05-23 10:17:42 +02:00
Vadim Sikora d353b89717 fix checkbox and underline positioning in copy dialog 2016-05-23 10:15:45 +02:00
Vadim Sikora daae21c7dc reduce delay for tooltips from 2.5 to 1.5s 2016-05-23 10:15:23 +02:00
Vadim Sikora 05ba570131 Merge pull request #5327 from vxsx/bugfix/disallow-placeholder-plugin
disallow creating PlacholderPlugin
2016-05-20 20:07:58 +02:00
Vadim Sikora fc476cca69 disallow creating PlacholderPlugin 2016-05-20 17:47:31 +02:00
Martin Koistinen 82f2026077 Fixes merge issue in docs 2016-05-19 22:53:50 -04:00
Martin Koistinen 84a02b55c8 Merge branch 'release/3.3.0.rc2' into develop
# Conflicts:
#	CHANGELOG.txt
2016-05-19 22:37:59 -04:00
Martin Koistinen 25f80b63cf Update changelog and release notes 2016-05-19 22:34:10 -04:00
Martin Koistinen f886ac6021 Update statics 2016-05-19 22:33:59 -04:00
Martin Koistinen da7ba08c13 Update translation files 2016-05-19 22:33:52 -04:00
Martin Koistinen 71a2ae0f97 Clean-up 3.2.5 release
# Conflicts:
#	cms/__init__.py
#	docs/upgrade/3.2.5.rst
#	docs/upgrade/index.rst
2016-05-19 22:33:33 -04:00
Martin Koistinen f841dcc050 Merge 3.2.5 forward into develop (#5325)
* Fix #5004

* parse permission setting as a boolean

* respect permission settings when copying a page

* bundle

* update changelog

* Add missing permission name

* fixes issue #5107

* adds tests for 5107

* best to use the fresh instance

* Add south migration

* Fix requirements

* Skip failing test due to incompatible plugins

* Clarify database usage

* fixes #5140

* use the fresh instance once more

* improve small test

* describe scenario in _publisher_save_public

* don't assign variable if not used.. even for clarity..

* adapt page move integrity test

* Add migrations for revdesc test app

* Address security concerns in render_model* tags

* Updates per comments

* Better organise imports

* Remove unneeded code-paths

* use `html` instead of `text` method in the message open

modern browsers will use escaped version of the text, meaning
`&gt;script&lt;alert(1);&gt;/script&lt;` would actually render script
tag with an alert in the message

* Update docs to make it clearer what will happen with setting is removed

* Changelog entry

* Correct the fix in #5133

* Fix CSS class names for 3.2

* Missed a couple

* More classes fixes

* Add documentation on binary libraries

* Spelling

* Update bundle [ci skip]

* Renames conflicting migration, fixes dependencies

* whitespace/line-length

* Let CMS start with uninstalled apphook

* Removes unused import

* Update changelog

[ci-skip]

* Be defensive

BUT, its not entirely clear to me why when we KNOW this isn't an AppRegexURLResolver, we even trying to get a 'page_id' off it... been here for ages =/

* More defenisiveness

* Fix merge issue

* Updates changelog

* fixed toolbar placement when foundation is installed

* Forward port from 3.1

* Sanitize appconfig widget

* Further escaping for JS

* Update translations

* Update CHANGELOG, release notes and AUTHORS

* Update static files

* Bump to 3.2.4

* Add missing date in changelog

* fix packaging problem with wheel distribution

The 3.2.4 wheel uploaded to pypi had south migrations in the wrong
folder.

* Clean-up 3.2.5 release

* Removed doubled line from templatetags reference

* Added notes on using KiwiIRC web client

* Improved menu modifiers/page extension docs

* Improve index page

* Improved menu modifiers/page extension docs

[ci skip]

* Updated Board/Core developers lists

* Fixed numerous small documentation issues

* Fixed link to anchor in same document
* Fixed sentence
* cd into doc before pip
* Changed link to new Sphinx homepage
* Following once should be sufficient
* Removed formatting for code

* Implements CMS_WIZARD_CONTENT_PLACEHOLDER setting

* Adds supporting documentation

* Updates for comments

* More tweaks

* Updated tutorial, added new tutorial sections

* Spelling issues fixed

* Renames CMS_WIZARD* to CMS_PAGE_WIZARD*

* Tweak to release notes

* Typos

* Missed typo

* Rename dict

* Use elif

* Remove spelling issue

* add changelog entry

* Fixed old and inconsistent class name.

The tutorial used FaqConfig.
I guess NewsBlogConfig was used in previous versions of the tutorial.

* adds testcase for #5260

* adjust test

* fixes issue on page move and copy

* pin pyflakes

* make sure to decode the response

* Improved tutorial

* adjusts fix-tree test to test different query

* fixes #5291

* ofcourse they're not equal..

* adjusted test once more

* Remove unneeded South migrations

* Fix a doc. reference issue
2016-05-19 21:54:31 -04:00
Martin Koistinen 6ca461e271 Merge branch 'czpython-fixes/3.3.x/validate-title-on-advanced-settings' into develop
Manual merge.
2016-05-19 19:40:00 -04:00
Martin Koistinen 4519aabf25 Merge branch 'fixes/3.3.x/validate-title-on-advanced-settings' of https://github.com/czpython/django-cms into czpython-fixes/3.3.x/validate-title-on-advanced-settings 2016-05-19 19:39:20 -04:00
Paulo 723be4d1bf fixes #4617 2016-05-19 16:10:07 -04:00
Paulo 17b679096e tests for the advanced settings issue 2016-05-19 16:08:03 -04:00
Paulo 7763fc694f adjust tests to pass page instance 2016-05-19 13:18:48 -04:00
Vadim Sikora 5b900d7a6a Merge pull request #5323 from vxsx/bugfix/create-page-modal-title
remove target attribute from "new page" menu point
2016-05-19 18:48:35 +02:00
Vadim Sikora 25c832a585 Merge pull request #5322 from vxsx/feature/note-about-node
Added info about node version
2016-05-19 17:20:01 +02:00
Vadim Sikora 04b092dbd2 Merge pull request #5321 from vxsx/bugfix/pagetree-styles-ie10
fix padding on the search form in ie / edge
2016-05-19 17:18:31 +02:00
Vadim Sikora a1001f954c Merge pull request #5324 from vxsx/bugfix/lint-errors
Bugfix/lint errors
2016-05-19 17:17:41 +02:00
Vadim Sikora c09eb2455b fix linting errors 2016-05-19 17:15:55 +02:00
Vadim Sikora 832d60c774 fail on lint errors in CI correctly 2016-05-19 17:15:31 +02:00
Vadim Sikora a9d78277be whitespace [ci skip] 2016-05-19 16:59:57 +02:00
Vadim Sikora 9d96dd1880 remove target attribute from "new page" menu point
it was affecting the title of the "add page" modal
2016-05-19 16:55:17 +02:00
Vadim Sikora df6d217de6 add the article [ci skip] 2016-05-19 15:39:56 +02:00
Vadim Sikora 5f1bbffc1a add info about node version
also move js bundling section into the frontend, as it's not
strictly about syntax
2016-05-19 13:49:21 +02:00
Vadim Sikora 64d97bb5d1 Merge pull request #5320 from genti94/make-better-publish-page-error-message
Show a message to a user instead of throwing an error
2016-05-19 13:34:21 +02:00
Vadim Sikora 7d10c553b2 fix padding on the search form in ie / edge 2016-05-19 13:16:42 +02:00
Vadim Sikora 3fefa45278 Merge pull request #5319 from genti94/integration-test-sideframe-view-mobile
checks if sideframe is fullwidth on mobile
2016-05-19 13:09:54 +02:00
genti94 014566289d throws out a jqXHR error message 2016-05-19 10:50:30 +02:00
genti94 26c57f5426 remove emty line 2016-05-19 10:31:32 +02:00
genti94 edf6b26679 checks if sideframe is fullwidth on mobile 2016-05-19 10:29:46 +02:00
Paulo 66cf635820 fixes bug where users can create empty title/slug 2016-05-18 19:52:35 -04:00
Vadim Sikora 07f6e02ea3 Merge pull request #5300 from vxsx/feature/eslint-integration
Eslint integration
2016-05-18 20:45:42 +02:00
Vadim Sikora ead4211e38 fix linting 2016-05-18 20:38:58 +02:00
Vadim Sikora 15e37c7d68 Merge branch 'bugfix/clipboard-behaviour' into feature/eslint-integration
Conflicts:
	CHANGELOG.txt
	cms/static/cms/js/dist/bundle.toolbar.min.js
2016-05-18 20:37:19 +02:00
Vadim Sikora 53a90731a4 fix linting 2016-05-18 20:35:04 +02:00
Vadim Sikora 59a60a1162 Merge branch 'develop' into feature/eslint-integration 2016-05-18 20:34:21 +02:00
Vadim Sikora aa049342b5 Merge pull request #5316 from vxsx/bugfix/pagetree-without-admin-style
Pagetree without admin style
2016-05-18 20:32:01 +02:00
Vadim Sikora bfc6a40d05 Merge branch 'develop' into bugfix/clipboard-behaviour 2016-05-18 19:59:26 +02:00
Vadim Sikora f0e0388174 fix integration test 2016-05-18 19:56:27 +02:00
Paulo c1ae649c0a Merge pull request #5314 from czpython/fixes/rename-manager-to-renderer
rename MenuManager to MenuRenderer
2016-05-18 13:54:23 -04:00
Vadim Sikora 1f12c8115b fix pagetree styles for non djangocms-admin-style installations 2016-05-18 18:06:57 +02:00
Vadim Sikora 76406948b6 respect body classes used by others 2016-05-18 18:05:12 +02:00
Paulo 1cfe02bf8e Merge pull request #5309 from czpython/fixes/3.3.x/staticplaceholder-display
Fixes static placeholder display on admin
2016-05-18 10:45:12 -04:00
Paulo 7f9b870183 rename MenuManager to MenuRenderer 2016-05-18 10:32:00 -04:00
Paulo d347ebd7e8 Merge pull request #5308 from vstoykov/fix/5163
Move DEFAULT_X_FRAME_OPTIONS in cms.utils.conf
2016-05-18 09:58:47 -04:00
Vadim Sikora c50012a303 Merge branch 'develop' into bugfix/clipboard-behaviour
Conflicts:
	cms/static/cms/css/cms.base.css
	cms/static/cms/css/cms.pagetree.css
	cms/static/cms/js/dist/bundle.toolbar.min.js
2016-05-18 15:06:27 +02:00
Vadim Sikora 9f2ddabea6 bundle css 2016-05-18 15:02:10 +02:00
Vadim Sikora 887af7d410 Merge branch 'develop' into feature/eslint-integration
Conflicts:
	CHANGELOG.txt
	cms/static/cms/js/dist/bundle.admin.pagetree.min.js
	cms/static/cms/js/dist/bundle.toolbar.min.js
	cms/static/cms/js/modules/cms.toolbar.js
2016-05-18 14:35:35 +02:00
Vadim Sikora 3db5aac969 bundled js 2016-05-18 14:29:46 +02:00
Vadim Sikora 9cb5e0a5d8 Merge pull request #5243 from genti94/remove-hiding-clipboard-from-structureboard-hide
remove hiding clipboard-from structureboard hide
2016-05-18 14:26:39 +02:00
Vadim Sikora f7d5f059a6 Merge branch 'develop' into remove-hiding-clipboard-from-structureboard-hide 2016-05-18 14:26:26 +02:00
Vadim Sikora fa6afb0416 bundle css 2016-05-18 14:25:53 +02:00
Vadim Sikora 5414b4277d Merge pull request #5301 from genti94/reset-list-style-image
add list-style-image: none to .cms-reset ul
2016-05-18 14:25:29 +02:00
Vadim Sikora cda0cdfc1f Merge branch 'develop' into reset-list-style-image 2016-05-18 14:25:14 +02:00
Vadim Sikora eef3d2b583 Merge pull request #5302 from vxsx/bugfix/pagetree-styles
Pagetree styles bugs
2016-05-18 14:24:59 +02:00
Vadim Sikora dd8ee98901 Merge branch 'bugfix/pagetree-styles' of github.com:vxsx/django-cms into bugfix/pagetree-styles 2016-05-18 14:24:33 +02:00
Vadim Sikora 3b7dd879ee Merge branch 'develop' into bugfix/pagetree-styles
Conflicts:
	cms/static/cms/css/cms.base.css
	cms/static/cms/css/cms.pagetree.css
2016-05-18 14:23:58 +02:00
Vadim Sikora 513f69566d Merge pull request #5303 from genti94/screenblock-doesnt-resize
removes resize when there is a screenblock
2016-05-18 14:23:08 +02:00
Vadim Sikora 985ffd4e04 Merge branch 'develop' into reset-list-style-image 2016-05-18 14:17:02 +02:00
Vadim Sikora 6612f30646 Merge branch 'develop' into bugfix/pagetree-styles 2016-05-18 14:15:33 +02:00
Vadim Sikora c06a07ba8d Merge branch 'develop' into bugfix/clipboard-behaviour
Conflicts:
	CHANGELOG.txt
2016-05-18 14:12:08 +02:00
Daniele Procida 8ac4ade155 Merge pull request #5313 from evildmp/mkoistinen-feature/get_vary_on
Amended CHANGELOG to use verbs in past tense
2016-05-18 13:03:57 +01:00
evildmp b32cedb448 Amended CHANGELOG to use verbs in past tense 2016-05-18 13:03:10 +01:00
Vadim Sikora bcea844652 changelog 2016-05-18 10:33:53 +02:00
Vadim Sikora 792c871b80 bundled js 2016-05-18 10:33:53 +02:00
Vadim Sikora 1f4ff5c46a do not close other modals when clearing clipboard 2016-05-18 10:33:53 +02:00
Vadim Sikora bb53c24d92 disallow closing clipboard modal by esc 2016-05-18 10:33:53 +02:00
Vadim Sikora 29e4cd1921 add a possibility to disable "closing by esc" for modals 2016-05-18 10:33:52 +02:00
Vadim Sikora f6654e3448 disallow dragging into the clipboard 2016-05-18 10:33:52 +02:00
Paulo 5a13ca3557 adds tests 2016-05-17 18:11:53 -04:00
Paulo ffac805430 allows users to add static placeholder without name and edit it 2016-05-17 18:11:46 -04:00
Venelin Stoykov 115983aa75 Move DEFAULT_X_FRAME_OPTIONS in cms.utils.conf
- Make it possible to get DEFAULT_X_FRAME_OPTIONS with get_cms_settings.
- Use get_cms_setting('DEFAULT_X_FRAME_OPTIONS') in initial migration to prevent creating of new migration when change the value in project's settings (Fixes #5163)
2016-05-18 00:14:48 +03:00
Martin Koistinen d063c45bd0 Wizard settings (#5306)
* Implements CMS_WIZARD_CONTENT_PLACEHOLDER setting

# Conflicts:
#	CHANGELOG.txt
#	cms/utils/conf.py
#	docs/upgrade/index.rst

* Adds supporting documentation

* Updates for comments

* More tweaks

* Renames CMS_WIZARD* to CMS_PAGE_WIZARD*

# Conflicts:
#	cms/utils/conf.py
#	docs/reference/configuration.rst

* Tweak to release notes

* Typos

* Missed typo

* Rename dict

* Use elif

* Fix merge conflicts

* Adds missing upgrade docs
2016-05-17 17:12:03 -04:00
Iacopo Spalletti 9687281866 Merge pull request #5305 from yakky/feature/fix_travis_errors
Fix menu errors
2016-05-17 18:55:53 +02:00
genti94 51ac7a259d removed unused unit tests 2016-05-17 15:59:43 +02:00
genti94 22fedc2726 removed unused method 2016-05-17 15:31:08 +02:00
Iacopo Spalletti 54edd397e8 Fix incompatibility with 5299 2016-05-17 15:30:03 +02:00
genti94 442380da2c removes resize when there is a screenblock 2016-05-17 14:49:23 +02:00
Iacopo Spalletti ffeb2ebe9b Fix documentation for CMSApp 2016-05-17 14:12:13 +02:00
Vadim Sikora 5723b1417a fix typo 2016-05-17 13:38:45 +02:00
Vadim Sikora c6e3d313f8 fix bundle 2016-05-17 13:37:08 +02:00
Vadim Sikora 7f41a37b7f fix pagetree xpath helper 2016-05-17 13:18:44 +02:00
Vadim Sikora 42c578c9b8 fix props ordering [ci skip] 2016-05-17 13:05:34 +02:00
Vadim Sikora 6a9a9cf11f fix broken mobile view of pagetree [ci skip] 2016-05-17 12:06:43 +02:00
Vadim Sikora e687d76490 bundled files 2016-05-17 11:53:30 +02:00
Vadim Sikora afbcc48218 make sure that debug bar height is taken into account 2016-05-17 11:52:53 +02:00
Vadim Sikora caba0e0ec6 move heading into a cell
modal cuts h1 out, so pagetree header looks broken
2016-05-17 11:52:02 +02:00
Iacopo Spalletti 65e1f5982d Tentative fix for travis issues 2016-05-17 10:30:11 +02:00
Iacopo Spalletti e2444d1c9e remove branches lock 2016-05-17 10:30:11 +02:00
Vadim Sikora 3a25e72f23 fixes makeUrl and integration tests 2016-05-17 10:08:40 +02:00
genti94 1e04c8800e add list-style-image: none to .cms-reset ul 2016-05-17 09:51:51 +02:00
genti94 5356ba0d84 remove related test 2016-05-17 09:36:19 +02:00
genti94 75cd1ffdb8 Merge branch 'develop' into remove-hiding-clipboard-from-structureboard-hide 2016-05-17 09:09:57 +02:00
Vadim Sikora 53684432b2 Merge branch 'develop' into feature/eslint-integration
Conflicts:
	CHANGELOG.txt
2016-05-17 08:41:52 +02:00
Martin Koistinen 3e43260afc Fix test-requirements for now-moved sane-add-plugin branch of ckeditor 2016-05-16 23:38:21 -04:00
Martin Koistinen 42105563b2 Spelling 2016-05-16 23:38:01 -04:00
Martin Koistinen 53c181166d Bump to 3.3.0.rc2 2016-05-16 21:09:03 -04:00
Martin Koistinen 4514bc7538 Merge branch 'release/3.3.0.rc1' into develop 2016-05-16 21:00:56 -04:00
Martin Koistinen 473afaff61 Bump to 3.3.0.rc1 2016-05-16 20:58:24 -04:00
Martin Koistinen 3692982edf Update release notes, authors 2016-05-16 20:58:11 -04:00
Martin Koistinen 1d306e309f Update static files 2016-05-16 20:57:55 -04:00
Martin Koistinen b09cf10cfe Tiny change for translations 2016-05-16 20:57:46 -04:00
Martin Koistinen 34a02cb36e Update translations 2016-05-16 20:57:29 -04:00
Iacopo Spalletti 4e69677c94 Use a method to get CMSApp.urls, to allow passing a page object to it (#5080)
* Use a method to get CMSApp.urls, to allow passing a page object to it

* Backward compatible implementation

* Add generic kwargs to CMSApp.get_urls

* Use new API for CMSApp.menus too

* Add language argument to CMSApp.get_urls and CMSApp.get_menus

* Add documentation

* Add CMSApp documentation

* Add tests

* Ignore the menu nodes when we don't need them
2016-05-16 20:06:55 -04:00
Paulo 5a49914cb0 More fixes related to #5260 (#5294)
* adapts page move tests to be more aggresive

* fixes major corruption on tree when moving page

* more adjustments

* use target public page
2016-05-16 16:30:26 -04:00
Paulo 9bc0b945ee Fixes #5298 on 3.3 (#5299)
* refactor menus to have a request aware manager

* adjust cms_menus

* fixes #5298

* cleanup. no more __call__

* adjust tests

* a few more test adjustments

* more test adjustments

* fixes issue on menu attr

* final fixes

* cosmetics

* no longer tests for no context processor

* removed unused import

* add old menu pool methods for backwards compatibility

* adds more menu tests

* adds context processor check

* adjust tests for cms_settings check

* no more get_processors()

* fixes sekizai test

* address review comments

* strange issues on travis

* we really need to fix the test suite

* hopefully fixes apppool issue on tests
2016-05-16 16:27:28 -04:00
Paulo a542c00b55 updates upgrade notes [ci skip] 2016-05-16 15:53:14 -04:00
Paulo 125fa18353 updates changelog [ci skip] 2016-05-16 14:39:20 -04:00
Vadim Sikora 38076bf6c7 changelog 2016-05-16 18:39:30 +02:00
Vadim Sikora af8d18057b bundled files 2016-05-16 18:22:26 +02:00
Vadim Sikora df8c12fa96 fix linting errors in tests 2016-05-16 18:20:18 +02:00
Vadim Sikora ea9eeb89b1 fix linting errors in modules 2016-05-16 18:20:04 +02:00
Vadim Sikora 807bed5864 docs 2016-05-16 18:19:04 +02:00
Vadim Sikora 94202e9ad9 shrinkwrap 2016-05-16 18:18:35 +02:00
Vadim Sikora c8ee200ea8 add eslint 2016-05-16 18:18:24 +02:00
Vadim Sikora f931e532ec remove jshint and jscs 2016-05-16 18:18:04 +02:00
Paulo 663e3aedb6 Merge pull request #5295 from czpython/fixes/3.3.x/issue-5291
fixes #5291 on 3.3.x
2016-05-14 22:51:04 -04:00
Paulo 0e8e350362 adjusted test once more 2016-05-14 20:10:44 -04:00
Paulo d8d614c43e ofcourse they're not equal.. 2016-05-14 20:10:38 -04:00
Paulo b73159d89e fixes #5291 2016-05-14 20:10:31 -04:00
Paulo 5e9ffa88e9 adjusts fix-tree test to test different query 2016-05-14 20:10:11 -04:00
Paulo 35d4461424 Merge pull request #5269 from vxsx/feature/cache-template-fragments
Template rendering performance
2016-05-14 13:35:17 -04:00
Vadim Sikora 66fa773d36 Merge branch 'develop' into feature/cache-template-fragments 2016-05-14 18:11:45 +02:00
Vadim Sikora fda3fb5b6e fix for placeholders 2016-05-14 18:11:29 +02:00
Vadim Sikora 1ae673018b Merge branch 'feature/cache-template-fragments' of github.com:vxsx/django-cms into feature/cache-template-fragments 2016-05-14 17:00:08 +02:00
Vadim Sikora 196303fc44 bundled js 2016-05-14 16:59:34 +02:00
Vadim Sikora 7903a2ceb2 tests 2016-05-14 16:59:27 +02:00
Vadim Sikora 663a96a302 generate child classes on a placeholder basis
placeholder conf can mess things up
2016-05-14 16:58:57 +02:00
Paulo 24128f05d9 fixes child plugins not showing up 2016-05-14 10:44:56 -04:00
Vadim Sikora 5ad7231068 Merge branch 'feature/cache-template-fragments' of github.com:vxsx/django-cms into feature/cache-template-fragments 2016-05-14 16:30:26 +02:00
Vadim Sikora 6ef71c6223 placholderconf in testserver [ci skip] 2016-05-14 16:29:51 +02:00
Vadim Sikora e34b7ce4b5 bundled files 2016-05-14 16:29:38 +02:00
Vadim Sikora 9fc00ec77e different plugin child classes per placeholder 2016-05-14 16:29:19 +02:00
Paulo 29c9f81c1f you need a toolbar to test toolbar rendering 2016-05-14 10:24:50 -04:00
Vadim Sikora 48b09d1a02 Merge branch 'feature/cache-template-fragments' of github.com:vxsx/django-cms into feature/cache-template-fragments 2016-05-14 16:02:25 +02:00
Vadim Sikora f302a405c8 fix tests 2016-05-14 16:01:23 +02:00
Vadim Sikora c721416857 bundled files 2016-05-14 16:01:05 +02:00
Vadim Sikora cd29188494 make _getPossibleChildClasses non-lazy
event handlers were garbage collected after some time, led to bugs,
god bless integration tests
2016-05-14 16:00:25 +02:00
Paulo 30828ca791 adds back the conditional 2016-05-14 09:56:12 -04:00
Paulo 4f2ec2361b do plugin menu calculation in placeholder 2016-05-14 09:52:01 -04:00
Vadim Sikora 9b542f9a96 changelog 2016-05-14 14:06:17 +02:00
Vadim Sikora 11c7c296ff bundled files 2016-05-14 14:06:11 +02:00
Vadim Sikora c4ad6ff164 add tests for updateRegistry 2016-05-14 14:06:05 +02:00
Vadim Sikora 986c9c98d4 adapt the tests 2016-05-14 13:58:34 +02:00
Vadim Sikora bcec76482e add Array.prototype.findIndex polyfill 2016-05-14 13:58:08 +02:00
Vadim Sikora 221b4a9c94 recalculate breadcrumbs every time
fixes longstanding cms bug when after moving a plugin to a
different place the breadcrumbs were never updated
2016-05-14 13:56:50 +02:00
Vadim Sikora aad49da9da fix edit button on plugin dragitem 2016-05-14 13:56:10 +02:00
Vadim Sikora f8d9eee0a5 remove unnecessary cache tags 2016-05-14 13:55:25 +02:00
Iacopo Spalletti 4222e6521b Merge pull request #5270 from yakky/feature/pluginitem_attributes
Add generic PluginItem attributes
2016-05-14 10:36:53 +02:00
Vadim Sikora 3823bd9a3e Merge branch 'develop' into feature/cache-template-fragments
Conflicts:
	cms/static/cms/js/dist/bundle.toolbar.min.js
2016-05-14 08:08:20 +02:00
Iacopo Spalletti 7e42205e67 Merge branch 'develop' into feature/pluginitem_attributes 2016-05-14 07:18:35 +02:00
Martin Koistinen d8112542e5 Merge pull request #5268 from mkoistinen/feature/toolbar_refresh
Toolbar refresh
2016-05-14 01:04:40 -04:00
Martin Koistinen a2d77de0b6 Merge branch 'develop' into feature/toolbar_refresh 2016-05-13 21:42:32 -04:00
Martin Koistinen dc6c0c3ada Merge pull request #5197 from mkoistinen/feature/get_vary_on
Adds get_vary_cache_on() support and...
2016-05-13 19:32:02 -04:00
Martin Koistinen 87091763f6 Rebuild statics 2016-05-13 18:05:13 -04:00
Vadim Sikora 6a5aa6bffa bundled files 2016-05-13 18:03:06 -04:00
Vadim Sikora 4d6605cf90 remove background on disabled nodes 2016-05-13 18:02:41 -04:00
Vadim Sikora a234c260fc don't disable top-level nodes after hovering disabled one
in case of an apphook, the "Page" node might be disabled, but
when moving the mouse through it the handler for mouseenter
would be disabled, which is not desirable
2016-05-13 18:02:41 -04:00
Vadim Sikora f596f47dde remove unnecessary forced comment 2016-05-13 18:02:41 -04:00
Martin Koistinen f57763f652 Remove unused import 2016-05-13 18:02:41 -04:00
Martin Koistinen 32dc0416de Updates for review comments 2016-05-13 18:02:41 -04:00
Vadim Sikora 05a74b32bc fix page types test 2016-05-13 18:02:41 -04:00
Vadim Sikora 96cf04217c fix test for narrow screen 2016-05-13 18:02:41 -04:00
Vadim Sikora 040d62ed75 fix switchLanguage test 2016-05-13 18:02:41 -04:00
Martin Koistinen c894fd8568 Remove unused assigments 2016-05-13 18:02:41 -04:00
Martin Koistinen 02046aa3bf Toolbar updates 2016-05-13 18:02:41 -04:00
Martin Koistinen 20d55b882d Merge branch 'develop' into feature/get_vary_on 2016-05-13 18:01:49 -04:00
Paulo fdb1bdddf3 more test fixes 2016-05-13 16:40:16 -04:00
Paulo a529bc6a7a removed unused imports 2016-05-13 15:59:29 -04:00
Paulo 4823c8c27d Merge pull request #5287 from czpython/fixes/issue-5273
fixes/issue #5273
2016-05-13 15:51:50 -04:00
Paulo f589ebd3bb review adaptations 2016-05-13 13:51:15 -04:00
Vadim Sikora b8bc175c0f Merge branch 'develop' into feature/cache-template-fragments
Conflicts:
	cms/static/cms/js/dist/bundle.toolbar.min.js
2016-05-13 18:58:48 +02:00
Martin Koistinen 6f8e2808f1 Address comments from BE review 2016-05-13 12:58:25 -04:00
Paulo b26146a6a5 more cleanup 2016-05-13 12:14:30 -04:00
Vadim Sikora 8a83c7fe12 Merge branch 'feature/cache-template-fragments' of github.com:vxsx/django-cms into feature/cache-template-fragments 2016-05-13 18:06:43 +02:00
Vadim Sikora 28336c11ea bundled file 2016-05-13 18:06:05 +02:00
Vadim Sikora 1c12a37d8d rename method to more appropriate name 2016-05-13 18:05:51 +02:00
Vadim Sikora 4e7b680413 add tests for _getPluginChildClassesMarkup 2016-05-13 18:03:04 +02:00
Vadim Sikora c3a58ab14d move "actions" handler to a separate method
allows for reuse in the child plugins. also bound handler
eliminates the need for rebinding events
2016-05-13 18:02:09 +02:00
Vadim Sikora 0d66911647 remove unnecessary instance property 2016-05-13 18:01:30 +02:00
Paulo 16ab743563 cleanup toolbar processor 2016-05-13 11:16:17 -04:00
Martin Koistinen 365bc7efe8 Updates from documentation review
[ci skip]
2016-05-13 10:22:03 -04:00
Paulo bc6838c928 introduces toolbar cached templates 2016-05-13 10:13:50 -04:00
Vadim Sikora 6ef22cfc3c Merge pull request #5288 from vxsx/bugfix/toolbar-long-menus-flickering
toolbar long menus flickering
2016-05-13 14:24:59 +02:00
Vadim Sikora 641cd7f58e Merge pull request #5289 from vxsx/bugfix/pagetree-view-page-error
Pagetree view page error
2016-05-13 14:24:33 +02:00
Paulo f825fc1589 ajust comment 2016-05-13 06:52:09 -04:00
Paulo e33f13cb60 apply much dryer approach from Martin 2016-05-13 06:50:21 -04:00
Vadim Sikora 3eaf6d7ea5 small cleanup 2016-05-13 12:16:48 +02:00
Vadim Sikora 138f6cdb8e bundled files 2016-05-13 11:47:59 +02:00
Vadim Sikora 68d9397fd1 unit tests 2016-05-13 11:47:48 +02:00
Vadim Sikora 52154e20e7 update existing state, not override it completely
when leaving the pagetree to view page it was overriding the current
settings for the page completely (meaning if you had stored the data
about collapsed/expanded plugins in structureboard it was gone). now it
only extends the existing state
2016-05-13 11:46:19 +02:00
Vadim Sikora 5ef79c3acb fix comment 2016-05-13 11:46:06 +02:00
Vadim Sikora d5c694c019 move initializing collapsibles to a static method
cleaner this way, doesn't create unnecessary variable on a toolbar class
also defaults the states to empty array
2016-05-13 11:43:37 +02:00
Vadim Sikora 35f2c3968a Merge branch 'develop' into bugfix/toolbar-long-menus-flickering 2016-05-13 11:05:39 +02:00
Vadim Sikora 0e79ef36e7 Merge pull request #5286 from vxsx/feature/add-page-titles
Add page titles
2016-05-13 11:03:29 +02:00
Vadim Sikora 77765421d9 bundled files 2016-05-13 10:26:07 +02:00
Vadim Sikora 39163c9505 move cms-toolbar-non-sticky to html, rather than toolbar
removes flickering when html has "position: relative" set, simplifies js
code
2016-05-13 10:25:13 +02:00
Martin Koistinen 71961bceee Adds docs, release notes 2016-05-12 23:54:55 -04:00
Martin Koistinen 289f1cd89e Fix remaining issue 2016-05-12 20:35:12 -04:00
Paulo 830cdce93f fixes #5273. don't subclass form class. 2016-05-12 19:52:54 -04:00
Paulo 236233f39f use filter horizonal for testing 2016-05-12 19:52:13 -04:00
Paulo dbb03b38fe adds test for #5273 2016-05-12 19:51:59 -04:00
Paulo 12561c981e adjusted toolbar struct test.
The toolbar struct function has been refactored to only output
toolbar struct for the given plugins, no more plugin child classes
logic.
The new test (test_plugin_toolbar_struct) checks that the structure
remains the same.
2016-05-12 18:40:07 -04:00
Paulo 0b147cdf4e allows plugin subclasses to hook into the child classes logic 2016-05-12 18:35:23 -04:00
Paulo b2eacba153 misread the flag... naming things.. 2016-05-12 17:07:09 -04:00
Paulo a1fbc5b783 no longer need installed_plugins 2016-05-12 17:06:52 -04:00
Paulo 60cd72f428 cleaned up get_all_plugins to be more verbose 2016-05-12 16:57:49 -04:00
Paulo 38db3d4782 cosmetics change on placeholder toolbar rendering 2016-05-12 16:57:32 -04:00
Paulo ff59010256 cleaned up toolbar struct 2016-05-12 16:57:02 -04:00
Paulo 45b702f469 adjust get_child_classes to not return all plugins if no placeholder conf is found 2016-05-12 16:56:15 -04:00
Paulo f9fcc7cd84 child_plugin_classes were not used for some time 2016-05-12 16:55:32 -04:00
Paulo c7d590e0ef replace child plugin classes tag. 2016-05-12 16:55:08 -04:00
Martin Koistinen 6dd4a763ad Eliminate separate "placeholder page cache" 2016-05-12 16:54:29 -04:00
Martin Koistinen c6c82ae3db Address possible inadvertant recovery of old cache entries
If the PH cache_expiration changes to be shorter than before, and times out, we don't want to inadvertently recover the old which happens to have a version of 1.
2016-05-12 12:42:28 -04:00
Vadim Sikora 047633d7a3 rename "Add page" to "New page" / "New sub page" 2016-05-12 18:15:16 +02:00
Vadim Sikora 1b580b8b49 rename "Add child" to "New sub page" 2016-05-12 18:14:54 +02:00
Vadim Sikora f468744536 show loader when submitting modal form 2016-05-12 17:30:01 +02:00
Vadim Sikora 82bf224b6a Merge pull request #5279 from vxsx/bugfix/restore-reset-filter
restore "reset filter" in pagetree
2016-05-12 15:27:59 +02:00
Paulo fe7ddd64de Merge branch 'feature/cache-template-fragments' of github.com:vxsx/django-cms into feature/cache-template-fragments 2016-05-12 08:48:32 -04:00
Paulo 36c60ae5cd Merge pull request #5277 from czpython/fixes/33/issue-5260
Fixes issue #5260
2016-05-12 08:23:55 -04:00
Vadim Sikora eb8fe7568e remove unnecessary unit [ci skip] 2016-05-12 11:43:28 +02:00
Vadim Sikora 2306862437 restore "reset filter" in pagetree 2016-05-12 11:34:21 +02:00
Vadim Sikora 80228e35f2 rm templates cache duration from testserver [ci skip] 2016-05-12 11:15:51 +02:00
Vadim Sikora 3e1ad36a8c tests for _getPluginBreadcrumbs 2016-05-12 11:12:14 +02:00
Vadim Sikora 7d2ea1e51f fix failing unit tests 2016-05-12 10:49:30 +02:00
Vadim Sikora 2d40fa4a9e resolve possible child plugins in js
still experimental
2016-05-12 10:33:54 +02:00
Vadim Sikora e2769f3563 bundle 2016-05-12 10:33:20 +02:00
Vadim Sikora fba7307e68 simplify breadcrumbs resolving a bit 2016-05-12 10:32:09 +02:00
Iacopo Spalletti 56dbaa3849 Add docs 2016-05-12 06:46:09 +02:00
Iacopo Spalletti c574e8066b Add test 2016-05-12 06:46:09 +02:00
Iacopo Spalletti ebcd68c35b PoC for PluginItem attributes 2016-05-12 06:46:09 +02:00
Paulo 9187588aa2 make sure to decode the response 2016-05-11 23:24:46 -04:00
Paulo 61f05be884 fixes issue on page move and copy 2016-05-11 23:24:32 -04:00
Paulo b1436d9352 adjust test 2016-05-11 23:24:24 -04:00
Paulo 361499f167 adds testcase for #5260 2016-05-11 23:24:16 -04:00
Martin Koistinen 603a2fa0ca Address a theoretical situation where old cache...
... entries could be inadvertently recovered.
2016-05-11 18:35:28 -04:00
Martin Koistinen a9e766b3d6 Fixes issue where a ph is cached w/wrong duration 2016-05-11 17:55:15 -04:00
Paulo 70cf343fde optimze some template lookups 2016-05-11 16:44:52 -04:00
Paulo 521689920d remove caching on dragitem. @vxsx let's talk about this 2016-05-11 14:40:40 -04:00
Paulo 5d509ea7a3 don't cache on toolbar. no queries are made here 2016-05-11 14:18:57 -04:00
Paulo d479a12e9e use get_cache_durations() 2016-05-11 13:27:03 -04:00
Paulo 570a079ab8 use the correct tag 2016-05-11 13:23:35 -04:00
Paulo 5cbe72928a allow getting toolbar struct for all plugins 2016-05-11 13:04:21 -04:00
Vadim Sikora 3589ad76f6 Merge branch 'feature/cache-template-fragments' of github.com:vxsx/django-cms into feature/cache-template-fragments 2016-05-11 17:36:49 +02:00
Vadim Sikora 931189dd22 lazily resolve plugin breadcrumbs 2016-05-11 17:35:41 +02:00
Vadim Sikora 7c297f315d Merge branch 'develop' into feature/cache-template-fragments 2016-05-11 15:49:23 +02:00
Vadim Sikora ca8be5306d Merge pull request #5265 from vxsx/feature/publishing-loading-indicator
Publishing loading indicator
2016-05-11 15:40:13 +02:00
Martin Koistinen 98e211c879 Initial commit 2016-05-11 08:54:33 -04:00
Vadim Sikora 616144e994 Merge branch 'develop' into feature/publishing-loading-indicator 2016-05-11 11:55:53 +02:00
Vadim Sikora 2e53fea374 Merge pull request #5264 from vxsx/feature/sideframe-history-design
sideframe controls
2016-05-11 11:55:36 +02:00
Vadim Sikora 5e83a46776 Merge pull request #5266 from vxsx/feature/login-error
highlight both username in password if login error
2016-05-11 11:54:15 +02:00
Vadim Sikora 20d9bb04fd fix integration test 2016-05-11 11:48:01 +02:00
Vadim Sikora 3dab77b6c1 use a setting 2016-05-11 11:40:26 +02:00
Vadim Sikora 7f46d4dceb cache static toolbar parts 2016-05-10 18:02:30 +02:00
Vadim Sikora 89dc431fac cache structureboard plugin parts 2016-05-10 18:02:15 +02:00
Vadim Sikora 8e91daffe4 fix incorrect condition 2016-05-10 10:31:00 +02:00
Vadim Sikora 0a29772cf1 highliht both username in password if login error 2016-05-10 10:28:20 +02:00
Vadim Sikora 402c6a1aa7 bundled file 2016-05-10 10:17:39 +02:00
Vadim Sikora 0f893f4ff2 reduce initialization timeout in structureboard; 2016-05-10 10:17:33 +02:00
Vadim Sikora 055b971653 show loader on publishing 2016-05-10 10:16:21 +02:00
Vadim Sikora 6436be1dd4 styles 2016-05-10 08:54:30 +02:00
Vadim Sikora cc31be3780 add additional wrapper around sideframe controls 2016-05-10 08:54:24 +02:00
Vadim Sikora 0c482a9bfe Merge pull request #5254 from vxsx/feature/fix-failing-tests
fix failing tests
2016-05-10 08:34:35 +02:00
Vadim Sikora 2f197b6a37 fix failing tests 2016-05-06 18:31:38 +02:00
Vadim Sikora f4c46747ca Merge pull request #5253 from vxsx/feature/remove-deprecated-structure-mode
Remove deprecated structure mode
2016-05-06 16:29:21 +02:00
Vadim Sikora 4bb3c00daf Merge branch 'develop' into feature/remove-deprecated-structure-mode [ci skip]
Conflicts:
	CHANGELOG.txt
	cms/static/cms/css/cms.base.css
2016-05-06 16:28:43 +02:00
Vadim Sikora bf1f4379f4 Merge pull request #5252 from vxsx/feature/fixed-headers
Fixed language headers
2016-05-06 16:05:31 +02:00
Vadim Sikora 266586a86c Merge branch 'develop' into feature/fixed-headers 2016-05-06 16:04:55 +02:00
Vadim Sikora 93b25a9f35 Merge pull request #5245 from vxsx/feature/pagetree-header-alignments
Pagetree header alignments
2016-05-06 16:04:45 +02:00
Vadim Sikora 1d726e9196 Merge branch 'develop' into feature/pagetree-header-alignments 2016-05-06 16:03:59 +02:00
Vadim Sikora 56632974ca Merge pull request #5242 from vxsx/feature/language-headers
Language headers
2016-05-06 16:03:49 +02:00
Vadim Sikora 6d3877f63d Merge branch 'develop' into feature/language-headers 2016-05-06 16:02:44 +02:00
Vadim Sikora 3f2e7c14e1 fix docs 2016-05-06 15:12:44 +02:00
Vadim Sikora c8ed67c673 fix merge bug 2016-05-06 14:51:31 +02:00
Vadim Sikora f516c770d3 Merge branch 'develop' into feature/remove-deprecated-structure-mode
Conflicts:
	cms/static/cms/js/dist/bundle.toolbar.min.js
	cms/static/cms/js/modules/cms.structureboard.js
2016-05-06 14:42:04 +02:00
Vadim Sikora f56178bda7 pin pyflakes 2016-05-06 14:39:40 +02:00
Vadim Sikora 1e1199d7dd bundled files 2016-05-06 14:10:29 +02:00
Vadim Sikora 2db2f98c55 docs and changelog 2016-05-06 14:10:18 +02:00
Vadim Sikora 485aba1de0 fix tests 2016-05-06 14:09:26 +02:00
Vadim Sikora 14e127c478 remove references to simple/dynamic structureboard from css 2016-05-06 14:09:08 +02:00
Vadim Sikora 6e571570bd remove unnecessary initialization timeout, since _resizeBoard can no longer be present 2016-05-06 14:08:21 +02:00
Vadim Sikora f69b2d277a remove handling of the options from js 2016-05-06 14:07:25 +02:00
Vadim Sikora 36fef976a7 remove the setting from source and template 2016-05-06 14:06:12 +02:00
Vadim Sikora 8ddabe2996 Merge branch 'feature/pagetree-header-alignments' into feature/fixed-headers 2016-05-06 10:34:57 +02:00
Vadim Sikora e48d54c06e Merge pull request #5241 from genti94/fixes-resize-when-two-jquery-are-installed
Trigger native resize event instead of CMS.jQuery when hiding structureboard
2016-05-06 10:11:16 +02:00
Vadim Sikora 2964d686a5 Merge branch 'feature/language-headers' into feature/pagetree-header-alignments 2016-05-05 08:32:25 +02:00
Vadim Sikora c8a245f80a add bundled files 2016-05-04 18:47:24 +02:00
Vadim Sikora 80923fc00e fix highlighted items in dropdowns 2016-05-04 18:47:16 +02:00
Vadim Sikora 3f8982d7fd fix dropdowns positioning 2016-05-04 18:47:02 +02:00
Vadim Sikora 8974cbb946 remove dropdown headers where they are not required 2016-05-04 18:46:34 +02:00
Vadim Sikora be60a6274f comment and bundle 2016-05-04 18:15:27 +02:00
Vadim Sikora b5e7614c7a add tests for sticky header 2016-05-04 18:15:00 +02:00
Vadim Sikora dd6cd73e67 minified 2016-05-04 13:36:07 +02:00
Vadim Sikora 5d609fbe16 build 2016-05-04 13:36:01 +02:00
Vadim Sikora 5cecb0e2b9 implement sticky headers 2016-05-04 11:59:52 +02:00
Vadim Sikora 9250f16fa4 styles 2016-05-04 11:59:38 +02:00
genti94 c674c9ce66 Merge branch 'develop' into remove-hiding-clipboard-from-structureboard-hide 2016-05-04 09:51:18 +02:00
Vadim Sikora 6442660981 Merge branch 'develop' into feature/language-headers
Conflicts:
	CHANGELOG.txt
2016-05-04 09:03:53 +02:00
Vadim Sikora 81c4f711a6 change comment 2016-05-04 09:02:27 +02:00
Vadim Sikora fc98280aef use UI language 2016-05-03 17:37:11 +02:00
Vadim Sikora f5b346fdc0 Revert "fix the publish/unpublish integration test"
This reverts commit 86f946a91c.
2016-05-03 17:37:01 +02:00
Martin Koistinen 94ecf8d94c Merge branch 'feature/more_resilient_apphooks_33' into develop 2016-05-03 10:51:15 -04:00
Vadim Sikora f6df937611 minor dropdown fix 2016-05-03 16:43:35 +02:00
Daniele Procida 69f6ffc7d3 Merge pull request #5164 from romolox/docs_title_extension_template
Describe how to access to a title extension from a template
2016-05-03 15:40:06 +01:00
Vadim Sikora 3453eb8888 pagetree header mobile 2016-05-03 16:32:08 +02:00
Martin Koistinen 9e593f3e3d Merge docs 2016-05-03 10:27:49 -04:00
Martin Koistinen c218edca83 Fix merge issue 2016-05-03 10:27:30 -04:00
Martin Koistinen fdc3d74460 More defenisiveness 2016-05-03 10:27:24 -04:00
Martin Koistinen 4afb8c1910 Be defensive
BUT, its not entirely clear to me why when we KNOW this isn't an AppRegexURLResolver, we even trying to get a 'page_id' off it... been here for ages =/
2016-05-03 10:27:17 -04:00
Martin Koistinen 00974c3a08 Update changelog
[ci-skip]

# Conflicts:
#	CHANGELOG.txt
2016-05-03 10:24:48 -04:00
Vadim Sikora 87cd098949 align header
restructures the header items for easier alignment when search is open,
fixes box-shadow issues
2016-05-03 16:21:50 +02:00
Martin Koistinen ae88267218 Update changelog
[ci-skip]

# Conflicts:
#	CHANGELOG.txt
2016-05-03 10:21:35 -04:00
Martin Koistinen 3b6b2f681e Removes unused import 2016-05-03 10:20:19 -04:00
Martin Koistinen db11f0bc7c Let CMS start with uninstalled apphook 2016-05-03 10:20:15 -04:00
Martin Koistinen 17656af97a whitespace/line-length 2016-05-03 10:20:10 -04:00
Daniele Procida 67017cb13c Merge pull request #5238 from Eraldo/patch-5
Added missing word.
2016-05-03 15:16:32 +01:00
Daniele Procida 40db33851c Merge pull request #5240 from Eraldo/patch-7
Added plural 's'.
2016-05-03 15:15:48 +01:00
Daniele Procida fb2bb873e4 Merge pull request #5239 from Eraldo/patch-6
Added plural 's'.
2016-05-03 15:14:00 +01:00
genti94 e4f0179e2d remove hiding clipboard-from structureboard hide 2016-05-03 15:40:36 +02:00
Vadim Sikora 86f946a91c fix the publish/unpublish integration test 2016-05-03 13:58:05 +02:00
genti94 9fc12d6a03 remove empty lines [ci skip] 2016-05-03 13:41:21 +02:00
Vadim Sikora db97913c2c changelog [ci skip] 2016-05-03 11:49:28 +02:00
Vadim Sikora 59f4223414 fix for non-existent language + fixed tests 2016-05-03 11:48:31 +02:00
genti94 e44a55fb69 added unit test 2016-05-03 10:48:59 +02:00
Vadim Sikora 2555f2d899 add a hack so django redirects with language get param after saving a page 2016-05-02 18:05:31 +02:00
Vadim Sikora 17fb80ad08 style links 2016-05-02 18:04:54 +02:00
Vadim Sikora 856eb349a4 use preview languages 2016-05-02 18:04:42 +02:00
genti94 1e7f1c89b8 Merge branch 'develop' into fixes-resize-when-two-jquery-are-installed 2016-05-02 16:03:35 +02:00
genti94 1cd39111b1 fixes resizing when two jQuery are installed 2016-05-02 16:00:04 +02:00
Eraldo Energy 9cec002a95 Added plural 's'. 2016-04-30 23:12:05 +02:00
Eraldo Energy c549279d46 Added plural 's'. 2016-04-30 23:10:24 +02:00
Eraldo Energy c62f8e71c1 Added missing word. 2016-04-30 22:38:17 +02:00
Vadim Sikora e904463cff Merge pull request #5235 from vxsx/bugfix/fix-sideframe-breakpoint
fix sideframe breakpoint
2016-04-30 10:37:28 +02:00
Vadim Sikora 5ec8476d01 update integration test 2016-04-30 08:48:45 +02:00
Vadim Sikora 03ec3a61b6 default sideframe width 95% 2016-04-30 08:47:33 +02:00
Vadim Sikora 90f9d9534c bundle css 2016-04-29 15:59:31 +02:00
Vadim Sikora f5a200e08b make sure that breakpoint is correct 2016-04-29 15:59:23 +02:00
Vadim Sikora 44ca697bde Merge pull request #5176 from vxsx/bugfix/3.3-modal-mark-safe
use `html` instead of `text` method in the message open
2016-04-29 14:09:55 +02:00
Vadim Sikora ecc5bdb8f6 Merge branch 'develop' into bugfix/3.3-modal-mark-safe
Conflicts:
	cms/static/cms/js/dist/bundle.toolbar.min.js
2016-04-29 10:19:32 +02:00
Vadim Sikora 0bdb06a1c7 Merge pull request #5232 from vxsx/feature/copy-paste-mechanism
new copy/paste mechanism
2016-04-29 10:06:48 +02:00
Vadim Sikora 9655b04e19 remove misleading comment [ci skip] 2016-04-29 10:06:25 +02:00
Vadim Sikora 763513d96f fix layout bug in safari [ci skip]
Conflicts:
	cms/static/cms/css/cms.pagetree.css
2016-04-29 09:15:55 +02:00
Vadim Sikora 442924cf7e Merge branch 'develop' into feature/copy-paste-mechanism [ci skip]
Conflicts:
	cms/static/cms/css/cms.base.css
2016-04-29 09:10:02 +02:00
Vadim Sikora 4d473b6fca Merge pull request #5229 from genti94/hide-loader-when-user-doesnt-have-permission
removes class cms-loader when cms-admin & cms-admin-modal have been added
2016-04-29 09:08:22 +02:00
Vadim Sikora cba1c98747 bundled files 2016-04-28 20:16:24 +02:00
Vadim Sikora 70d3c56f9c unit tests 2016-04-28 20:16:15 +02:00
Vadim Sikora dafbc0bcc0 fix edge case when pasting
the paste helpers could be enabled if in the middle of pasting
`after_node` event would be triggered
2016-04-28 19:55:19 +02:00
Vadim Sikora 34734e9b43 reset origin to null for consistency 2016-04-28 19:46:05 +02:00
Vadim Sikora 6b1939c2d2 update integration tests 2016-04-28 19:45:44 +02:00
Vadim Sikora e7e3409d94 remove the css that is no longer required 2016-04-28 19:43:28 +02:00
Vadim Sikora dc39f59874 set the data-id on the root node 2016-04-28 19:43:09 +02:00
Vadim Sikora 74f8c4f436 fix the fixture 2016-04-28 19:42:30 +02:00
Vadim Sikora 7d238c40f3 fix an error with empty tree 2016-04-28 16:16:23 +02:00
genti94 a9a32f10bb gulp sass bundle 2016-04-28 16:00:50 +02:00
genti94 8e1d09f181 added cms.base.css 2016-04-28 15:56:00 +02:00
genti94 3d2184388e Merge branch 'develop' into hide-loader-when-user-doesnt-have-permission 2016-04-28 15:53:15 +02:00
Vadim Sikora c317ebbbd5 remove unused tests 2016-04-28 15:44:05 +02:00
Vadim Sikora a0f8b32970 fix copy permissions dialog 2016-04-28 15:43:26 +02:00
Vadim Sikora 3fcdd77a5d Merge branch 'develop' into feature/copy-paste-mechanism 2016-04-28 15:35:23 +02:00
Vadim Sikora 5510851c50 Merge pull request #5224 from genti94/bugfix/dialog-layout-fix
fixes missing border under copy permissions & buttons placement
2016-04-28 15:35:05 +02:00
Vadim Sikora a7341282ce Merge branch 'develop' into feature/copy-paste-mechanism 2016-04-28 15:33:48 +02:00
Vadim Sikora 19fd73c088 bundled files 2016-04-28 15:33:26 +02:00
Vadim Sikora b9d1926ae2 unit tests 2016-04-28 15:33:21 +02:00
Vadim Sikora eebb8ce757 use different paste buttons in js 2016-04-28 15:33:15 +02:00
Vadim Sikora 3fda5a9ebb add disabled state 2016-04-28 15:32:46 +02:00
Vadim Sikora 2cccd0cd6f move buttons 2016-04-28 15:32:36 +02:00
genti94 2e4874b50a removes class cms-loader when cms-admin & cms-admin-modal have been added 2016-04-28 11:01:50 +02:00
Vadim Sikora a10096e318 Merge pull request #5225 from genti94/feature/test-copy-page-with-apphook
copy apphook page
2016-04-28 10:37:55 +02:00
Vadim Sikora b9253d5d12 Merge pull request #5223 from vxsx/bugfix/sideframe-unnecessary-reloads
Fix sideframe unnecessary reloads
2016-04-28 09:23:24 +02:00
Gentian Mazrekaj ac60e305cb Merge pull request #5228 from genti94/docs-frontend-tests-fix
fixning the command to install requirements for Integration tests
2016-04-28 09:12:28 +02:00
genti94 b77a51283d fixning the command to install requirements 2016-04-28 09:08:25 +02:00
genti94 2d8e1427df copy apphook page 2016-04-27 14:38:20 +02:00
genti94 4117f80c83 changed padding number with a variable again 2016-04-27 11:46:53 +02:00
genti94 2f716f3f98 changed padding number with a variable 2016-04-27 11:36:19 +02:00
genti94 90502d9df8 Merge branch 'develop' into bugfix/dialog-layout-fix 2016-04-27 10:59:55 +02:00
genti94 9408469d82 fixes missing border under copy permissions & buttons placement 2016-04-27 10:47:31 +02:00
Vadim Sikora d3626a1d82 changelog 2016-04-27 10:17:47 +02:00
Vadim Sikora 33148f1e09 bundled js 2016-04-27 10:17:41 +02:00
Vadim Sikora 24d2579bc7 unit tests 2016-04-27 10:17:31 +02:00
Vadim Sikora 08832a73a7 remove reload if nothing matches from reloadBrowser
essentially this reverts the change introduced in
https://github.com/divio/django-cms/pull/4965 because that change
introduced unnecessary reloads at times when it wasn't required, such as
closing the pagetree sideframe if nothing changed etc.
2016-04-27 10:15:35 +02:00
Vadim Sikora bbf3ec89e2 Merge pull request #5218 from vxsx/feature/pagetree-tooltip-and-ui-fixes
Add real tooltips to pagetree
2016-04-27 10:12:17 +02:00
Vadim Sikora c57afbf592 increase wait timeout in casperjs tests 2016-04-27 08:50:19 +02:00
Martin Koistinen 061be05e27 Merge pull request #5213 from mkoistinen/feature/sanitize_appconfig_widget_33
Sanitize AppConfig Widget (forward port from 3.2)
2016-04-26 10:25:16 -04:00
Martin Koistinen 137c65fe76 Merge pull request #5217 from Eraldo/patch-3
Fixed a typo.
2016-04-26 09:29:55 -04:00
Martin Koistinen 44fa955fb9 Further escaping for JS 2016-04-26 09:24:35 -04:00
Eraldo Energy dcc853515c Fixed documentation: typo and missing word (#5216)
* Fixed a typo.

`and the **Publish** it` => `and then **Publish** it`

* Added contributor.

* Added missing word.

`requires a server restart so should` => `requires a server restart so it should`
2016-04-26 10:50:32 +01:00
Vadim Sikora 2d7701ed89 bundle styles 2016-04-26 10:49:03 +02:00
Vadim Sikora 3f67dfe124 modify TreePublishRow markup to include tooltip 2016-04-26 10:48:53 +02:00
Vadim Sikora 230a12270c move dropdowns out the tree, fix title of the dropdown 2016-04-26 10:48:32 +02:00
Vadim Sikora 7218a7339f add tooltips to markup 2016-04-26 10:48:00 +02:00
Vadim Sikora f26e8f0fc6 remove unnecessary styles from "view on site" label, use sr-only instead 2016-04-26 10:47:34 +02:00
Vadim Sikora 5e849843ff add tooltips to pagetree 2016-04-26 10:46:13 +02:00
Vadim Sikora b2cc92a90b add modal specific classes to wizard
usually they are added by CMS.Modal instance when the iframe loads,
but in some cases it happens a bit late because of latency, so the user
can see the original admin ui, this avoids the issue
2016-04-26 10:44:33 +02:00
Vadim Sikora a2991fec12 wait more on tests 2016-04-26 10:44:16 +02:00
Eraldo Energy e70b3be713 Fixed a typo.
`a now poll` => `a new poll`
2016-04-26 10:35:10 +02:00
Angelo Dini 3e44808851 Merge pull request #5209 from mkoistinen/feature/sanitize_pagefield_output_33
Sanitize PageField Output (forward port from 3.2)
2016-04-26 10:26:29 +02:00
Vadim Sikora 4aaa3d01ea Merge pull request #5204 from vxsx/feature/disable-sideframe-resizing
Disable sideframe resizing
2016-04-26 09:19:23 +02:00
Vadim Sikora 69ca95f39f Merge pull request #5205 from vxsx/bugfix/view-page-fixes
View page fixes
2016-04-26 09:18:46 +02:00
Martin Koistinen 8c9b77faac Sanitize appconfig widget (forward port from 3.2) 2016-04-25 20:58:34 -04:00
Martin Koistinen dad44c3286 Sanitize PageField Output (forward port from 3.2) 2016-04-25 18:57:55 -04:00
Vadim Sikora 9c0de10dd3 close the sideframe also when previewing a language page 2016-04-25 17:24:51 +02:00
Vadim Sikora c57b4e825f remove view on site from menu 2016-04-25 17:24:38 +02:00
Vadim Sikora 5b9a99ed47 CHANGELOG.txt [ci skip] 2016-04-25 16:52:59 +02:00
Vadim Sikora 8d29a44576 Merge branch 'develop' into feature/disable-sideframe-resizing
Conflicts:
	cms/static/cms/css/cms.base.css
2016-04-25 16:50:01 +02:00
Vadim Sikora 3c32f8f64b add bundled files 2016-04-25 16:20:20 +02:00
Vadim Sikora 86d0decacf fix integration test 2016-04-25 16:20:15 +02:00
Vadim Sikora 33882e3b22 fix unit tests 2016-04-25 16:19:19 +02:00
Vadim Sikora 8b2a3d2b6f make sideframe fullwidth on small screens 2016-04-25 16:19:03 +02:00
Vadim Sikora 769686867a remove the possibility to resize sideframe 2016-04-25 16:18:30 +02:00
Vadim Sikora e867c2c8ec Merge pull request #5202 from divio/bugfix/foundation-login-toolbar-fix
fixed toolbar placement when foundation is installed
2016-04-25 15:03:00 +02:00
genti94 29911c2d81 fixed toolbar placement when fountation is installed 2016-04-25 13:57:20 +02:00
Vadim Sikora 677a0768c3 Merge branch 'develop' into bugfix/3.3-modal-mark-safe
Conflicts:
	cms/static/cms/js/dist/bundle.toolbar.min.js
2016-04-25 09:55:44 +02:00
Vadim Sikora c6a9ba0cc5 Merge pull request #5201 from vxsx/feature/postcss-plugin-update-font-paths
Update fonts query string automatically
2016-04-25 09:51:34 +02:00
Vadim Sikora c90fe46077 remove last unused dependency 2016-04-24 10:30:47 +02:00
Vadim Sikora 20dbf24690 recompile css 2016-04-24 10:25:01 +02:00
Vadim Sikora 074daf4fc0 shrinkwrap 2016-04-24 10:24:18 +02:00
Vadim Sikora 2e7203e02f add cacheBuster postcss plugin 2016-04-24 10:23:21 +02:00
Vadim Sikora 281ecd4aad switch gulp-autoprefixer to gulp-postcss 2016-04-24 10:22:50 +02:00
Vadim Sikora ad82cfe2fb dependencies 2016-04-24 10:22:12 +02:00
Martin Koistinen 3ce6a53d23 Merge pull request #5196 from mkoistinen/issue/fix_conflicting_migration_name_develop
Replaces missing migration, fixes up dependencies
2016-04-22 10:37:23 -04:00
Vadim Sikora 5006a41787 Merge pull request #5198 from vxsx/feature/travis-cache
Travis cache
2016-04-22 11:41:38 +02:00
Vadim Sikora 4f69915d1a restore the full build 2016-04-22 10:12:14 +02:00
Vadim Sikora 38342bfea3 Merge branch 'develop' into feature/travis-cache 2016-04-22 09:42:13 +02:00
Vadim Sikora aa3fae3682 Merge pull request #5192 from vxsx/feature/pagetree-legend
Pagetree legend
2016-04-22 09:41:51 +02:00
Vadim Sikora ae1aab7b7d try simplest build to see how cache would work, add
install-npm-dependencies script for travis
2016-04-22 09:39:32 +02:00
Martin Koistinen 18dd07aee1 Re-re-re-fix migrations 2016-04-21 15:08:28 -04:00
Piotr Jakimiak feca517202 Add missing permission name 2016-04-21 14:54:59 -04:00
Vadim Sikora 5aff721f7a prop ordering [ci skip] 2016-04-21 16:31:47 +02:00
Vadim Sikora bca6863ad6 Merge branch 'develop' into feature/pagetree-legend 2016-04-21 16:20:27 +02:00
Vadim Sikora d61bb6d2ac Merge pull request #5191 from vxsx/feature/close-sideframe-if-view-page-was-clicked
Close sideframe if view page was clicked
2016-04-21 16:17:50 +02:00
Vadim Sikora 3d3cd31913 add caching for npm and pip 2016-04-21 15:30:58 +02:00
Vadim Sikora 997db52c15 editorconfig for yml 2016-04-21 15:30:50 +02:00
Vadim Sikora 52f0106cd4 Merge branch 'develop' into feature/close-sideframe-if-view-page-was-clicked [ci skip]
Conflicts:
	cms/static/cms/js/dist/bundle.admin.pagetree.min.js
2016-04-21 13:37:06 +02:00
Vadim Sikora 5127c45d38 Merge branch 'develop' into feature/pagetree-legend
Conflicts:
	cms/static/cms/css/cms.pagetree.css
	cms/static/cms/js/dist/bundle.admin.pagetree.min.js
2016-04-21 13:34:38 +02:00
Vadim Sikora dc4828e313 Merge pull request #5190 from vxsx/feature/pagetree-dropdowns-icon
Dropdowns icon
2016-04-21 13:33:40 +02:00
Vadim Sikora 496e963676 compiled css 2016-04-21 13:33:25 +02:00
Vadim Sikora e90d6584a4 change of classes 2016-04-21 13:33:18 +02:00
Vadim Sikora 3b656c1f5d add legend 2016-04-21 13:32:55 +02:00
Vadim Sikora 8a153616fb split pagetree scss into separate components 2016-04-21 13:32:35 +02:00
Paolo Romolini ef3abe3fb5 Update doc 2016-04-21 10:16:40 +02:00
Vadim Sikora f72792704e bundles 2016-04-21 09:52:48 +02:00
Vadim Sikora d40e424139 fix sideframe tests 2016-04-21 09:52:25 +02:00
Vadim Sikora f43522c370 add handler for closing sideframe if "view page" was clicked
usual use case is to click on view page and then close the sideframe
because page is hidden under it, so we close it now by default
2016-04-21 09:52:16 +02:00
Vadim Sikora 5a1966a0b1 remove code that was handling minimized sideframe 2016-04-21 09:50:57 +02:00
Vadim Sikora 386c8d6e95 Merge branch 'develop' into feature/pagetree-dropdowns-icon 2016-04-21 08:17:46 +02:00
Vadim Sikora 9691acb7c0 Merge pull request #5179 from vxsx/feature/pagetree-revamp
Pagetree redesign
2016-04-21 08:17:04 +02:00
Iacopo Spalletti a435efed6d Merge pull request #5180 from yakky/feature/skip_content
Add copy-content option to copy lang command
2016-04-20 21:16:13 +02:00
Iacopo Spalletti abbbd31a07 Fix docs [ci skip] 2016-04-20 21:15:09 +02:00
Martin Koistinen 511df90ba9 Merge pull request #5173 from mkoistinen/feature/restrict_toolbar_to_internal_ips
Implement CMS_INTERNAL_IPS
2016-04-20 15:08:21 -04:00
Paulo e34fc26f46 Merge pull request #4381 from divio/sane-add-plugin
Sane add plugin
2016-04-20 13:54:41 -04:00
Paulo 2adfe22830 Merge pull request #5181 from czpython/feature/plugin-move-speedup
Feature/plugin move speedup
2016-04-20 13:49:27 -04:00
Martin Koistinen f9bdd34e9b Fixes for Django 1.9 compatibility 2016-04-20 13:44:37 -04:00
Martin Koistinen 86dc9338a2 Adds tests and test-configuration for iptools ranges 2016-04-20 13:40:37 -04:00
Vadim Sikora deec8b358b bundled files 2016-04-20 18:10:29 +02:00
Vadim Sikora a6b563bafe adjust dropdowns so the button state can be displayed correctly 2016-04-20 18:10:23 +02:00
Vadim Sikora bd403b8ecc change icon 2016-04-20 18:09:21 +02:00
Vadim Sikora d007ae2cd5 changes for the review [ci skip] 2016-04-20 18:06:32 +02:00
Paulo 2aa18e4681 Merge pull request #5155 from czpython/feature/sane-add-plugin-v3
Feature/sane add plugin v3
2016-04-20 10:04:32 -04:00
Martin Koistinen 2c87e0540d Update changelog for clarity 2016-04-20 09:44:06 -04:00
Martin Koistinen 55d04d0b38 Update docs to make it clear what may happen if CMS_INTERNAL_IPS is left unset 2016-04-20 09:43:59 -04:00
Vadim Sikora 09d6924cc7 add bundle 2016-04-20 14:46:22 +02:00
Vadim Sikora 13ab64c0e7 add tests for dropdowns 2016-04-20 14:45:58 +02:00
Vadim Sikora c06c3b1b13 move out the toggleDropdown, fix bugs 2016-04-20 14:45:39 +02:00
Vadim Sikora 77398ed246 compiled files 2016-04-20 12:58:07 +02:00
Vadim Sikora d528a5fcf1 move dropdowns to another class 2016-04-20 12:57:58 +02:00
Vadim Sikora 92bf88e5dc set browsers to >1% instead of >5% 2016-04-20 12:57:05 +02:00
Vadim Sikora b787a7cb0d fix remaining integration tests 2016-04-20 09:57:12 +02:00
Vadim Sikora 927451f82a fix typo in the comment [ci skip] 2016-04-20 09:42:32 +02:00
Iacopo Spalletti b23758d807 Add --skip-content test 2016-04-20 01:10:39 +02:00
Iacopo Spalletti 624ec1597d Add skip-content option to copy lang command
Signed-off-by: Iacopo Spalletti <i.spalletti@nephila.it>
2016-04-20 01:06:03 +02:00
Paulo 9209b6feae adds test for bad order[] param 2016-04-19 18:38:27 -04:00
Paulo 27c0d8d2f2 use get tree 2016-04-19 17:37:02 -04:00
Martin Koistinen bfafc7eca5 Implement request_ip_resolvers and settings, refactor mw, add docs. 2016-04-19 16:33:49 -04:00
Paulo 1dc9daf45f minor cleanup 2016-04-19 15:37:53 -04:00
Paulo 3c8f701e57 refactors plugin reordering for the sake of performance 2016-04-19 15:33:01 -04:00
Vadim Sikora d5dcdfb52d integration tests 2016-04-19 21:25:28 +02:00
Vadim Sikora 75c536bf63 bundled files 2016-04-19 21:25:20 +02:00
Vadim Sikora 77f6da310c fix typo 2016-04-19 21:24:54 +02:00
Iacopo Spalletti a231699777 Merge pull request #5174 from mkoistinen/feature/remove_deprecated_endpoint
Feature/remove deprecated endpoint
2016-04-19 21:24:52 +02:00
Vadim Sikora 0b4517e909 fix the marker on complex trees 2016-04-19 21:24:31 +02:00
Vadim Sikora c3d3959c47 show advanced settings icon when shift is pressed 2016-04-19 21:24:22 +02:00
Vadim Sikora f5ad2e9c17 close dropdown when clicking on an item 2016-04-19 21:23:43 +02:00
Paulo f86a6c5116 avoid calling save() vs update() 2016-04-19 13:13:28 -04:00
Vadim Sikora c28f9737cd bundled files 2016-04-19 14:30:58 +02:00
Vadim Sikora 5b65204388 cleanup fixture for the moment 2016-04-19 14:30:49 +02:00
Vadim Sikora 99722100be tooltips -> dropdowns 2016-04-19 14:30:37 +02:00
Vadim Sikora 852c506222 use html instead of text method in the message open
modern browsers will use escaped version of the text, meaning
&lt;script&gt;alert(1);&lt;/script&gt; would actually render script
tag with an alert in the message
2016-04-19 11:19:46 +02:00
Vadim Sikora b1aad777bf condensed 2016-04-19 11:07:25 +02:00
Vadim Sikora 461eb47072 wip 2016-04-19 10:40:10 +02:00
Vadim Sikora e5a9637af3 Merge pull request #5172 from vxsx/feature/pagetree-revamp
pagetree unit tests initial setup
2016-04-19 09:12:40 +02:00
Martin Koistinen 9650e4162b Add tests 2016-04-18 22:56:33 -04:00
Martin Koistinen 8fe3c248fb Fix test 2016-04-18 22:49:42 -04:00
Martin Koistinen 5aac9f9280 Remove deprecated end-point 2016-04-18 22:21:53 -04:00
Martin Koistinen 97c50fee71 Initial implementation 2016-04-18 22:01:08 -04:00
Vadim Sikora 22b7ba35ff add initial tests for pagetree 2016-04-18 15:13:02 +02:00
Vadim Sikora e523e17edb fix marker in sideframe 2016-04-18 15:12:51 +02:00
Vadim Sikora 7af18a5aef Merge pull request #5169 from vxsx/feature/pagetree-revamp
Pagetree revamp
2016-04-18 14:43:38 +02:00
Vadim Sikora 51722724c1 fix retina image [ci skip] 2016-04-18 13:33:43 +02:00
Vadim Sikora f9ec43c95b style fix [ci skip] 2016-04-18 13:09:03 +02:00
Vadim Sikora 9ef4a5c881 Merge branch 'develop' into feature/pagetree-revamp
Conflicts:
	cms/static/cms/css/cms.pagetree.css
2016-04-18 12:12:57 +02:00
Vadim Sikora 904ffe653a filter errors less aggressively 2016-04-18 11:29:08 +02:00
Vadim Sikora 7bae067bcf add bundled files 2016-04-18 11:23:45 +02:00
Vadim Sikora 509fbf3f8f add dragging visual effects
also refactors getDescendantsIds into own function
2016-04-18 11:22:15 +02:00
Vadim Sikora 6cfaf50d01 small formatting fix 2016-04-18 11:21:42 +02:00
Vadim Sikora 4a497f03ab do not show error for things that do not ruin state 2016-04-18 11:21:28 +02:00
Vadim Sikora e8671c4331 fix condition 2016-04-18 11:20:56 +02:00
Loriana Indelicato 2a96a5bb84 Merge pull request #5167 from lory87/bugfix/removes-disabled-action-button-border
removes disabled action button border
2016-04-18 08:49:39 +02:00
Vadim Sikora 8f4591df78 no padding 2016-04-16 12:13:43 +02:00
Vadim Sikora 6135abbf50 marker style 2016-04-16 12:12:52 +02:00
Vadim Sikora 87efb9699c template and settings adjusted 2016-04-16 12:12:06 +02:00
Vadim Sikora 88dc458da6 reorganize how icons behave (vertical centering should be better now) 2016-04-16 12:11:30 +02:00
Vadim Sikora 8578ea0c83 fix info icon 2016-04-15 21:57:20 +02:00
Loriana Indelicato 5c66158c79 updates changelog 2016-04-15 11:07:35 +02:00
Loriana Indelicato 37e158bbd1 uses background clip on every button 2016-04-15 11:03:55 +02:00
Loriana Indelicato ca0cea9519 removes disabled action button border 2016-04-15 10:59:43 +02:00
Vadim Sikora be6d1670e6 Merge branch 'feature/sane-add-plugin-v3' of github.com:czpython/django-cms into feature/sane-add-plugin-v3 2016-04-15 09:14:58 +02:00
Vadim Sikora e4a9b497af cleanup, pr comments 2016-04-15 09:14:36 +02:00
Paulo a6a3331f15 final cleanup 2016-04-14 14:44:43 -04:00
Paulo 0acf9f6150 fixes failing tests 2016-04-14 13:30:49 -04:00
Paulo 1f322c24e8 Merge branch 'feature/sane-add-plugin-v3' of github.com:czpython/django-cms into feature/sane-add-plugin-v3 2016-04-14 07:52:11 -04:00
Paulo 38d079b445 pull ckeditor from sane add plugin branch 2016-04-14 07:51:58 -04:00
Paulo fb9cd49283 adjust tests to match new non-cancel behavior 2016-04-14 07:47:31 -04:00
Vadim Sikora f4eda25612 Merge branch 'sane-add-plugin' into feature/sane-add-plugin-v3
Conflicts:
	cms/static/cms/js/dist/bundle.toolbar.min.js
2016-04-14 11:29:34 +02:00
Vadim Sikora c7bca68e6f Merge branch 'develop' into sane-add-plugin
Conflicts:
	cms/static/cms/js/dist/bundle.toolbar.min.js
	cms/tests/test_frontend.py
2016-04-14 11:27:54 +02:00
Paolo Romolini 058919ae85 Describe how to access to a title extension from a template 2016-04-14 10:25:13 +02:00
Vadim Sikora df939bae74 fullwidth pagetree in sideframe 2016-04-13 13:51:07 +02:00
Vadim Sikora 9d0a627a97 Merge pull request #5134 from FinalAngel/feature/pagetree-3.3
Header revamp for the pagetree
2016-04-13 11:58:31 +02:00
Vadim Sikora 13f54033c6 fix linting errors [ci skip] 2016-04-13 11:56:29 +02:00
Vadim Sikora 34d2456864 Merge branch 'develop' into feature/pagetree-3.3 [ci skip]
Conflicts:
	cms/static/cms/css/cms.base.css
2016-04-13 11:55:06 +02:00
Vadim Sikora 812a61dcda Merge branch 'develop' into feature/sane-add-plugin-v3
Conflicts:
	cms/static/cms/js/dist/bundle.toolbar.min.js
	cms/static/cms/js/modules/cms.modal.js
	cms/tests/test_frontend.py
2016-04-13 11:24:33 +02:00
Vadim Sikora b2eb9b64ae Merge pull request #5158 from vxsx/feature/fix-loader-that-never-hides
Fix loader that never hides
2016-04-13 11:22:44 +02:00
Vadim Sikora f95e31d36c Merge branch 'develop' into feature/fix-loader-that-never-hides [ci skip]
Conflicts:
	cms/static/cms/css/cms.base.css
2016-04-13 11:22:25 +02:00
Vadim Sikora 25fa1fad53 Merge pull request #5159 from vxsx/feature/minor-structureboard-ui-fix
fix minor jumping in structureboard
2016-04-13 11:21:03 +02:00
Vadim Sikora 82b794e60f fix minor jumping in structureboard 2016-04-12 16:51:33 +02:00
Vadim Sikora 81afba8ae7 fix integration tests 2016-04-12 14:35:56 +02:00
Vadim Sikora a3e0dc0472 Merge branch 'develop' into feature/pagetree-3.3
Conflicts:
	cms/static/cms/css/cms.base.css
2016-04-12 14:02:18 +02:00
Vadim Sikora 1e070c49b5 Merge branch 'develop' into feature/fix-loader-that-never-hides
Conflicts:
	cms/static/cms/css/cms.base.css
2016-04-12 13:43:34 +02:00
Vadim Sikora 97c9e70af2 Merge pull request #5157 from vxsx/feature/unit-tests/cms-plugins
more unit tests for cms.plugins
2016-04-12 13:41:00 +02:00
Vadim Sikora bcc32b79c4 bundled files 2016-04-12 13:36:58 +02:00
Vadim Sikora 604177d063 fix tests 2016-04-12 13:36:53 +02:00
Vadim Sikora a2a3be4d52 hide loader when closing the modal 2016-04-12 13:36:25 +02:00
Vadim Sikora c010a79d4c make sure that loader is always blue 2016-04-12 13:36:08 +02:00
Vadim Sikora 6394bda97c Merge pull request #5152 from vxsx/feature/migrate-selenium-tests
Migrate selenium tests
2016-04-12 12:05:11 +02:00
Vadim Sikora 2610b62954 tests for _filterPluginsList 2016-04-12 12:01:49 +02:00
Vadim Sikora 5e4c80750c remove dropdown children references (non-existent since 3.2) 2016-04-12 12:01:45 +02:00
Vadim Sikora d3eac4405d unit tests for traversing the plugin picker 2016-04-12 11:22:05 +02:00
Vadim Sikora b2919929fe fix event handler for traversing 2016-04-12 11:21:49 +02:00
Vadim Sikora 88a8c67f20 finish setupActions 2016-04-12 10:40:47 +02:00
Vadim Sikora b64b07af50 make settings parametrizable 2016-04-12 10:15:40 +02:00
Vadim Sikora 00ba52cea7 more tests 2016-04-12 09:23:26 +02:00
Vadim Sikora acfcbc493c Merge branch 'develop' into feature/unit-tests/cms-plugins 2016-04-12 09:08:45 +02:00
Paulo b06d29ed5d allow passing extra context 2016-04-11 16:57:06 -04:00
Vadim Sikora 212845846a more 2016-04-11 21:22:29 +02:00
Vadim Sikora 9a6b00ef3b a bit more tests 2016-04-11 20:46:43 +02:00
Paulo d15fc64da4 remove unnecessary field from add validation form 2016-04-11 10:11:29 -04:00
Paulo 72f2601a80 connect data bridge 2016-04-11 10:11:16 -04:00
Vadim Sikora c9ac466b12 bundled files [ci skip] 2016-04-11 15:43:49 +02:00
Vadim Sikora 23a237f0db add unit tests 2016-04-11 15:43:35 +02:00
Vadim Sikora ad8f8982bd add cancelable modal-close and modal-closed events 2016-04-11 15:43:19 +02:00
Vadim Sikora a984457ea3 add _cancelHandler 2016-04-11 15:42:48 +02:00
Vadim Sikora 91ea7a6b3d refactor dispatchEvent so it returns dispatched event 2016-04-11 15:42:15 +02:00
Vadim Sikora a6a104f8db remove selenium remains 2016-04-11 14:06:00 +02:00
Vadim Sikora a877eae1dd Merge pull request #5150 from divio/feature/show-loader-while-moving-plugin
show loader while moving a plugin
2016-04-11 11:53:02 +02:00
Vadim Sikora 3e75da5286 remove tests that are covered already 2016-04-11 11:52:43 +02:00
Vadim Sikora ba894d1530 add copy-from-language test 2016-04-11 11:52:19 +02:00
Vadim Sikora f33df7e6ae fix pagetree-no-permission 2016-04-11 11:51:50 +02:00
Vadim Sikora b08ff1ad73 extend publishPage helper to use language param 2016-04-11 11:51:22 +02:00
Vadim Sikora 83ed292433 add unit tests for show/hide loader when moving plugin 2016-04-11 09:09:46 +02:00
Vadim Sikora 2dfa3b703e Merge pull request #5147 from vxsx/feature/migrate-selenium-tests
Migrate toolbar tests
2016-04-11 09:03:01 +02:00
Vadim Sikora fc4053246c rm unused imports 2016-04-09 11:49:38 +02:00
Martin Koistinen e8286346fb Merge pull request #5141 from mkoistinen/feature/improve_i18n_support_in_wizards
Improve wizard support for i18n projects
2016-04-08 16:16:27 -04:00
Paulo 6f5b91fef6 improved internal plugin api 2016-04-08 15:40:59 -04:00
Martin Koistinen 177fd2f591 Fix welcome wizard 2016-04-08 14:46:44 -04:00
Martin Koistinen a83841c44c Use util for language 2016-04-08 14:16:05 -04:00
genti94 4e4e00e4d3 show loader while moving a plugin 2016-04-08 18:08:51 +02:00
Martin Koistinen 98ad1f8ae7 Remove unused import 2016-04-08 11:33:36 -04:00
Martin Koistinen 3076da6ac7 Cleanup 2016-04-08 11:33:36 -04:00
Martin Koistinen 5cf4721c59 Removes obsolete code 2016-04-08 11:33:36 -04:00
Martin Koistinen 6590c7b63c Improve wizard support for i18n projects 2016-04-08 11:33:36 -04:00
Paulo afe9061076 Merge pull request #5142 from czpython/fixes-3.3/5140
fixes #5140
2016-04-08 08:04:59 -04:00
Vadim Sikora 079a1646d5 remove tests that are now covered 2016-04-08 13:29:11 +02:00
Vadim Sikora 750916130d add a test for toolbar login in the app cbv 2016-04-08 13:28:58 +02:00
Vadim Sikora 931637685e add a bit more docs about running tests
also documents --no-server
2016-04-08 10:41:39 +02:00
Vadim Sikora 8906fefcc0 adds simple test for logging in with toolbar through apphooked page 2016-04-08 10:16:40 +02:00
Vadim Sikora 5133143373 add --no-server option to gulp tests:integration 2016-04-08 10:00:32 +02:00
Vadim Sikora 7e6b2a4a85 adds docs for helpers 2016-04-08 09:59:56 +02:00
Vadim Sikora 17458c8e24 add more helpers 2016-04-08 09:48:37 +02:00
Paulo fe1db2271a adapt page move integrity test 2016-04-07 18:55:17 -04:00
Paulo e930124ec3 improvements to plugin add_view logic 2016-04-07 16:15:55 -04:00
Paulo a88d98df17 don't assign variable if not used.. even for clarity.. 2016-04-07 14:30:58 -04:00
Paulo 486b3facbb describe scenario in _publisher_save_public 2016-04-07 14:10:52 -04:00
Vadim Sikora 9010e9d07f remove toolbar login test since it is already covered 2016-04-07 19:32:32 +02:00
Paulo b1a5a6fea8 improve small test 2016-04-07 13:29:51 -04:00
Paulo 5ffd5a552f use the fresh instance once more 2016-04-07 13:29:35 -04:00
Vadim Sikora 7077b7cbd2 Merge pull request #5144 from vxsx/feature/migrate-selenium-tests
Refactor gulp tests:integration
2016-04-07 16:32:21 +02:00
Vadim Sikora 5940479562 make test more reliable 2016-04-07 14:01:06 +02:00
Vadim Sikora 9c29f320cf remove unnecessary empty line 2016-04-07 11:51:05 +02:00
Vadim Sikora 60b75f5611 move server pid to inner scope 2016-04-07 11:29:00 +02:00
Vadim Sikora 21b72fdf53 cleanup testserver.py 2016-04-07 11:16:23 +02:00
Vadim Sikora bf2d520ca2 add test for copying and pasting pages with disabled CMS_PERMISSION 2016-04-07 11:15:52 +02:00
Vadim Sikora 328c405280 add documentation for refactored gulp tests:integration
also adds docs for `--screenshots`
2016-04-07 11:14:58 +02:00
Vadim Sikora ac9257f756 refactor gulp tests:integration
Since we need to run tests against servers with different settings we
need to refactor how we run tests. From now on we run testserver from
the gulp itself.
2016-04-07 11:11:54 +02:00
Vadim Sikora eaa4abfe0e no longer need to start server on travis 2016-04-07 11:11:32 +02:00
Vadim Sikora 4a162ffdb3 move pagetree helpers into cms helpers 2016-04-07 11:10:53 +02:00
Vadim Sikora af289dec91 explicitly use CMS.$ in waitUntilAllAjaxCallsFinish
there might be no jQuery in the admin
2016-04-07 11:09:33 +02:00
Vadim Sikora d1656007c9 add bluebird and lodash 2016-04-07 11:05:53 +02:00
Iacopo Spalletti 61330584e0 Merge pull request #5078 from stefanfoulis/feature/limit-branches-to-build-on-travis
limit branches to build on travis
2016-04-07 09:21:28 +02:00
Paulo fb38e3c2a5 fixes #5140 2016-04-06 15:35:20 -04:00
Paulo c1a902665f Merge pull request #5098 from czpython/feature/sane-add-plugin-cleanup
sane add plugin cleanup
2016-04-06 09:04:26 -04:00
Paulo 582b1af912 Merge pull request #5137 from czpython/fixes/issue-5107
fixes issue #5107
2016-04-06 08:28:43 -04:00
Vadim Sikora 4f86cf6baa wip 2016-04-06 09:37:17 +02:00
Paulo 98afb306bc more test fixes 2016-04-05 15:39:21 -04:00
Paulo 8a08aebcc5 best to use the fresh instance 2016-04-05 15:34:23 -04:00
Paulo 2312732460 fixes typo. travis didn't run before... 2016-04-05 14:19:21 -04:00
Paulo 6f23545b00 adds tests for 5107 2016-04-05 14:09:36 -04:00
Martin Koistinen e753f72a31 Merge pull request #5135 from mkoistinen/features/remove_deprecated_request_REQUEST
Removes deprecated request.REQUEST usage
2016-04-05 13:44:37 -04:00
Paulo 2b9e1483b9 fixes issue #5107 2016-04-05 13:43:00 -04:00
Vadim Sikora c64cc802d9 deps 2016-04-05 18:09:50 +02:00
Paulo d67ec0eb87 adapts tests for new error message 2016-04-05 11:34:36 -04:00
Martin Koistinen 240f77e59a Removes deprecated request.REQUEST usage
Now, we can actually read the test output =)
2016-04-05 10:40:05 -04:00
Vadim Sikora 8b5fd926f3 add shelljs 2016-04-05 15:57:04 +02:00
Paulo a082d96255 fixes failing tests 2016-04-05 09:44:08 -04:00
Angelo Dini 452c48e0ab fixes from comments [ci skip] 2016-04-05 14:44:29 +02:00
Angelo Dini d2e7a0a646 add compiled files 2016-04-05 14:08:54 +02:00
Angelo Dini 33f42539c4 Merge branch 'develop' of github.com:divio/django-cms into feature/pagetree-3.3
Conflicts:
	cms/static/cms/js/dist/bundle.admin.pagetree.min.js
2016-04-05 14:08:05 +02:00
Angelo Dini accde63372 fix pagetree tests 2016-04-05 14:06:18 +02:00
Angelo Dini b24e4d0b1c fix linting 2016-04-05 11:57:48 +02:00
Angelo Dini 31185dd3c2 responsive fixes 2016-04-05 11:42:56 +02:00
Angelo Dini f241a012b3 add proper on/off handling 2016-04-05 11:22:45 +02:00
Angelo Dini e12b333182 cleanup 2016-04-05 11:09:26 +02:00
Angelo Dini 4c2864241f handle filter visibility 2016-04-05 10:53:17 +02:00
Angelo Dini 8b1e90bf31 get filter to work 2016-04-05 10:13:04 +02:00
Paulo 11af255f2a Merge branch 'feature/sane-add-plugin-cleanup' of github.com:czpython/django-cms into feature/sane-add-plugin-cleanup 2016-04-04 14:44:05 -04:00
Paulo 6ba37be3d7 more cleanup 2016-04-04 14:43:52 -04:00
Angelo Dini 26a7cc0b84 more adaptions 2016-04-04 18:05:59 +02:00
Angelo Dini f95ddbe73f add current header state 2016-04-04 17:56:32 +02:00
Vadim Sikora 9c92ccb1aa Merge pull request #5132 from vxsx/bugfix/pagetree-copy-page-no-permissions
Bugfix pagetree copy page when no permissions
2016-04-04 14:29:59 +02:00
Vadim Sikora 7fcdba4d23 bundled file 2016-04-04 12:46:02 +02:00
Vadim Sikora e9dba90cf9 parse permission setting as a boolean 2016-04-04 11:21:31 +02:00
Vadim Sikora a13551eb73 respect permission settings when copying a page 2016-04-04 11:21:10 +02:00
Angelo Dini d849f611b9 Merge branch 'develop' of github.com:divio/django-cms into feature/pagetree-3.3
Conflicts:
	cms/static/cms/js/dist/bundle.toolbar.min.js
2016-04-04 09:34:50 +02:00
Iacopo Spalletti 98e04bebfc Merge pull request #5115 from piotrjakimiak/fix-1206
Simplify get_visible_pages
2016-04-03 21:54:31 +02:00
Piotr Jakimiak 348bc509c1 Simplify get_visible_pages 2016-04-03 18:59:43 +02:00
Iacopo Spalletti abc66b0872 Merge remote-tracking branch 'upstream/release/3.2.x' into HEAD 2016-04-02 16:55:32 +02:00
Leonardo 0ce6b0e62d Include all optional parameters of the show_menu tag
fixes #5056
2016-04-02 15:54:08 +02:00
Leonardo 5220f0ae2a Fix release notes documentation on renaming
fixes #5124
2016-04-02 15:52:49 +02:00
Vadim Sikora 69885b6376 fix unit tests 2016-04-02 12:49:29 +02:00
Iacopo Spalletti 916dc5a417 Merge remote-tracking branch 'upstream/release/3.2.x' into HEAD 2016-04-02 10:32:08 +02:00
Leonardo cf88c871d4 Documentation Error on command
Fixes #5121
2016-04-02 10:31:09 +02:00
Daniele Procida 1a0e51d497 Merge pull request #5127 from divio/integration-tutorial-docs
Updated tutorial, added new tutorial sections
2016-04-02 09:45:14 +02:00
Iacopo Spalletti 4005d20e68 Merge pull request #5126 from yakky/merge/3.2.3.post1b
Port more 3.2.x code
2016-04-02 01:59:48 +02:00
evildmp 3edcbe2b19 Updated tutorial, added new tutorial sections 2016-04-02 01:14:12 +02:00
Iacopo Spalletti fc902869cf Merge branch 'merge/sphinx_fix' into merge/3.2.3.post1b 2016-04-01 23:50:25 +02:00
Vadim Sikora 02aac14b98 fix spelling test case for sphinx >= 1.4 2016-04-01 23:43:06 +02:00
Iacopo Spalletti 713e2e8b08 Merge branch 'merge/sphinx_fix' into merge/3.2.3.post1b 2016-04-01 23:42:16 +02:00
Vadim Sikora b7ed85c148 fix spelling test case for sphinx >= 1.4 2016-04-01 23:41:27 +02:00
Iacopo Spalletti 5620cd6b61 Merge remote-tracking branch 'upstream/release/3.2.x' into merge/3.2.3.post1b 2016-04-01 21:37:04 +02:00
Iacopo Spalletti e0d50bea0d Merge pull request #5125 from yakky/merge/5108
Merge #5108
2016-04-01 21:32:23 +02:00
Paulo 54571ad785 prevent django from rendering it's popup closer 2016-04-01 15:26:32 -04:00
Paulo eb8a2641d2 fixes js issue when adding plugin 2016-04-01 13:28:15 -04:00
Mark 973de62a61 when we use "pages" in raw_id_fields we need to manage onclick event to save the default behaviour 2016-04-01 19:23:45 +02:00
Paulo ac236a37f6 let django handle command parsing 2016-04-01 11:35:18 -04:00
Paulo 54ad5e06ca remove un-necessary test. canceling no longer deletes 2016-04-01 11:35:18 -04:00
Paulo 2338dd8845 fixes key error with missing setting 2016-04-01 11:35:18 -04:00
Paulo ba1db7057d consider parent and language when calculating position 2016-04-01 11:35:18 -04:00
Paulo fcf97e43ce no need to use force_unicode anymore 2016-04-01 11:35:18 -04:00
Paulo c35d73f11d avoid corrupt parent/child relationships 2016-04-01 11:35:18 -04:00
Paulo 5fd7e4234b call the post_add hook 2016-04-01 11:35:18 -04:00
Angelo Dini f4ed7c3df5 fix dropdown colors 2016-04-01 17:35:10 +02:00
Angelo Dini ba203192f4 remove typo 2016-04-01 17:31:34 +02:00
Angelo Dini 75772f2281 form action and reset filter 2016-04-01 17:27:54 +02:00
Angelo Dini 7087006da4 add minified files 2016-04-01 17:14:55 +02:00
Angelo Dini 2bdd9fa57a add current progress 2016-04-01 17:14:38 +02:00
Paulo 7a0c61fc16 Merge pull request #5122 from czpython/merge/sane-add-plugin-2
Merge develop into sane-add-plugin #2
2016-04-01 10:52:24 -04:00
Vadim Sikora 2c8fd6ce2d fix history tests 2016-04-01 13:47:01 +02:00
Vadim Sikora 77cab91091 fixes for integration tests 2016-04-01 12:08:16 +02:00
Vadim Sikora 189f5309ec bundled files 2016-04-01 10:38:16 +02:00
Vadim Sikora c6e68caf4d fix the tests 2016-04-01 10:38:09 +02:00
Vadim Sikora cb905ad402 remove newPlugin workarounds 2016-04-01 10:38:04 +02:00
Vadim Sikora 92e82b3f8c bundled file 2016-04-01 10:31:13 +02:00
Vadim Sikora 5646605513 remove newPlugin and fix the tests 2016-04-01 10:31:07 +02:00
Vadim Sikora bea398e005 fix behaviour issues 2016-04-01 10:30:44 +02:00
Iacopo Spalletti f10daf71d2 Merge pull request #5119 from yakky/merge/3.2.3.post1
Merge 3.2.x
2016-04-01 09:55:43 +02:00
Vadim Sikora eec6bb122f resolve conflicts 2016-04-01 09:35:07 +02:00
Vadim Sikora f3c3f076bc more tests 2016-04-01 09:18:16 +02:00
Paulo f96f5ab424 fixes conflict in cms/tests/test_cache.py 2016-03-31 20:30:09 -04:00
Paulo cfa5fd7d35 Merge branch 'develop' into merge/sane-add-plugin-2 2016-03-31 20:26:03 -04:00
Iacopo Spalletti 98fac388da Merge remote-tracking branch 'upstream/develop' into merge/3.2.3.post1 2016-04-01 01:48:48 +02:00
Angelo Dini 26ead7d150 add new icon 2016-03-31 18:12:01 +02:00
Vadim Sikora 921886d652 Merge branch 'develop' into feature/unit-tests/cms-plugins 2016-03-31 17:50:49 +02:00
Vadim Sikora 3cb62c725f add tests for scrollToElement 2016-03-31 17:50:29 +02:00
Vadim Sikora 4cd94268ba Merge pull request #5120 from FinalAngel/feature/unit-tests/cms-structureboard
CMS Structureboard unit tests
2016-03-31 17:48:31 +02:00
Angelo Dini 00a829087b add button adaptions 2016-03-31 17:43:53 +02:00
Iacopo Spalletti 7142ba8535 Fix merge error 2016-03-31 16:58:11 +02:00
Vadim Sikora 41894afcf5 fix linting errors 2016-03-31 16:28:05 +02:00
Vadim Sikora 7f9c0953f9 fix tests in edge 2016-03-31 16:18:06 +02:00
Vadim Sikora 4791826cf8 remaining tests for structureboard 2016-03-31 16:17:56 +02:00
Vadim Sikora 6b7eeea031 more tests for structureboard 2016-03-31 13:58:04 +02:00
Vadim Sikora 6d8eb40e50 bundled files 2016-03-31 13:57:51 +02:00
Vadim Sikora 8579167f95 result of $.fn.data can never be null 2016-03-31 13:57:46 +02:00
Vadim Sikora aace197795 tests for update 2016-03-31 12:10:17 +02:00
Vadim Sikora eead5e9230 Merge pull request #5114 from FinalAngel/feature/unit-tests/cms-sideframe
CMS Sideframe unit tests
2016-03-31 11:55:53 +02:00
Angelo Dini eb040ee56c Merge branch 'develop' of github.com:divio/django-cms into feature/pagetree-3.3 2016-03-31 10:02:04 +02:00
Iacopo Spalletti 36488bd28d Drop skip in Django 1.6 2016-03-31 09:48:54 +02:00
Iacopo Spalletti 779ab0a33e Bump hvad version in tests 2016-03-31 09:47:38 +02:00
Iacopo Spalletti b022388b02 Fix toolbar order and fail gracefully if clipboard plugin is not the topmost plugin 2016-03-31 09:47:38 +02:00
Iacopo Spalletti 20f0a62e13 Skip failing test due to incompatible text plugin 2016-03-31 09:45:49 +02:00
Iacopo Spalletti 8abbd2007c Merge pull request #5118 from yakky/feature/bump_hvad
Bump hvad version in tests
2016-03-31 09:44:20 +02:00
Vadim Sikora 45bcc822ae Revert "Fix sphinx issue"
This reverts commit 0b9996910a.
2016-03-31 09:32:23 +02:00
Vadim Sikora 7dad25b3ec Merge branch 'develop' into feature/unit-tests/cms-sideframe 2016-03-31 09:31:59 +02:00
Vadim Sikora 391f2ec65d Merge pull request #5110 from FinalAngel/feature/unit-tests/cms-toolbar
CMS Toolbar unit tests
2016-03-31 09:30:54 +02:00
Martin Koistinen 815ae8dbf2 Fix sphinx issue 2016-03-31 08:22:00 +02:00
Martin Koistinen d03072415d Merge pull request #5117 from divio/feature/readd_permission_checking
Re-add permission checking
2016-03-30 22:37:15 -04:00
Iacopo Spalletti 8f127714d8 Bump hvad version in tests 2016-03-31 01:57:25 +02:00
Iacopo Spalletti 8579be0031 Refactor request.placeholders to hold both placeholders and current user edit status for each 2016-03-31 01:55:38 +02:00
Iacopo Spalletti b1f89f9d6c Revert "Fixes tests (and functionality) of the recently committed better_cache_control"
This reverts commit d0f90e7382.
2016-03-31 01:49:12 +02:00
Martin Koistinen 0136f3dea2 Merge pull request #5116 from divio/feature/better_cache_control_cleanup
Fix sphinx issue
2016-03-30 19:26:00 -04:00
Martin Koistinen 0b9996910a Fix sphinx issue 2016-03-30 19:25:31 -04:00
Vadim Sikora 8b002c0691 Merge branch 'develop' into feature/unit-tests/cms-toolbar 2016-03-30 17:27:22 +02:00
Vadim Sikora 0bb4202944 beforeAll and afterAll are ok 2016-03-30 17:26:52 +02:00
Vadim Sikora 36784f92b6 tests for structureboard 2016-03-30 17:26:42 +02:00
Vadim Sikora 77a436998d few ignores 2016-03-30 17:26:27 +02:00
Martin Koistinen 28c6ac1b81 Merge pull request #5113 from divio/feature/better_cache_control_fixes
Fixes tests
2016-03-30 11:22:04 -04:00
Martin Koistinen d0f90e7382 Fixes tests (and functionality) of the recently committed better_cache_control
NOTE: This commit temporarily disabled 3 placeholder permission unit tests. These will be rewritten and functionality preserved in another PR.
2016-03-30 11:20:35 -04:00
Martin Koistinen c525f036b5 More fixing of tests 2016-03-30 09:28:45 -04:00
Martin Koistinen a6ef5eac9d Capture PluginAlreadyRegistered 2016-03-30 08:58:29 -04:00
Vadim Sikora 17e4a1d3d6 Merge branch 'develop' into feature/unit-tests/cms-toolbar 2016-03-30 11:11:11 +02:00
Vadim Sikora 27765b4c57 additional tests for cms.sideframe 2016-03-30 11:09:22 +02:00
Vadim Sikora 248daf972e bundled file 2016-03-30 11:08:03 +02:00
Vadim Sikora 4142a34e1f istanbul comments 2016-03-30 11:07:53 +02:00
Vadim Sikora 06a77374ce remove dead code
history.back can never be empty since we push to it before the check
2016-03-30 11:07:36 +02:00
Vadim Sikora 7979a06202 fix spelling test case for sphinx >= 1.4 2016-03-30 09:26:54 +02:00
Vadim Sikora ef06ff0411 wait more 2016-03-30 07:41:45 +02:00
Martin Koistinen 14d114cc2d More test fixes 2016-03-29 23:23:29 -04:00
Martin Koistinen e66ff5bdcb Correct query ranges, ensure plugins are unregistered after use 2016-03-29 21:15:29 -04:00
Martin Koistinen 9c8c48e9b0 Merge branch 'develop' of https://github.com/divio/django-cms into feature/better_cache_control 2016-03-29 20:54:27 -04:00
Martin Koistinen 2888fb0769 Use existing utility 2016-03-29 20:50:58 -04:00
Martin Koistinen cee592f85d Leverage work already done in downcast_plugins 2016-03-29 20:50:58 -04:00
Martin Koistinen 90403908f1 Fixes from review 2016-03-29 20:50:58 -04:00
Martin Koistinen 2eca994d7a Tweaks, properly set placeholder cache and honor settings...
CMS_PAGE_CACHE, CMS_PLACEHOLDER_CACHE, CMS_PLUGIN_CACHE now all supported.
2016-03-29 20:50:44 -04:00
Martin Koistinen 48b33d2b1e Address comments,...
Also, change signature to CMSPluginBase.get_cache_expiration(request, instance, placeholder)
2016-03-29 20:50:44 -04:00
Martin Koistinen 64e6f1c7ce Use get_cache_expiration(), also fix spelling and indention 2016-03-29 20:50:44 -04:00
Martin Koistinen 8a697958a9 Spelling fixes, minor doc updates 2016-03-29 20:50:44 -04:00
Martin Koistinen 4cb55ebc58 Another doc fix 2016-03-29 20:50:44 -04:00
Martin Koistinen ba17fc2e2c Doc fixes 2016-03-29 20:50:44 -04:00
Martin Koistinen d869e56152 Adds tests and fixes existing 2016-03-29 20:50:44 -04:00
Martin Koistinen 1e7a738704 Adds documentation 2016-03-29 20:50:44 -04:00
Martin Koistinen da4af00f3f Implement CMSPluginBase.get_expiration() 2016-03-29 20:50:27 -04:00
Martin Koistinen 5322b4ad19 Use existing utility 2016-03-29 20:50:04 -04:00
Martin Koistinen 722af732cc Leverage work already done in downcast_plugins 2016-03-29 20:50:04 -04:00
Martin Koistinen 33f187c1a2 Fixes from review 2016-03-29 20:50:04 -04:00
Martin Koistinen bcda505b93 Tweaks, properly set placeholder cache and honor settings...
CMS_PAGE_CACHE, CMS_PLACEHOLDER_CACHE, CMS_PLUGIN_CACHE now all supported.
2016-03-29 20:49:34 -04:00
Martin Koistinen 7091ea7e9a Address comments,...
Also, change signature to CMSPluginBase.get_cache_expiration(request, instance, placeholder)
2016-03-29 20:49:34 -04:00
Martin Koistinen 890451d3f9 Use get_cache_expiration(), also fix spelling and indention 2016-03-29 20:49:34 -04:00
Martin Koistinen d1ae39e91b Spelling fixes, minor doc updates 2016-03-29 20:49:34 -04:00
Martin Koistinen dc0e79362c Another doc fix 2016-03-29 20:49:34 -04:00
Martin Koistinen 3c7b666d84 Doc fixes 2016-03-29 20:49:34 -04:00
Martin Koistinen f06050ae8a Adds tests and fixes existing 2016-03-29 20:49:34 -04:00
Martin Koistinen ac22722e1e Adds documentation 2016-03-29 20:49:34 -04:00
Martin Koistinen c089a988fb Implement CMSPluginBase.get_expiration() 2016-03-29 20:48:48 -04:00
Vadim Sikora 39097d470f spelling wordlist update 2016-03-29 18:24:37 +02:00
Vadim Sikora eb212dc921 attempt to fix spelling 2016-03-29 17:00:31 +02:00
Vadim Sikora e7671d2661 bundled file 2016-03-29 15:50:03 +02:00
Vadim Sikora e99a3db22d fix the bug where screenblock hid menus 2016-03-29 15:49:34 +02:00
Vadim Sikora 47c714cbb7 be very defensive about setSettings and unhandled loads 2016-03-29 14:03:35 +02:00
Vadim Sikora df60372a02 add more tests for toolbar 2016-03-29 10:08:55 +02:00
Vadim Sikora 7176672bd0 bundled files 2016-03-29 10:08:45 +02:00
Vadim Sikora 0b868438fd use _getWindow for easier mocking 2016-03-29 10:08:38 +02:00
Vadim Sikora d688aca69b screenblock cache variables 2016-03-29 10:08:18 +02:00
Vadim Sikora e85e21c3af eliminate small memory leak
additional event handlers were always added and never removed
2016-03-29 10:08:03 +02:00
Vadim Sikora b701e578a7 fix incorrect events separator 2016-03-29 10:07:20 +02:00
Vadim Sikora 0ba1cca7bb fix typo 2016-03-29 10:07:02 +02:00
Vadim Sikora bac5fa001a few ignores 2016-03-29 10:06:51 +02:00
Vadim Sikora d6afbe6e5c update fixture 2016-03-29 10:06:15 +02:00
Vadim Sikora 6868946e88 Merge pull request #5103 from FinalAngel/feature/unit-tests/cms-navigation
Unit tests for cms.navigation
2016-03-29 10:05:12 +02:00
Vadim Sikora 2adfe0dd67 added comment [ci skip] 2016-03-29 10:02:37 +02:00
Iacopo Spalletti 043f037db2 Merge pull request #5097 from yakky/feature/fix_toolbar_order
Fix toolbar order
2016-03-26 11:45:48 +01:00
Iacopo Spalletti 382e51bd03 Fix toolbar order and fail gracefully if clipboard plugin is not the topmost plugin 2016-03-26 00:16:56 +01:00
Iacopo Spalletti 516665ca4d Skip failing test due to incompatible text plugin 2016-03-26 00:16:56 +01:00
Vadim Sikora 5257b057eb wait after opening sideframe 2016-03-25 23:58:17 +01:00
Vadim Sikora 2b2dbb0878 restore full build 2016-03-25 22:52:22 +01:00
Vadim Sikora bd3595037b more tests 2016-03-25 20:25:09 +01:00
Vadim Sikora 74fa66c13f add wait for modal 2016-03-25 17:45:35 +01:00
Vadim Sikora db9131ebe1 wait a bit more when adding plugin 2016-03-25 17:44:04 +01:00
Vadim Sikora 0b8d6fee5d correct wait 2016-03-25 17:28:59 +01:00
Vadim Sikora 9dd37bec0e wait for url 2016-03-25 17:26:12 +01:00
Vadim Sikora 3753613721 wait for delete url 2016-03-25 17:09:48 +01:00
Vadim Sikora 92352f12de redistribute buckets a bit 2016-03-25 16:56:28 +01:00
Vadim Sikora d232c7f7f0 more wait 2016-03-25 16:55:09 +01:00
Vadim Sikora d6eabe1715 try again 2016-03-25 16:25:11 +01:00
Iacopo Spalletti e5a7506220 Fix docs errors 2016-03-25 08:03:38 +01:00
Vadim Sikora 5bf705a40d more waits for pagetree 2016-03-24 20:05:36 +01:00
Vadim Sikora 8a0e3ededa integration tests fixes 2016-03-24 17:50:38 +01:00
Vadim Sikora d22b32e6c9 hotfix 2016-03-24 16:37:20 +01:00
Vadim Sikora e5acb71780 split integration tests into three buckets 2016-03-24 16:35:30 +01:00
Vadim Sikora 2bbc3ca791 use more reliable download location for phantomjs 2016-03-24 16:34:57 +01:00
Angelo Dini 7b23b2f0ef first steps 2016-03-24 16:29:54 +01:00
Vadim Sikora a59b6b9059 small wait increase in history.js 2016-03-24 14:27:59 +01:00
Iacopo Spalletti 3cd93d3c03 Merge pull request #5099 from FinalAngel/develop-3.4
FE Integration and unit tests
2016-03-24 14:20:26 +01:00
Vadim Sikora 45b7977b28 fix linting errors 2016-03-24 11:21:25 +01:00
Vadim Sikora 67865519d9 unit tests for cms.navigation 2016-03-24 10:39:13 +01:00
Vadim Sikora ec54d7991e changelog and docs adaptation 2016-03-23 17:22:11 +01:00
Vadim Sikora b2c1349bbe different download location for phantomjs 2016-03-22 18:43:25 +01:00
Vadim Sikora d82b233b79 restore full build 2016-03-22 17:53:52 +01:00
Vadim Sikora c7fa828d3e again 2016-03-22 17:17:58 +01:00
Vadim Sikora aa0991d938 try clean run 2016-03-22 17:12:18 +01:00
Vadim Sikora fcaa2cc04f wait a bit before submitting a form 2016-03-22 16:00:20 +01:00
Vadim Sikora bdd507cd72 no reason not to wait even more 2016-03-22 14:04:32 +01:00
Vadim Sikora d7214364fb fix docs 2016-03-22 14:02:55 +01:00
Vadim Sikora ce3a3f8b7d fix docs 2016-03-22 12:51:21 +01:00
Vadim Sikora 2257789aa1 more fixes 2016-03-22 10:55:15 +01:00
Vadim Sikora 5f6d1d4065 put frontend jobs on top of the build [skip saucelabs]
integration tests take longer time than other jobs, so it makes sense to
run it first to reduce overall time of the build
2016-03-22 09:32:34 +01:00
Vadim Sikora 7a7e322bf3 update travis config 2016-03-22 09:19:49 +01:00
Vadim Sikora 893dd492ab Merge branch 'develop' into develop-3.4
Conflicts:
	CHANGELOG.txt
2016-03-22 08:42:39 +01:00
Vadim Sikora b70502f5ca changelog [ci skip] 2016-03-22 08:26:57 +01:00
Vadim Sikora 606bfc5cbc restore coveralls and travis to point back to divio 2016-03-22 08:21:40 +01:00
Vadim Sikora f6e3379c2e Merge pull request #175 from FinalAngel/feature/integration-tests/copy-all-test
Tests for copy all
2016-03-22 08:05:37 +01:00
Paulo d18b844bd1 use utils as util has been deprecated 2016-03-21 13:09:21 -04:00
Paulo 1479ff54d1 migration handling is already being done 2016-03-21 13:09:04 -04:00
Vadim Sikora 8fb727475c fix copy all test 2016-03-21 17:47:58 +01:00
Angelo Dini 6476ad49cc Merge pull request #5096 from FinalAngel/feature/favicon
Fix favicon not loading
2016-03-21 17:45:14 +01:00
Vadim Sikora c49821d5d7 Merge branch 'develop-3.4' into feature/integration-tests/copy-all-test 2016-03-21 16:10:32 +01:00
Vadim Sikora 93efdc1204 Merge pull request #173 from FinalAngel/feature/integration-tests/pagetree-minor-tests
pagetree minor tests
2016-03-21 16:09:53 +01:00
Angelo Dini 8c929f753a fix failed to load resource on welcome screen 2016-03-21 15:48:58 +01:00
Vadim Sikora 5a1727b682 wait even more 2016-03-21 15:19:52 +01:00
Vadim Sikora a641581777 fix sudden linting error 2016-03-21 15:19:45 +01:00
Vadim Sikora caf07584f7 helpers misbehave again 2016-03-21 14:41:39 +01:00
Vadim Sikora 34bafb2a86 use phantomjs2 for unit tests 2016-03-21 14:41:28 +01:00
Vadim Sikora 40c0eab347 more waits 2016-03-21 14:19:13 +01:00
Vadim Sikora aa193caba4 wait more for pagetree 2016-03-21 13:59:04 +01:00
Vadim Sikora b8598b4e08 fix a helper 2016-03-21 12:12:27 +01:00
Vadim Sikora b2c2f9d298 finish test for copy all 2016-03-21 12:11:17 +01:00
Vadim Sikora e0a4230cdf use more helpers 2016-03-21 11:50:22 +01:00
Vadim Sikora 6f7b2cce84 Merge branch 'feature/integration-tests/pagetree-minor-tests' into feature/integration-tests/copy-all-test 2016-03-21 11:26:59 +01:00
Vadim Sikora 485dba94af remove another point of failure 2016-03-21 11:17:54 +01:00
Vadim Sikora 3af30622da add waitUntilAllAjaxCallsFinish helper (hopefully speed up the world) 2016-03-21 09:59:35 +01:00
Vadim Sikora 4e25673514 wait more until start of the server 2016-03-21 09:23:30 +01:00
Vadim Sikora 9282433306 wait more 2016-03-20 22:35:31 +01:00
Vadim Sikora f472466d55 even more waits 2016-03-20 21:25:47 +01:00
Vadim Sikora c020dfc24e slow down the world v2 2016-03-20 19:59:28 +01:00
Vadim Sikora 5d06b09ca1 slow down the world 2016-03-20 19:34:47 +01:00
Vadim Sikora 50110d907f more waits 2016-03-20 19:15:38 +01:00
Vadim Sikora 678fb3a33d add more waits for pagetree loads 2016-03-20 18:36:20 +01:00
Vadim Sikora c647cb5fc8 more stability fixes 2016-03-20 13:06:34 +01:00
Vadim Sikora 95d6356af9 stability :/ 2016-03-20 12:09:05 +01:00
Vadim Sikora 2fcc2b9008 stability 2016-03-19 10:11:35 +01:00
Vadim Sikora 90823aabdf try more specific selector 2016-03-18 18:08:24 +01:00
Vadim Sikora ddbe92602d wait more? 2016-03-18 16:08:18 +01:00
Vadim Sikora bd8304370e stability fixes 2016-03-18 14:46:41 +01:00
Vadim Sikora 3bb3f6f064 fix space [ci skip] 2016-03-18 14:08:06 +01:00
Vadim Sikora 621e0c9b1c add tests for settings/advanced-settings 2016-03-18 13:57:06 +01:00
Vadim Sikora d05495edc4 test for info dropdown 2016-03-18 13:19:02 +01:00
Vadim Sikora 99c481db98 update phantomjs and casperjs 2016-03-18 12:45:18 +01:00
Vadim Sikora 5d17bd79db Merge pull request #172 from FinalAngel/feature/integration-tests/pagetree-languages
Pagetree languages
2016-03-17 15:17:42 +01:00
Vadim Sikora 8ce0b37cf3 more waits 2016-03-17 14:45:24 +01:00
Vadim Sikora e98243152a fix selectors 2016-03-17 14:22:41 +01:00
Vadim Sikora b596873cb8 more waits 2016-03-17 11:21:38 +01:00
Vadim Sikora dedb53ed33 more waits 2016-03-17 09:53:19 +01:00
Vadim Sikora 102f112758 add more waits [ci skip] 2016-03-17 09:21:13 +01:00
Vadim Sikora 455bf230b1 fix language name [ci skip] 2016-03-17 09:15:14 +01:00
Vadim Sikora c8db36eb31 Merge branch 'develop-3.4' into feature/integration-tests/pagetree-languages 2016-03-17 09:13:05 +01:00
Vadim Sikora 7c2e4b4589 Merge branch 'develop' into develop-3.4
Conflicts:
	cms/static/cms/js/dist/bundle.admin.pagetree.min.js
2016-03-17 09:12:41 +01:00
Iacopo Spalletti d04f1e24a0 Merge pull request #5087 from yakky/merge/3.2.3
Merge 3.2.3 in develop
2016-03-17 09:10:42 +01:00
Iacopo Spalletti 29a1da8fbb Merge remote-tracking branch 'upstream/release/3.2.x' into HEAD 2016-03-17 07:52:09 +01:00
Vadim Sikora 15d7961ba0 Merge pull request #171 from FinalAngel/feature/integration-tests/pagetree-open-close-nodes
Pagetree integration tests
2016-03-16 18:12:35 +01:00
Vadim Sikora bbd99a200a add italian and chinese and a test that they are displayed correctly 2016-03-16 17:53:06 +01:00
Vadim Sikora ab22010641 lint fixes 2016-03-16 16:44:15 +01:00
Vadim Sikora 137f24c8aa add tests for filtered pages 2016-03-16 16:41:30 +01:00
Vadim Sikora 5827e935e4 add test for pagetree remembering nodes state (open / closed) 2016-03-16 14:58:12 +01:00
Vadim Sikora 6cf8f3dcbe reset the cursor if the pagetree is filtered 2016-03-16 14:57:11 +01:00
Vadim Sikora 446d441fad disable dragging when filtered 2016-03-16 14:57:00 +01:00
Vadim Sikora dab826927a Merge pull request #170 from FinalAngel/feature/integration-tests/pagetree-cut-tests
add tests for cutting and pasting pages
2016-03-16 14:13:49 +01:00
Vadim Sikora 099daa6cc6 add tests for cutting and pasting pages 2016-03-16 12:33:28 +01:00
Vadim Sikora 21b834a616 Merge pull request #169 from FinalAngel/feature/integration-tests/pagetree-cut-tests
Cut helpers
2016-03-16 12:32:55 +01:00
Vadim Sikora 74c2c22b79 use helper to generate xpath for paste helpers 2016-03-16 11:52:31 +01:00
Vadim Sikora 7f8a91edcf don't show paste helpers on children of the cut out node 2016-03-16 10:37:07 +01:00
Vadim Sikora 4b4d482d54 add a test about cut helpers 2016-03-16 10:36:54 +01:00
Vadim Sikora d55ab62ef3 Merge branch 'develop' into develop-3.4 2016-03-15 16:21:55 +01:00
Vadim Sikora e51839917c Merge pull request #168 from FinalAngel/feature/integration-tests/pagetree-latest
Pagetree integration tests
2016-03-15 16:20:38 +01:00
Vadim Sikora 59ce25c8cf readability [ci skip] 2016-03-15 16:20:15 +01:00
Vadim Sikora 4f754efbd1 small fix 2016-03-15 13:36:55 +01:00
Vadim Sikora b3eac82a68 fix helpers showing up when pasting mode is active 2016-03-15 13:13:43 +01:00
Vadim Sikora 0e63746bc5 fix page copy pasting test 2016-03-15 13:12:53 +01:00
Vadim Sikora 909314ab8b lint 2016-03-15 13:12:36 +01:00
Paulo 227e7c123c Merge pull request #5073 from czpython/sane-add-plugin-v2
[WIP] Sane add plugin v2
2016-03-14 15:40:48 -04:00
Paulo 55443003f8 Merge pull request #4 from FinalAngel/feature/resolve-tests-conflicts
resolve test_frontend conflicts
2016-03-14 15:39:42 -04:00
Vadim Sikora 737d7aa19d use the function to generate XPath
much more clear what's actually happening
2016-03-14 18:33:44 +01:00
Vadim Sikora 24737bbbb4 add XPath generation func 2016-03-14 18:32:38 +01:00
Vadim Sikora 58ca2004a8 fix some of the pagetree tests 2016-03-14 16:09:09 +01:00
Vadim Sikora f93442edae fix arguments 2016-03-14 16:08:20 +01:00
Vadim Sikora 2e124f33dd resolve test_frontend conflicts 2016-03-14 14:21:06 +01:00
Paulo 20771dc937 Merge pull request #3 from FinalAngel/sane-add-plugin-v2
resolve conflicts in static
2016-03-10 09:38:08 -05:00
Vadim Sikora 8924515076 resolve conflicts in static 2016-03-10 09:59:44 +01:00
Vadim Sikora 025febfc38 no puns 2016-03-10 09:20:56 +01:00
Martin Koistinen 6374f79287 Bump to 3.2.3.dev1 2016-03-09 17:01:53 -05:00
Martin Koistinen 8be98e1671 Minify JS, etc. 2016-03-09 16:47:16 -05:00
Martin Koistinen e036898a4c Update changelog, docs 2016-03-09 16:46:39 -05:00
Martin Koistinen 92cddfea5e Update translation files 2016-03-09 16:46:24 -05:00
Martin Koistinen 5ca0aa12d9 Bump to 3.2.3 2016-03-09 16:42:33 -05:00
Stefan Foulis a44c693a62 add current release and support branches to travis 2016-03-09 22:38:54 +01:00
Stefan Foulis c1926d574a limit branches to build on travis
This limits travis to only build the master and develop branches. All
other code should be covered by the pull-request builds.
2016-03-09 15:36:30 +01:00
Daniele Procida cb71123e6b Merge pull request #5077 from divio/mcavigelli-small_documentation_fixes
Fixed numerous small documentation issues
2016-03-09 14:23:06 +00:00
Matthias Cavigelli a3299ad39b Fixed numerous small documentation issues
* Fixed link to anchor in same document
* Fixed sentence
* cd into doc before pip
* Changed link to new Sphinx homepage
* Following once should be sufficient
* Removed formatting for code
2016-03-09 14:18:14 +00:00
Daniele Procida ed5316e254 Merge pull request #5075 from divio/update-board-core-devs
Update board core devs
2016-03-08 15:07:16 +00:00
evildmp b7fbf56a5a Merge remote-tracking branch 'upstream/develop' into update-board-core-devs 2016-03-08 11:33:12 +00:00
evildmp fefcac0cd9 Updated Board/Core developers lists 2016-03-08 11:18:12 +00:00
Paulo 071bad68e3 Merge branch 'develop' into sane-add-plugin-v2
Fixed most conflicts.
Will need feeback from FE for the tests.
2016-03-07 17:44:01 -05:00
Paulo 23522562ea Merge pull request #5067 from czpython/fixes/issue-5054
Fixes issue 5054
2016-03-07 15:43:56 -05:00
Paulo 863f92dbc3 fixes api docs spelling 2016-03-07 13:36:31 -05:00
Martin Koistinen b82b20a71b Merge pull request #5072 from FinalAngel/feature/fix-pagetree-for-language-codes-with-dashes
Fix pagetree for language codes with dashes
2016-03-07 11:42:21 -05:00
Vadim Sikora f5b51b4d14 bundled files 2016-03-07 10:09:50 +01:00
Vadim Sikora e565a9ea4c strip dashes from language codes for pagetree 2016-03-07 10:09:45 +01:00
Iacopo Spalletti 56eb77ed92 Merge pull request #5064 from yakky/feature/fix_pagetree
Pass all trans in js templates to escapejs
2016-03-05 04:15:05 +01:00
Paulo 99528e9a61 move INITIAL_COMMENT to constants.REVISION_INITIAL_COMMENT 2016-03-04 14:18:44 -05:00
Paulo 0991f9d773 updates api docs 2016-03-04 14:07:48 -05:00
Paulo 46cdb262c7 adds tests for new with_revision option 2016-03-04 13:59:16 -05:00
Paulo 4b12d73a55 adds revision support to api 2016-03-04 13:20:21 -05:00
Vadim Sikora f0ba26a79e Merge pull request #167 from FinalAngel/feature/merge-upstream-develop
Feature/merge upstream develop
2016-03-04 13:32:57 +01:00
Vadim Sikora 61e47b9721 clarify comment 2016-03-04 13:31:57 +01:00
Vadim Sikora 84274a4802 add a test for copying a page into the sibling (copies tree) 2016-03-04 13:31:57 +01:00
Vadim Sikora 2ed42eb0ca add private _getPageIds method
it is helpful when there are more than one page with the same title
2016-03-04 13:31:56 +01:00
Vadim Sikora 1ae10c9e38 wip copy paste pagetree tests 2016-03-04 13:31:56 +01:00
Vadim Sikora 5b22f7cc97 fix comments 2016-03-04 13:31:56 +01:00
Vadim Sikora 0e9d2d9b9f add a "parent" option to the helpers 2016-03-04 13:31:56 +01:00
Vadim Sikora 73377598bf add a test for publishing / unpublishing 2016-03-04 13:31:56 +01:00
Vadim Sikora 5652b025f8 correct comment 2016-03-04 13:31:56 +01:00
Vadim Sikora 43d6d4a6e1 add a test for publishing a page without a slug/title 2016-03-04 13:31:56 +01:00
Vadim Sikora 92d3106910 remove second page first 2016-03-04 13:31:56 +01:00
Vadim Sikora db6bea0d5d forgot starts 2016-03-04 13:31:56 +01:00
Vadim Sikora f4154fe2bc add a test for "unnesting" pages (bypassed because fails) 2016-03-04 13:31:56 +01:00
Vadim Sikora 961a5743d6 add a test that pages can be nested 2016-03-04 13:31:56 +01:00
Vadim Sikora 0f6b299e0a add a tests for pages reordering 2016-03-04 13:31:56 +01:00
Vadim Sikora 637b17e0b9 add initial pagetree tests and add them to gulp file
Conflicts:
	gulpfile.js
2016-03-04 13:31:54 +01:00
Vadim Sikora 3eb1b27d60 fix and add helpers
fix removePage, reuse expandPlaceholderPlugins, add openSideframe, expandPageTree, getPageId
2016-03-04 13:30:26 +01:00
Vadim Sikora 02f3230a9c rm comment 2016-03-04 13:30:26 +01:00
Vadim Sikora a5ce3408b0 change selectors for the new page tree 2016-03-04 13:30:26 +01:00
Vadim Sikora 7683f1efb0 set toolbar to expanded by default
Conflicts:
	cms/static/cms/js/dist/bundle.admin.pagetree.min.js
	cms/static/cms/js/modules/cms.pagetree.js
2016-03-04 13:30:24 +01:00
Vadim Sikora afa532a750 stability fixes 2016-03-04 13:29:26 +01:00
Vadim Sikora 7ca5782e60 fix the url change 2016-03-04 13:29:26 +01:00
Vadim Sikora 18143ab6b5 fix lint 2016-03-04 13:16:34 +01:00
Vadim Sikora 82f1ac4cb2 bundled file 2016-03-04 12:03:26 +01:00
Vadim Sikora 69b87c0ccb fix incorrectly resolved conflict 2016-03-04 12:03:05 +01:00
Vadim Sikora 6f0cdb5b97 Merge branch 'develop' into develop-3.4
Conflicts:
	cms/static/cms/js/dist/bundle.admin.base.min.js
	cms/static/cms/js/dist/bundle.toolbar.min.js
	cms/static/cms/js/modules/cms.base.js
	cms/static/cms/js/modules/cms.toolbar.js
2016-03-04 11:56:31 +01:00
Iacopo Spalletti ef50c701cb Pass all trans in js templates to escapejs 2016-03-04 08:10:05 +01:00
Vadim Sikora a243cfb7ae Merge pull request #166 from FinalAngel/feature/unit-tests/modal-private
tests for loadIframe
2016-03-03 18:00:39 +01:00
Vadim Sikora 9d89197936 tests for loadIframe 2016-03-03 16:44:20 +01:00
Vadim Sikora bd7fa6e785 Merge pull request #165 from FinalAngel/feature/unit-tests/modal-private
Unit tests for modal private methods
2016-03-03 16:44:10 +01:00
Vadim Sikora 440654fb93 add tests for _changeIframe 2016-03-03 14:20:25 +01:00
Vadim Sikora 44070c196d adds tests for setupCtrlEnterSave 2016-03-03 13:40:13 +01:00
Vadim Sikora 04da7f5830 fix tests in IE 2016-03-03 12:17:03 +01:00
Vadim Sikora 67aa288c25 add tests for _deletePlugin 2016-03-03 11:54:52 +01:00
Vadim Sikora a30fdb526f add tests for _setButtons 2016-03-03 10:46:35 +01:00
Stefan Foulis 88869f3cd0 many minor syntax tweaks in docs
fixes nearly all things that the PyCharm rst parser warns about
2016-03-03 10:45:12 +01:00
Iacopo Spalletti d2ca25b995 Merge pull request #4809 from yakky/feature/setupcfg
Propose flake8 / isort configuration
2016-03-03 07:55:04 +01:00
Iacopo Spalletti c890ab3aeb Merge pull request #4947 from yakky/feature/refactor_commands
Refactor commands
2016-03-03 07:53:23 +01:00
Iacopo Spalletti b01e4112fb Merge pull request #5055 from yakky/merge/3.2.2
Forward port 3.2.2
2016-03-03 07:53:08 +01:00
Iacopo Spalletti e6045c5c97 More dead code removal 2016-03-03 06:44:21 +01:00
Iacopo Spalletti 7cbad4fbb2 Remove legacy code 2016-03-03 06:32:58 +01:00
Iacopo Spalletti 3bdbc21c23 Merge remote-tracking branch 'upstream/release/3.2.x' into HEAD 2016-03-03 06:22:14 +01:00
Martin Koistinen 04af778b98 Bumpt to 3.2.2.post0 2016-03-02 22:53:10 -05:00
Martin Koistinen 08f4efaadc Merge branch 'release/3.2.2' into release/3.2.x 2016-03-02 21:33:09 -05:00
Martin Koistinen 3f6f41ffe8 Merge branch 'release/3.2.2' into release/3.2.x 2016-03-02 20:18:14 -05:00
Martin Koistinen a953b395d7 Bump to 3.2.2 2016-03-02 20:17:32 -05:00
Martin Koistinen bd5b7001e3 Bump to 3.2.2 proper 2016-03-02 19:39:20 -05:00
Vadim Sikora 94de2d3a94 add tests for _setBreadcrumb 2016-03-02 15:08:36 +01:00
Vadim Sikora 93b10df76e Merge pull request #164 from FinalAngel/feature/unit-tests/modal-private
Modal private methods unit tests
2016-03-02 14:57:01 +01:00
Vadim Sikora cc1cab6448 add tests for stopResize 2016-03-02 14:45:52 +01:00
Vadim Sikora 0a77e5a946 add tests for startResize 2016-03-02 14:44:50 +01:00
Daniele Procida 135eaf200a Merge pull request #5040 from evildmp/general-docs-improvements
Improve index page
2016-03-02 10:56:44 +00:00
Daniele Procida 76b377799f Merge pull request #5035 from evildmp/improve-menu-page-extension-docs
Improved menu modifiers/page extension docs
2016-03-02 10:56:31 +00:00
evildmp a2a92531bd Improved menu modifiers/page extension docs 2016-03-02 10:52:09 +00:00
Vadim Sikora 289d14f370 add tests for _stopMove 2016-03-01 16:28:22 +01:00
Vadim Sikora 05d30933b6 add tests for _startMove 2016-03-01 15:51:19 +01:00
Vadim Sikora 9b93b8d87e wip 2016-03-01 15:24:35 +01:00
Vadim Sikora b533e7cf24 lint 2016-03-01 14:34:07 +01:00
Vadim Sikora 4c3963aab5 add tests for _hide 2016-03-01 14:29:13 +01:00
Vadim Sikora 3875e9aa7f add tests for _show 2016-03-01 14:12:46 +01:00
Vadim Sikora d6fed1bd00 Merge pull request #163 from FinalAngel/feature/modal-private-tests
Modal private tests
2016-03-01 14:10:40 +01:00
Vadim Sikora 07a113bdb9 add tests for calculateNewPosition 2016-03-01 11:11:36 +01:00
Vadim Sikora 9e3e84cf2a tests for _events 2016-03-01 09:55:53 +01:00
evildmp fdb4c48593 Improve index page 2016-02-29 01:54:52 +00:00
Vadim Sikora d5dc286d13 wip 2016-02-25 16:33:50 +01:00
Vadim Sikora 2b83ffad0b modal tests 2016-02-24 17:59:44 +01:00
Vadim Sikora dbbdf83c39 Merge pull request #162 from FinalAngel/feature/basejs-test
missing test
2016-02-24 11:51:10 +01:00
Vadim Sikora 348e89d8a3 remove 1.9 for now 2016-02-24 11:08:37 +01:00
Vadim Sikora 4059cf50ed missing semicolon 2016-02-24 11:08:17 +01:00
Vadim Sikora 2ba1d40f19 missing test 2016-02-24 10:56:47 +01:00
Vadim Sikora 37543416ed Merge branch 'develop' into develop-3.4
Conflicts:
	.travis.yml
	CHANGELOG.txt
	cms/static/cms/js/dist/bundle.admin.base.min.js
	cms/static/cms/js/dist/bundle.toolbar.min.js
	cms/static/cms/js/modules/cms.base.js
	cms/static/cms/js/modules/cms.plugins.js
	cms/static/cms/js/modules/cms.structureboard.js
	test_requirements/django-1.9.txt
	test_requirements/requirements_base.txt
2016-02-19 16:14:18 +01:00
Iacopo Spalletti 53ff9afe80 Fix typo 2016-02-15 12:27:25 +01:00
Iacopo Spalletti d0de3a7d97 Use copy site|lang syntax 2016-02-15 01:09:55 +01:00
Iacopo Spalletti eac04856ed Update 3.3 upgrade and changelog 2016-02-15 01:09:55 +01:00
Iacopo Spalletti a4a534944b Update docs 2016-02-15 01:09:26 +01:00
Iacopo Spalletti 5a67b32160 Fix error in subcommand handling 2016-02-15 01:09:26 +01:00
Iacopo Spalletti c817083b61 Fix commands tests 2016-02-15 01:09:26 +01:00
Iacopo Spalletti 0eb838509b Refactor commands 2016-02-15 01:09:26 +01:00
Iacopo Spalletti 052f516918 Merge pull request #5002 from yakky/merge/4967
Merge #4967
2016-02-13 10:25:52 +01:00
Iacopo Spalletti 20af349b1b Update changelog 2016-02-12 20:52:03 +01:00
Iacopo Spalletti 1efaab92e8 Code cleanup 2016-02-12 20:48:34 +01:00
Iacopo Spalletti 636b3c4267 Add test for copy plugins 2016-02-12 20:45:52 +01:00
Iacopo Spalletti f2d646bb0c Clean code 2016-02-12 19:17:27 +01:00
Martin Owens 0338848a7f Fix test with a sorting 2016-02-12 19:15:27 +01:00
Martin Owens 362e804fb6 Refactor menu testing with new assert and fix delete test and new add_translation test. 2016-02-12 19:15:27 +01:00
Martin Owens 0fc6ed8aa3 Tuck the language toolbar into sub menus so smaller screens can access the functionality. 2016-02-12 19:15:26 +01:00
Iacopo Spalletti 767a283f4b Merge pull request #4996 from retailify/patch-1
Update extending_page_title.rst
2016-02-11 16:50:45 +01:00
Thomas Meitz 010f388df5 Update extending_page_title.rst
self._page().get_title() should be self._get_page().get_title()
2016-02-11 14:24:39 +01:00
Iacopo Spalletti 52f61ac4cb Merge pull request #4992 from yakky/merge/3.2.2.pre1
Merge from 3.2.x branch
2016-02-11 08:37:06 +01:00
Iacopo Spalletti 58b93fac84 Fix test cache settings 2016-02-11 07:27:54 +01:00
Iacopo Spalletti 4a56d834ed Merge remote-tracking branch 'upstream/develop' into merge/3.1.6.pre1 2016-02-10 21:35:41 +01:00
Iacopo Spalletti 7d2c14cae3 Merge remote-tracking branch 'upstream/release/3.2.x' into merge/3.0.17.pre1 2016-02-10 21:34:56 +01:00
Iacopo Spalletti 101fe24d77 Merge pull request #4988 from timgraham/deprecated-patterns
Removed usage of django.conf.urls.patterns() (again).
2016-02-09 17:07:04 +01:00
Daniele Procida 1882eb7b37 Merge pull request #4976 from divio/irc-notes
Added notes on using KiwiIRC web client
2016-02-09 09:54:13 +00:00
Tim Graham 97e2743ae9 Removed usage of django.conf.urls.patterns() (again).
This function is deprecated in Django 1.8 and isn't necessary.
Some usage has bee introduced since fb6da2cb9a.
2016-02-08 21:08:20 -05:00
Iacopo Spalletti 1b3fd0cf73 Add editorconfig configuration 2016-02-07 21:02:13 +01:00
evildmp 808c8dfc1a Added notes on using KiwiIRC web client 2016-02-03 16:38:34 +00:00
Iacopo Spalletti 7867837834 Merge pull request #4972 from yakky/feature/33_upgrade_docs
django CMS 3.3 base docs
2016-01-30 19:24:05 +01:00
Iacopo Spalletti db836f41a9 Cleanup artifacts 2016-01-30 18:33:35 +01:00
Iacopo Spalletti 4d10c53e59 Update base documentation for 3.3 2016-01-30 18:31:07 +01:00
Iacopo Spalletti 410ba0660b Merge pull request #4971 from yakky/merge/3.2.1.final
Merge 3.2.1.final
2016-01-30 14:56:59 +01:00
Iacopo Spalletti 9d55638411 Merge remote-tracking branch 'upstream/release/3.2.x' into HEAD 2016-01-29 23:00:05 +01:00
Iacopo Spalletti f1e04a539d Merge pull request #4963 from yakky/merge/3.2.1.pre1
Forward port 3.2.x
2016-01-29 18:36:06 +01:00
Iacopo Spalletti 043a7f94b0 wut? 2016-01-28 22:54:48 +01:00
Iacopo Spalletti 487b386bee Forward port 3.2.x 2016-01-28 09:13:46 +01:00
Vadim Sikora 9658cc0859 wip clipboard copy all from placeholder test 2016-01-27 10:32:45 +01:00
Gentian Mazrekaj 23f358695b Merge pull request #153 from FinalAngel/feature/integration-tests/switch-space
Add tests to trigger space to switch mode
2016-01-22 13:29:11 +01:00
genti94 edd75f4bdb fix wrong comment 2016-01-22 09:46:29 +01:00
Gentian Mazrekaj caba4b231b Merge pull request #147 from FinalAngel/feature/integration-tests/modal
finished modal.js
2016-01-21 13:56:44 +01:00
genti94 98c8af19ed fix typo 2016-01-21 12:28:47 +01:00
genti94 0d952709b4 fix and add spaceSwitch code to createContent 2016-01-21 12:07:38 +01:00
genti94 8778bf2b28 Add tests to trigger space to switch mode 2016-01-21 11:36:05 +01:00
Vadim Sikora 0277169641 Merge pull request #152 from FinalAngel/feature/integration-tests/helpers
Add more testing helpers
2016-01-21 11:21:24 +01:00
Vadim Sikora a029c5d871 use expandPlaceholderPlugins helper 2016-01-21 11:04:56 +01:00
Vadim Sikora d6fb41bce6 add expandPlaceholderPlugins helper 2016-01-21 11:04:47 +01:00
Vadim Sikora 0cacb9118f use cms.switchTo helper 2016-01-21 10:49:37 +01:00
Vadim Sikora ed5c69af14 add cms.switchTo helper 2016-01-21 10:49:28 +01:00
genti94 bcc6c6e2c6 fix parse errors 2016-01-21 10:45:22 +01:00
genti94 0dd68b1e81 add new files 2016-01-21 10:31:22 +01:00
Vadim Sikora 499218f976 Merge pull request #151 from FinalAngel/feature/integration-tests/parent-child-restrictions-in-clipboard
Pasting restrictions
2016-01-21 10:25:14 +01:00
Vadim Sikora af358c9965 remove extra empty line [ci skip] 2016-01-21 10:22:04 +01:00
Vadim Sikora 33579dc934 add test for pasting plugins into plugins with child restrictions through dragndrop 2016-01-21 10:02:50 +01:00
Vadim Sikora 23c28164c0 add test for clipboard plugin parent restriction (dragndrop) 2016-01-21 09:41:02 +01:00
genti94 aee04a0f74 Merge branch 'develop-3.4' into feature/integration-tests/modal 2016-01-21 09:36:33 +01:00
Vadim Sikora 3a3503b632 add tests for pasting into plugin with child restriction 2016-01-21 09:16:15 +01:00
Iacopo Spalletti d151498f85 Enforce rules in migrations, djust line length according to django's own standard 2016-01-20 19:28:31 +01:00
Iacopo Spalletti 5afe58542b south_migrations is not needed anymore 2016-01-20 18:36:14 +01:00
Iacopo Spalletti 4f32f4e0d7 Propose flake8 / isort configuration 2016-01-20 18:36:14 +01:00
genti94 e48f970abe add new function and cleanup 2016-01-20 17:29:30 +01:00
Vadim Sikora b4b49144dc add test for clipboard plugin parent restriction 2016-01-20 17:08:55 +01:00
Vadim Sikora e91bbb75ff add aldryn_bootstrap3 2016-01-20 17:08:06 +01:00
Vadim Sikora 551790e5ae Merge pull request #4934 from FinalAngel/bugfix/placeholders_list
change condition of adding placeholder to placeholders_list
2016-01-20 11:19:42 +01:00
Vadim Sikora 4c4e68487d Merge branch 'develop' into bugfix/placeholders_list 2016-01-20 10:07:25 +01:00
Martin Koistinen 5e7c3ee96a Fix for failing djangocms-file tests 2016-01-19 11:31:01 -05:00
Vadim Sikora 39130c55fa Merge pull request #148 from FinalAngel/feature/integration-tests/ckeditor-in-wizard
change the way content is filled for wizard
2016-01-19 15:45:51 +01:00
Vadim Sikora 6119fc904c change data-tooltip to data-cms-tooltip 2016-01-19 14:48:58 +01:00
Vadim Sikora 6d4e625e89 change condition of adding placeholder to placeholders_list 2016-01-19 13:50:44 +01:00
Vadim Sikora 98f324761f change the way content is filled for wizard
merging latest upstream enabled the ckeditor for text content
2016-01-19 13:45:58 +01:00
genti94 d14c98e28f finished modal.js 2016-01-19 12:35:24 +01:00
Vadim Sikora 55b37e484c fix tests after merging develop 2016-01-19 10:42:52 +01:00
Vadim Sikora 84cc382d48 Merge branch 'develop' into develop-3.4
Conflicts:
	cms/static/cms/js/dist/bundle.toolbar.min.js
	cms/static/cms/js/modules/cms.messages.js
	cms/static/cms/js/modules/cms.plugins.js
	cms/static/cms/js/modules/cms.sideframe.js
	cms/static/cms/js/modules/cms.structureboard.js
	cms/static/cms/js/modules/cms.toolbar.js
	cms/static/cms/js/modules/cms.tooltip.js
2016-01-19 10:38:34 +01:00
Vadim Sikora 2ec3e75dca Merge pull request #146 from FinalAngel/feature/integration-tests/fix-integration-tests
Fix integration tests
2016-01-19 10:23:54 +01:00
Vadim Sikora 28acab4b3a changelog entry [ci skip] 2016-01-19 09:43:34 +01:00
Vadim Sikora 1b1a666ccf adapt docs 2016-01-19 09:38:15 +01:00
Vadim Sikora e926e1ee86 bundled file 2016-01-19 09:36:58 +01:00
Vadim Sikora 743c1e8853 add animating classes 2016-01-19 09:36:31 +01:00
Vadim Sikora 4108c9dbaa use correct cache setting 2016-01-19 09:36:19 +01:00
Vadim Sikora 25bfb56460 try this 2016-01-18 17:06:33 +01:00
Vadim Sikora 5708d4f31c history adjustment 2016-01-18 17:00:58 +01:00
Vadim Sikora a4a0d692f0 waits 2016-01-18 16:27:49 +01:00
Vadim Sikora 8804906b5d wait for resource 2016-01-18 16:15:55 +01:00
Vadim Sikora 63eb81fbeb fix semicolon 2016-01-18 16:15:42 +01:00
Vadim Sikora b73026b937 Merge branch 'develop-3.4' into feature/integration-tests/fix-integration-tests 2016-01-18 16:07:07 +01:00
Vadim Sikora 44a61721ee Merge pull request #145 from FinalAngel/feature/integration-tests/history
Feature/integration tests/history
2016-01-18 16:06:10 +01:00
Vadim Sikora 68f8e2ae5a bundled file 2016-01-18 16:04:20 +01:00
Vadim Sikora 0ee71dbd92 tests 2016-01-18 16:04:16 +01:00
Vadim Sikora fc87a33255 change when cms-toolbar-expanded class is added 2016-01-18 16:04:12 +01:00
Vadim Sikora 4132e4cebc fix more stuff 2016-01-18 16:03:50 +01:00
Vadim Sikora 8916a88390 wait till toolbar is open 2016-01-18 16:03:31 +01:00
Vadim Sikora da4a769002 replace wait for selectors with the 10ms 2016-01-18 16:02:49 +01:00
Vadim Sikora b14793005e echo a message so it doesn't look like stalled build 2016-01-18 16:01:34 +01:00
Vadim Sikora dff035110f add wait when switching language 2016-01-18 16:01:21 +01:00
Vadim Sikora 9f77e42f5f disable caching 2016-01-18 16:01:00 +01:00
genti94 44dc341e4a add missed xpath 2016-01-18 15:29:36 +01:00
genti94 9892bb6658 add try to waitWhileVisible 2016-01-18 13:31:14 +01:00
genti94 f68cfb9c58 fixed lint issue 2016-01-18 13:04:40 +01:00
genti94 9569847690 changed this.mouse.click to this.click 2016-01-18 12:16:28 +01:00
genti94 354920500f fixed various stuff from comments 2016-01-18 12:09:05 +01:00
genti94 599882a885 add reversion 2016-01-18 11:00:22 +01:00
genti94 192168ef15 Merge branch 'develop-3.4' into feature/integration-tests/history 2016-01-18 10:52:49 +01:00
genti94 bb33b5c8d0 add cms.js changes 2016-01-18 10:43:09 +01:00
genti94 201cfc587d add history and revertLive 2016-01-18 10:39:24 +01:00
Vadim Sikora af45d98df0 fix createContent 2016-01-17 17:58:55 +01:00
Vadim Sikora 337ff2e6bd Merge pull request #144 from FinalAngel/feature/integration-tests/resize-sideframe
add a test for iframe resizing
2016-01-15 17:49:01 +01:00
Vadim Sikora 03b10ac5ef add a test for iframe resizing
also removes incorrect test for sideframe not being closed after reload
2016-01-15 17:30:33 +01:00
Vadim Sikora c6f43ef9cc Merge pull request #143 from FinalAngel/feature/integration-tests/narrow-screen
Narrow screen tests
2016-01-15 17:03:31 +01:00
Vadim Sikora 09262868a3 fix createContent 2016-01-15 15:57:41 +01:00
Vadim Sikora 86dd3b88c0 add narrow screen tests to gulpfile 2016-01-15 15:43:35 +01:00
Vadim Sikora 4bc176280d make sure that base template is "mobile-friendly" 2016-01-15 15:43:06 +01:00
Vadim Sikora 053493520e add toolbar menu tests for narrow screens 2016-01-15 15:42:47 +01:00
Vadim Sikora ee5f1a79fc check that login works on every screen 2016-01-15 15:42:32 +01:00
Vadim Sikora 704d9e15a2 fix incorrect assertEval signature
always checks for true, second param should be string
2016-01-15 15:42:19 +01:00
Vadim Sikora 5448f00a6d Merge pull request #142 from FinalAngel/feature/integration-tests/dragndrop-not-allowed
add test for "not allowed" to drop case
2016-01-15 13:50:32 +01:00
Vadim Sikora 28eb3d449c add test for "not allowed" to drop case 2016-01-15 13:26:18 +01:00
Vadim Sikora 1d172202f8 Merge pull request #141 from FinalAngel/feature/integration-tests/page-types
Templates and page types
2016-01-15 13:25:48 +01:00
Angelo Dini b4d30eaba5 Merge pull request #4919 from divio/feature/readme
Update README.rst
2016-01-15 11:59:28 +01:00
Vadim Sikora c90a92fda6 actually wait until page creation is complete 2016-01-15 11:50:59 +01:00
Vadim Sikora b7422e9931 fix createContent 2016-01-15 11:38:37 +01:00
Vadim Sikora 1e37e9ac1c add pageTypes to gulpfile 2016-01-15 10:42:30 +01:00
Vadim Sikora 0dfe7d149f add page type test
additionally it tests page creation flow from toolbar menu
2016-01-15 10:39:46 +01:00
Vadim Sikora 6f2321b41c correct test name 2016-01-15 10:39:12 +01:00
Vadim Sikora 9f2b13aabe add optional "parent" param to cms.addPlugin 2016-01-15 09:59:20 +01:00
Vadim Sikora 8aa5690acf wip page types and templates 2016-01-15 09:58:34 +01:00
Vadim Sikora 0b0be56c0d add custom html to page template 2016-01-15 09:58:10 +01:00
Vadim Sikora 8f1bd33807 fix teardown in logout 2016-01-15 09:57:56 +01:00
Angelo Dini 630c5f2b6d Update README.rst 2016-01-15 09:55:16 +01:00
Paulo 7252ddfc0d Merge pull request #4916 from czpython/fixes/issue-4913
Fixes/issue 4913
2016-01-14 13:19:26 -05:00
Vadim Sikora bf53dea6df Merge pull request #140 from FinalAngel/feature/integration-tests/permissions
Permissions
2016-01-14 16:37:32 +01:00
Vadim Sikora 55dba4c0eb small fixes and forgotten login 2016-01-14 16:27:32 +01:00
Paulo c5e6c40a06 updates 3.2.1 changelog 2016-01-14 10:04:48 -05:00
Paulo 398093ef4f Adds render_plugin_toolbar_config templatetag.
The render_plugin_toolbar_config tag will now be used to render
the plugin's toolbar html config.
2016-01-14 10:04:37 -05:00
Paulo 59ae7414a7 use .create(). it's cleaner 2016-01-14 10:04:24 -05:00
Paulo 600d1bd9e1 be consistent about datatypes 2016-01-14 10:04:11 -05:00
Vadim Sikora a3b15de38b oops forgot to remove the page 2016-01-14 15:32:38 +01:00
Vadim Sikora b464ab3180 add permissions tests to gulpfile 2016-01-14 15:30:31 +01:00
Vadim Sikora b04942dbcb fix comments 2016-01-14 15:30:07 +01:00
Vadim Sikora 6417022857 add permission tests 2016-01-14 15:30:03 +01:00
Vadim Sikora f91fbe52c0 add permission related settings to test server 2016-01-14 15:29:53 +01:00
Vadim Sikora b078f0a747 Merge pull request #139 from FinalAngel/feature/integration-tests/wizard
Wizard tests
2016-01-14 14:50:04 +01:00
Paulo 957539756e Merge pull request #4915 from czpython/fixes/issue-4905
Fixes issue 4905 on 3.3.x
2016-01-14 07:53:52 -05:00
Vadim Sikora e5aff1e66b wait until logout is actually loaded 2016-01-14 13:24:56 +01:00
Vadim Sikora 92d25bc9f3 add tests for wizard 2016-01-14 13:13:59 +01:00
Vadim Sikora ff73b0956d add a comment 2016-01-14 13:13:52 +01:00
Vadim Sikora 780ac6ec8a add wizard tests to gulpfile 2016-01-14 13:13:42 +01:00
Vadim Sikora 89b31c4967 attempt to fix travis build 2016-01-14 10:53:15 +01:00
Vadim Sikora fdcb82ad02 attempt to fix travis build 2016-01-14 10:22:47 +01:00
Paulo 8a1c44e96e don't hardcode pks 2016-01-13 19:11:15 -05:00
Paulo 33e716d1e5 only fetch target if target id provided 2016-01-13 19:11:15 -05:00
Paulo 9065e47df6 flakes 2016-01-13 19:11:15 -05:00
Paulo 64fec00ede adapts tests 2016-01-13 19:11:15 -05:00
Paulo 83a76590cf refactors some permission functions to be more dry 2016-01-13 19:11:15 -05:00
Paulo 787f1e8e08 first refactor of permission code 2016-01-13 19:11:15 -05:00
Vadim Sikora 595227c386 wait a bit until considering that we are logged out 2016-01-13 18:24:14 +01:00
Vadim Sikora 1ac3b1925f Merge pull request #138 from FinalAngel/feature/integration-tests/clipboard
tests for clipboard
2016-01-13 17:48:51 +01:00
Vadim Sikora 76c1df10b4 Merge branch 'develop-3.4' into feature/integration-tests/clipboard
Conflicts:
	gulpfile.js
2016-01-13 17:36:57 +01:00
Vadim Sikora 177988e86d fix the failing test 2016-01-13 17:35:31 +01:00
Gentian Mazrekaj f22af6e14b Merge pull request #131 from FinalAngel/feature/integration-tests/change-settings
Feature/integration tests/change settings
2016-01-13 17:12:59 +01:00
Vadim Sikora 01d6cdfc43 forgot setup/teardown 2016-01-13 15:58:13 +01:00
Vadim Sikora f25c8a8df6 add test to gulpfile 2016-01-13 15:56:46 +01:00
Vadim Sikora 20b1954193 add tests for clipboard 2016-01-13 15:56:30 +01:00
genti94 373e0a1a22 add semicolons 2016-01-13 14:44:49 +01:00
Vadim Sikora f288e5cc2c Merge pull request #137 from FinalAngel/feature/lint-should-fail-build
fail build on lint
2016-01-13 14:30:06 +01:00
genti94 dbcf325eb1 fix indentation 2016-01-13 14:29:02 +01:00
genti94 faa97128a4 fix indentation 2016-01-13 14:28:20 +01:00
Vadim Sikora b94b4dba1a restore jscs failures [skip saucelabs] 2016-01-13 14:23:04 +01:00
Vadim Sikora 5347037637 fix things [skip saucelabs] 2016-01-13 14:17:39 +01:00
genti94 2541eb1449 add assertEquals 2016-01-13 14:14:01 +01:00
Vadim Sikora 4da7095865 fail build on lint 2016-01-13 14:07:42 +01:00
Angelo Dini 2f3f1a1b13 Merge pull request #4911 from FinalAngel/feature/button
Update button image
2016-01-13 13:21:08 +01:00
Vadim Sikora 67623fd1a6 Merge pull request #136 from FinalAngel/feature/integration-tests/page-control
Page control tests
2016-01-13 13:19:45 +01:00
Angelo Dini 83fd0dda3b add new button 2016-01-13 13:19:32 +01:00
Angelo Dini 94d5b80d20 Merge branch 'develop' of github.com:divio/django-cms into develop
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2016-01-13 13:17:02 +01:00
Vadim Sikora cbf022c73d remove unnecessary empty lines [ci skip] 2016-01-13 12:52:22 +01:00
Vadim Sikora 7463f1fa2d enable all other tests 2016-01-13 12:01:00 +01:00
Vadim Sikora 9142ab218c add a test for publish page / unpublish page menu item 2016-01-13 11:43:04 +01:00
Vadim Sikora 15e548365b add a test for hiding/showing page in navigation 2016-01-13 11:31:10 +01:00
genti94 135c9b9afc fix merge conflict 2016-01-13 10:36:41 +01:00
Gentian Mazrekaj f33c5f3ddc Merge pull request #130 from FinalAngel/feature/integration-tests/adds-new-user
Feature/integration tests/adds new user
2016-01-13 09:26:42 +01:00
Paulo b9fe25b0a9 Merge pull request #4909 from czpython/fixes/pages-menu-missing-on-fresh-install
Fixes/pages menu missing on fresh install
2016-01-12 21:30:09 -05:00
Paulo 15e1a9408a fixes invalid translation on startup 2016-01-12 18:13:42 -05:00
Paulo 62f0273571 fixes failing tests 2016-01-12 17:37:30 -05:00
Paulo 315842b936 cosmetics 2016-01-12 17:37:30 -05:00
Paulo 0526cdde81 fixes issue with page menu missing 2016-01-12 17:37:30 -05:00
Martin Koistinen c9a7bb05bd Merge pull request #4903 from divio/prevent_duplicate_slugs_via_wizard
Prevent duplicate slugs via wizard
2016-01-12 12:55:15 -05:00
Vadim Sikora 5c243e25e1 comments 2016-01-12 18:31:05 +01:00
Vadim Sikora 002fedeae6 add page control tests 2016-01-12 18:30:23 +01:00
Vadim Sikora 74e4f6e1df update djangocms-admin-style for integration tests 2016-01-12 18:29:56 +01:00
genti94 26434c99d8 add missing semicolon 2016-01-12 18:08:45 +01:00
genti94 2584651030 fix xPath 2016-01-12 18:06:43 +01:00
Martin Koistinen 8c691d0fd7 Prevent duplicate slugs via page wizard 2016-01-12 09:44:23 -05:00
genti94 7f4cc5dfaf fix merge conflict in gulpfile 2016-01-12 15:29:09 +01:00
genti94 02c503576d add changeSettings file 2016-01-12 15:25:16 +01:00
genti94 9f556ad9a4 remove waitForURL 2016-01-12 11:45:14 +01:00
genti94 6ee2d15a90 second waitForSelector to fix bug in travis 2016-01-12 11:10:59 +01:00
genti94 9adc896f04 add waitForUrl 2016-01-12 10:55:48 +01:00
genti94 051a8a8e1c add teardown functions 2016-01-12 10:37:48 +01:00
genti94 4f79a317b4 add missing file and fixed comments 2016-01-12 10:22:06 +01:00
genti94 212ed8bddc Merge branch 'develop-3.4' into feature/integration-tests/adds-new-user 2016-01-12 10:06:49 +01:00
Gentian Mazrekaj ae1cd6da4d Merge pull request #126 from FinalAngel/feature/integration-tests/disable-toolbar
add disableToolbar.js
2016-01-12 10:02:01 +01:00
genti94 36349e1f01 Merge branch 'develop-3.4' into feature/integration-tests/disable-toolbar 2016-01-12 09:46:36 +01:00
Vadim Sikora a027f080b0 Merge pull request #4901 from FinalAngel/upstream-develop
Forwardport current 3.2.x efforts to develop
2016-01-12 08:22:23 +01:00
Vadim Sikora 4b85515bac Merge branch 'release/3.2.x' into upstream-develop
Conflicts:
	test_requirements/django-1.6.txt
	test_requirements/django-1.7.txt
2016-01-11 17:52:56 +01:00
Vadim Sikora 9a7b48f27e Merge branch 'release/3.2.x' into develop
Conflicts:
	test_requirements/django-1.6.txt
	test_requirements/django-1.7.txt
2016-01-11 17:49:45 +01:00
genti94 bed0fa793c fixed users.js 2016-01-11 17:49:02 +01:00
Martin Koistinen 7654be7977 Update commercial support link. 2016-01-11 11:45:20 -05:00
Martin Koistinen f1ae226e32 Update commercial support link 2016-01-11 11:43:11 -05:00
genti94 50da547f67 add-new-user 2016-01-11 17:40:52 +01:00
Daniele Procida 7688ddf327 Merge pull request #4899 from evildmp/templatetag-docs
Removed doubled line from templatetags reference
2016-01-11 16:13:32 +00:00
evildmp 824c4092a7 Removed doubled line from templatetags reference 2016-01-11 14:43:13 +00:00
Vadim Sikora 71a94c5d62 Merge pull request #128 from FinalAngel/feature/integration-tests/dragndrop
add dragndrop test for nested plugins
2016-01-11 10:17:03 +01:00
Vadim Sikora 4a2f77bfdb try to bypass visibility assertion if top level grid plugin is already expanded 2016-01-09 10:46:24 +01:00
Vadim Sikora fe26c20882 add dragndrop test for nested plugins 2016-01-08 18:21:36 +01:00
Vadim Sikora dfe8d2ec06 Merge pull request #123 from FinalAngel/feature/integration-tests/dragndrop
Drag plugin from one placeholder to another
2016-01-08 18:17:28 +01:00
genti94 07d423068a fix indentation 2016-01-08 17:47:03 +01:00
genti94 877a862d68 add disableToolbar.js 2016-01-08 17:21:43 +01:00
Gentian Mazrekaj c068c4d929 Merge pull request #124 from FinalAngel/messages
delete messages.js and replace variables with strings
2016-01-08 15:44:52 +01:00
genti94 1fe4b64ddd delete messages.js and replace variables with strings 2016-01-08 15:30:02 +01:00
Vadim Sikora b29963ef26 oops forgot this one 2016-01-08 14:48:09 +01:00
Vadim Sikora 98e09f1168 move plugin from one placeholder to another 2016-01-08 14:28:11 +01:00
Vadim Sikora 5648bed0a0 correct setup / teardown 2016-01-08 14:27:56 +01:00
Vadim Sikora b030b73a14 wait till admin is loaded to succeed with login 2016-01-08 14:27:41 +01:00
Vadim Sikora f1af020f0b wip 2016-01-07 14:44:12 +01:00
Vadim Sikora 53d30d3321 initial dragndrop test setup 2016-01-07 12:09:33 +01:00
Vadim Sikora 119e53a66c Merge pull request #121 from FinalAngel/feature/integration-tests/publish
Publishing a page with publish button
2016-01-07 12:08:26 +01:00
Vadim Sikora 51f3794e64 add a test for publishing a page with publish button 2016-01-07 09:45:27 +01:00
Vadim Sikora b26b46651d Merge pull request #98 from FinalAngel/feature/integration-tests/publish-with-delay
publish with delay
2016-01-06 18:23:28 +01:00
Vadim Sikora 12f2dc7db6 messages [ci skip] 2016-01-06 18:19:29 +01:00
Vadim Sikora aee2b8e40c revert indent [ci skip] 2016-01-06 18:08:58 +01:00
Vadim Sikora 6a8fac0ba2 fix the test 2016-01-06 16:52:05 +01:00
Vadim Sikora 9d4f2273d8 fix comment 2016-01-06 16:51:44 +01:00
Vadim Sikora 51d38c9391 add setup/teardown 2016-01-06 16:51:38 +01:00
Vadim Sikora 6f5e2a2f1a linting errors 2016-01-06 15:37:20 +01:00
Vadim Sikora 228321454c Merge branch 'develop-3.4' into feature/integration-tests/publish-with-delay
Conflicts:
	cms/tests/frontend/integration/settings/messages.js
	gulpfile.js
2016-01-06 15:35:49 +01:00
Vadim Sikora be1982225c Merge pull request #118 from FinalAngel/feature/edit-content-tools
Feature/edit content tools
2016-01-06 15:32:58 +01:00
Vadim Sikora d4eea2ebc8 add clearClipboard 2016-01-06 14:54:53 +01:00
Vadim Sikora a519dc8f14 fix linting 2016-01-06 14:54:10 +01:00
Vadim Sikora bc21b9c945 wait until all the requests are finished before declaring paste was successful 2016-01-06 14:54:03 +01:00
Vadim Sikora c887874961 setup teardown for editContentTools 2016-01-06 14:53:02 +01:00
Vadim Sikora b30e5bd34c use structureboard add button
because apparently clipboard has one too
2016-01-06 14:52:37 +01:00
Vadim Sikora d229fb7708 remove empty line 2016-01-06 14:52:11 +01:00
Vadim Sikora 7b6f333c3f Merge pull request #116 from FinalAngel/feature/make-integration-tests-independent
Feature/make integration tests independent
2016-01-06 14:02:24 +01:00
Vadim Sikora 0d6e7a72a2 forgot this one 2016-01-06 12:06:16 +01:00
Vadim Sikora 2a45783cc2 change login/logout helpers for consistency
now all of them must be called ala gulp plugins
2016-01-06 11:57:24 +01:00
Vadim Sikora e562b65e66 rename addPage param to title for consistency with removePage 2016-01-06 11:52:40 +01:00
Vadim Sikora 2329287f3c adapt removePage calls 2016-01-06 11:52:16 +01:00
Vadim Sikora 1b8bb5448b make removePage remove by name if possible 2016-01-06 11:51:08 +01:00
Vadim Sikora fa5e2d7b3a add remaining setup/teardown sequences 2016-01-06 10:17:32 +01:00
Vadim Sikora b9ff08b9a5 choose correct item, and not the first one when adding plugin 2016-01-06 10:01:44 +01:00
Vadim Sikora 5dc0432fc7 a bit more descriptive errors 2016-01-06 10:01:00 +01:00
Vadim Sikora 6290b4cf71 asset regex instead of full value 2016-01-06 10:00:51 +01:00
Vadim Sikora de8b6c5bfb change cms helpers invocation 2016-01-06 10:00:39 +01:00
Vadim Sikora 93f6ee0412 change the way cms helpers are used
also adds "addPlugin" method that is very simple for now
2016-01-06 09:59:33 +01:00
Vadim Sikora 63f28c106a use web-security=no
until phantomjs 2 is supported this is supposed to fix a warning about protocols that must match
2016-01-06 09:58:43 +01:00
Vadim Sikora f5c8b894ca setup and teardown in toolbar 2016-01-05 14:47:49 +01:00
Vadim Sikora b5c8f502ad add setup for editMode 2016-01-05 14:30:11 +01:00
Vadim Sikora c6eabcf7ce add setup/teardown for addfirstpage 2016-01-05 14:29:57 +01:00
Vadim Sikora 0cc56bc787 add teardown for loginAdmin 2016-01-05 14:29:42 +01:00
Vadim Sikora bfeb0970bc do not rely on plugin id being 1 all the time 2016-01-05 14:29:22 +01:00
Vadim Sikora b3d35a601e add basic helpers 2016-01-05 14:29:00 +01:00
Vadim Sikora 353688ee5b move setup to a prerequisite file 2016-01-05 14:28:08 +01:00
Vadim Sikora a933191cd0 Merge branch 'develop' into develop-3.4 2016-01-04 16:27:50 +01:00
Vadim Sikora dde96079e3 bundled files 2016-01-04 14:38:10 +01:00
Vadim Sikora 7e6508267e Merge pull request #115 from FinalAngel/feature/cms-navigation-tests
cms navigation tests
2016-01-04 14:37:22 +01:00
Vadim Sikora 4cc1e3f47b linebreaks for readability [ci skip] 2016-01-04 14:37:06 +01:00
Vadim Sikora 0945d33ff2 different rendering engines 2016-01-04 13:19:26 +01:00
Vadim Sikora 3aacbcdb37 Merge pull request #114 from FinalAngel/feature/cms-clipboard-tests
cms clipboard tests
2016-01-04 12:03:18 +01:00
Vadim Sikora ea5bc281f9 add initial tests for cms.navigation 2016-01-04 12:03:04 +01:00
Vadim Sikora f0e8449149 no need to wait till dom is ready to declare class instance 2016-01-04 12:02:44 +01:00
Vadim Sikora 703d80b719 correct spec title 2016-01-04 12:02:26 +01:00
Vadim Sikora 67b41209c1 add a test for the submenu items 2016-01-04 10:50:38 +01:00
Vadim Sikora 44ed806da1 more tests for instance 2016-01-04 10:50:27 +01:00
Vadim Sikora fa59701f5c fix fixture 2016-01-04 10:50:13 +01:00
Iacopo Spalletti dbfdf63d22 Merge pull request #4868 from kburts/patch-1
Add aldryn_common to installed apps to avoid error when adding people…
2016-01-04 09:34:33 +01:00
Vadim Sikora 841c98b858 last commit of 2015 2015-12-31 18:39:54 +01:00
Vadim Sikora 015eab7974 tests for the instance 2015-12-31 18:24:32 +01:00
Vadim Sikora a971e1ba67 add initial clipboard spec outline 2015-12-31 16:02:25 +01:00
Vadim Sikora 65106a18f4 no longer need to wait till document ready to declare a class 2015-12-31 16:02:10 +01:00
Vadim Sikora 13191093e7 Merge pull request #112 from FinalAngel/feature/cms-sideframe-tests
Sideframe tests
2015-12-31 15:34:15 +01:00
Vadim Sikora 01052bbc0b correctly indent sideframe iframe fixture [ci skip] 2015-12-31 15:29:40 +01:00
Vadim Sikora dd369e18f2 Merge pull request #111 from FinalAngel/feature/cms-structureboard-tests
Structureboard tests
2015-12-31 15:18:55 +01:00
Vadim Sikora 4a3d912ba9 add tests for close 2015-12-31 15:17:40 +01:00
Vadim Sikora 1f8cf2de0d add test for event handler 2015-12-31 15:17:32 +01:00
Vadim Sikora f4faeb8479 fix comment on hide 2015-12-31 15:17:19 +01:00
Vadim Sikora 4bf36831b4 move chainable test
otherwise it fails in IE because of the iframe.contents() problem
2015-12-31 14:33:27 +01:00
Vadim Sikora 4f58c70b00 mock up things required for iframe failure 2015-12-31 14:32:57 +01:00
Vadim Sikora 5fe33269d2 move setsettings spy 2015-12-31 14:32:11 +01:00
Vadim Sikora 771b041645 valid fixture 2015-12-31 14:31:28 +01:00
Vadim Sikora 167f55f1d3 add iframe.contents() try/catch to sideframe
same as with modal, sometimes if the iframe is thrown away too fast it can happen that $.fn.contents throws an error
2015-12-31 14:31:14 +01:00
Vadim Sikora aabe093cfe add more tests for sideframe open 2015-12-31 13:50:12 +01:00
Vadim Sikora db1d56a8ef bundled file 2015-12-31 13:19:06 +01:00
Vadim Sikora 95489c2539 add tests for sideframe open 2015-12-31 13:18:45 +01:00
Vadim Sikora d369a468ff add tests for sideframe instance 2015-12-31 13:18:30 +01:00
Vadim Sikora a2530b7272 add sideframe fixtures 2015-12-31 13:18:03 +01:00
Vadim Sikora 2a3e260234 replace window quering in sideframe with cached one 2015-12-31 13:16:28 +01:00
Vadim Sikora 493206c12a correct comment 2015-12-31 13:16:07 +01:00
Vadim Sikora 83d1197832 additional assert for structureboard ui 2015-12-31 13:15:56 +01:00
Vadim Sikora 69b84b7584 additional test for modal open (no params) 2015-12-31 13:15:38 +01:00
Vadim Sikora 3863cf4a42 initial test setup for sideframe 2015-12-31 10:47:29 +01:00
Vadim Sikora 388571cb5e do not wait for document ready to declare class 2015-12-31 10:47:12 +01:00
Vadim Sikora f7315561f2 add additional tests for structureboard ui 2015-12-31 09:55:58 +01:00
Vadim Sikora fbd080ecae add test to check if initial state was applied correctly 2015-12-31 09:35:31 +01:00
Vadim Sikora df9952a4c8 make instanbul not minify files after instrumenting, useful for debugging 2015-12-31 09:29:32 +01:00
Vadim Sikora 1cd44ac9c0 Merge pull request #110 from FinalAngel/feature/cms-plugin-tests
remaining plugin tests
2015-12-30 17:43:05 +01:00
Vadim Sikora c0d4f4ab99 initialize global handlers in structureboard 2015-12-30 17:41:44 +01:00
Vadim Sikora 3005e4a718 additional test for structureboard 2015-12-30 17:41:24 +01:00
Vadim Sikora 7bd113557b cleanup plugins a bit 2015-12-30 17:41:02 +01:00
Vadim Sikora 0eff6837dd bundled file 2015-12-30 17:40:44 +01:00
Vadim Sikora a906f814fb change how actualized placeholders are initiated
similar to cms.toolbar, otherwise hard to test
2015-12-30 17:40:39 +01:00
Vadim Sikora acab725c7e ignore some things for coverage 2015-12-30 17:39:59 +01:00
Vadim Sikora a3b085d4b7 add tests for getIds 2015-12-30 16:09:05 +01:00
Vadim Sikora 9ea8891a59 add another test for getId 2015-12-30 16:08:57 +01:00
Vadim Sikora 3602d45186 add tests for getId 2015-12-30 15:44:50 +01:00
Vadim Sikora 3139186505 warning and bundled file 2015-12-30 15:44:38 +01:00
Vadim Sikora 3d2b5512ba add tests for hide 2015-12-30 15:19:47 +01:00
Vadim Sikora b14ae4dcb4 make sure it really remembers state 2015-12-30 15:19:40 +01:00
Vadim Sikora 996d3345f6 fake window better 2015-12-30 15:19:27 +01:00
Martin Koistinen 0986c6a783 Merge pull request #4869 from kburts/patch-2
Fixed broken imports
2015-12-30 08:48:14 -05:00
Vadim Sikora a753fd4b1d add tests for show 2015-12-30 14:39:50 +01:00
Vadim Sikora 0b947901d3 make window mockable 2015-12-30 14:39:25 +01:00
Vadim Sikora 0518a87a79 add a static placeholder 2015-12-30 14:39:05 +01:00
Vadim Sikora 9d486605d3 empty initial state for placeholders 2015-12-30 14:38:46 +01:00
Vadim Sikora fa33704ff0 initial tests for instance 2015-12-30 13:36:36 +01:00
Vadim Sikora a527e55a74 remove unused speed option from structureboard 2015-12-30 13:36:24 +01:00
Vadim Sikora b2ee697ab9 initial specs 2015-12-30 13:19:31 +01:00
Vadim Sikora 3ade7a2cac initial setup 2015-12-30 13:01:41 +01:00
Vadim Sikora 2ae898ea7c no need to wait for document ready to declare class 2015-12-30 13:01:31 +01:00
Vadim Sikora 8d4eb0142f add tests for editPluginPostAjax 2015-12-30 11:59:07 +01:00
Vadim Sikora 2aebb524d7 add tests for deletePlugin 2015-12-30 11:56:16 +01:00
Vadim Sikora 45762c3ccb quotes 2015-12-30 11:47:36 +01:00
Vadim Sikora df879412d5 lint 2015-12-30 11:47:29 +01:00
Vadim Sikora 3ef594796d add tests for movePlugin 2015-12-30 11:47:20 +01:00
Vadim Sikora cc401092a5 correct initial states for toolbar elements 2015-12-30 11:46:49 +01:00
Vadim Sikora f5fc01366a bundled file 2015-12-30 10:40:38 +01:00
Vadim Sikora c99b8aa559 add tests for pastePlugin 2015-12-30 10:37:15 +01:00
Vadim Sikora a0cc8f2dda move initialization of global event handlers into static method 2015-12-30 10:36:56 +01:00
Vadim Sikora 30df5a0963 add a warning about the _checkIfPasteAllowed requirement 2015-12-30 10:36:31 +01:00
Vadim Sikora 3fa2ab6862 remove draggable-disabled on RandomPlugin fixture 2015-12-30 10:36:03 +01:00
Vadim Sikora ece8f080d7 add clipboard fixture 2015-12-30 10:35:40 +01:00
Vadim Sikora 3e88c73140 add tests for cutPlugin 2015-12-30 09:29:09 +01:00
Vadim Sikora 701ea4215a Merge pull request #109 from FinalAngel/feature/cms-plugin-tests
Plugins tests
2015-12-29 17:31:54 +01:00
Vadim Sikora 97fdf21496 add tests for copyPlugin 2015-12-29 16:59:58 +01:00
Vadim Sikora 3ae0077d5e correct text 2015-12-29 16:57:21 +01:00
Vadim Sikora da54974341 dry fakeModal 2015-12-29 15:31:22 +01:00
Vadim Sikora bf00d4c687 add tests for editPlugin 2015-12-29 15:28:16 +01:00
Vadim Sikora b15aa7ba56 add tests for addPlugin 2015-12-29 15:01:04 +01:00
Vadim Sikora 4c9b609f0c add additional test for messages
it accepts html
2015-12-29 15:00:45 +01:00
Vadim Sikora 2c820ba0df add tests for CMS.Plugin instance 2015-12-29 13:26:27 +01:00
Vadim Sikora f7a42dde5a rm unnecessary trans tag 2015-12-29 13:25:21 +01:00
Vadim Sikora acf0b25e8c basic plugins fixture 2015-12-29 13:25:10 +01:00
Vadim Sikora 2e3d97928b add initial specs for CMS.Plugin public api 2015-12-29 11:10:59 +01:00
Vadim Sikora 601c59d394 do not require waiting for document ready when declaring a class 2015-12-29 10:26:59 +01:00
Vadim Sikora 51c8b889ee Merge pull request #108 from FinalAngel/feature/cms-toolbar-tests
Toolbar tests
2015-12-29 10:24:01 +01:00
Vadim Sikora ee879841ba tests for openAjax 2015-12-29 09:44:22 +01:00
Vadim Sikora d30bb929ff on second thought, let's make the check correct instead 2015-12-29 09:44:12 +01:00
Vadim Sikora 71bcefe350 fake the settings and setSettings
initialStates gets fired in IE and throws errors
2015-12-29 09:40:42 +01:00
Vadim Sikora ab31693964 use responseText instead of non-existent response 2015-12-29 09:39:40 +01:00
Paulo 7366bd79d1 Merge pull request #4866 from czpython/feature/deprecate-plugin-url-properties
Feature/deprecate plugin url properties
2015-12-28 17:12:56 -05:00
Vadim Sikora 937781d840 add initial test for openAjax 2015-12-28 15:24:36 +01:00
Vadim Sikora baf53769a6 more test cases 2015-12-28 14:53:32 +01:00
Vadim Sikora b3c84c59af add tests for showLoader/hideLoader 2015-12-28 14:49:04 +01:00
Vadim Sikora 6b12c60a4a check that unlocked state works 2015-12-28 14:45:36 +01:00
Vadim Sikora 43468c4b90 add tests for close 2015-12-28 14:43:39 +01:00
Vadim Sikora 20e539a883 update fixture 2015-12-28 14:43:23 +01:00
Vadim Sikora f7a6b58a10 expand test case for initial states 2015-12-28 13:46:57 +01:00
Vadim Sikora 1a59e5fa11 remove code related to switcher 2015-12-28 13:46:33 +01:00
Vadim Sikora 22fb2b873b add tests for open 2015-12-28 13:28:30 +01:00
Vadim Sikora 13f2535fab add tests for toggle 2015-12-28 11:59:02 +01:00
Vadim Sikora d39e6cbbd9 initial toolbar tests 2015-12-28 11:53:32 +01:00
Vadim Sikora 049d767ace basic toolbar fixture 2015-12-28 11:53:14 +01:00
Vadim Sikora e0559f3415 remove remains of dead switcher code 2015-12-28 11:53:05 +01:00
Vadim Sikora b72e3d6dd8 Merge branch 'develop-3.4' into feature/cms-toolbar-tests 2015-12-28 10:15:58 +01:00
Vadim Sikora be833653e8 Merge pull request #107 from FinalAngel/feature/cms-base-less-async
refactor base tests to be less async
2015-12-28 10:15:36 +01:00
Vadim Sikora a995cc6401 refactor base tests to be less async 2015-12-28 10:01:49 +01:00
Vadim Sikora 28116a604f Merge branch 'develop-3.4' into feature/cms-toolbar-tests 2015-12-28 08:53:26 +01:00
Vadim Sikora c5bef64daa Merge branch 'develop' into develop-3.4 2015-12-28 08:53:06 +01:00
Vadim Sikora 0cd3097d7e Merge branch 'develop-3.4' into feature/cms-toolbar-tests
Conflicts:
	cms/static/cms/js/dist/bundle.toolbar.min.js
2015-12-28 08:52:38 +01:00
Vadim Sikora 3ff902eb56 rm unnecessary globals decl 2015-12-28 08:48:14 +01:00
Vadim Sikora f69eaf5405 initial toolbar setup 2015-12-28 08:48:06 +01:00
Vadim Sikora 874d839f47 bundled file 2015-12-28 08:47:53 +01:00
Vadim Sikora 407bca27a2 remove deprecated method and settings 2015-12-28 08:47:41 +01:00
Kevin Burton 389a862757 Fixed broken imports
cms_menus.py should be in polls_plugin/ not in env/src/... right? Or at least that's how I got it to work and editing the parent package as little as possible seems like a good thing.
2015-12-25 21:57:37 -08:00
Kevin Burton c2fea75aae Add aldryn_common to installed apps to avoid error when adding people: https://github.com/aldryn/aldryn-common/issues/14 2015-12-25 19:11:59 -08:00
Ruslan Malogulko 06e3a41095 Merge pull request #106 from FinalAngel/feature/CMS-882-drag-plugins-integration-test-clone
Test templates improvement
2015-12-25 17:18:27 +02:00
Ruslan Malogulko a4d9dfd490 Update check utils tests 2015-12-25 16:25:05 +02:00
Ruslan Malogulko aa96ca4a62 Update template indentation 2015-12-25 15:08:04 +02:00
Ruslan Malogulko d1c17f2c59 Update test templates 2015-12-25 14:42:42 +02:00
Ruslan Malogulko c44962a5b0 Update random strings 2015-12-25 11:52:51 +02:00
Ruslan Malogulko 0f3d4cbafc Update testserver config with proper templates 2015-12-25 11:24:29 +02:00
Ruslan Malogulko deb1259149 Apply changes to config 2015-12-24 18:26:25 +02:00
Ruslan Malogulko a796effbdd Test commit 2015-12-24 17:15:24 +02:00
Paulo f9a8c36158 updates docs 2015-12-23 17:25:32 -05:00
Paulo 7327b25b64 adapt tests 2015-12-23 17:14:16 -05:00
Paulo ea34d17fdd show deprecation warnings for the now deprecated plugin url properties 2015-12-23 17:14:07 -05:00
Ruslan Malogulko ba3cf1fe35 Merge pull request #99 from FinalAngel/feature/delete-copy-cut-utilities-integration-test
Implement edit page content utils integration test
2015-12-21 16:54:15 +02:00
Ruslan Malogulko fdae722adc Implement edit page content utils integration test 2015-12-21 16:30:48 +02:00
Ruslan Malogulko d4e67a01a0 Merge pull request #97 from FinalAngel/feature/extend-randomstring-helper-integration-tests
Extend randomString helper
2015-12-21 16:13:37 +02:00
Dmitry Gorelik 5f1eaa4611 publish with delay 2015-12-18 18:24:01 +02:00
Ruslan Malogulko b2cc52610e Linting project and small refactoring 2015-12-18 15:36:43 +02:00
Ruslan Malogulko 2b9407e13d Extend randomString helper 2015-12-18 15:19:32 +02:00
Ruslan Malogulko ee1fddf972 Merge pull request #95 from FinalAngel/feature/edit-content-integration-test
Implement edit content integration test
2015-12-18 11:25:21 +02:00
Ruslan Malogulko d09b64080e Remove check of previous content 2015-12-18 11:16:37 +02:00
Ruslan Malogulko b1690d7f32 Merge branch 'feature/edit-content-integration-test' of github.com:FinalAngel/django-cms into feature/edit-content-integration-test
Conflicts:
	cms/tests/frontend/integration/settings/messages.js
2015-12-18 10:49:55 +02:00
Ruslan Malogulko 58e0d72c13 Implement edit content integration test 2015-12-18 10:47:49 +02:00
Dmytro Gorelik dfd31bd247 Merge pull request #94 from FinalAngel/feature/integration-tests/page-edit-mode
page edit mode
2015-12-18 10:31:52 +02:00
Dmitry Gorelik 76cc4a32d2 page edit mode 2015-12-17 17:39:51 +02:00
Ruslan Malogulko f79008c18f Implement edit content integration test 2015-12-17 17:39:16 +02:00
Dmytro Gorelik f92bea4bfd Merge pull request #91 from FinalAngel/feature/integration-tests/create-another-page
clean localstorage & wait for toolbar
2015-12-17 12:52:59 +02:00
Dmitry Gorelik f61b9d2035 lint 2015-12-17 12:18:16 +02:00
Dmitry Gorelik efd609ebe7 page creation 2015-12-17 12:16:35 +02:00
Dmitry Gorelik 859f428c3e modal open 2015-12-17 11:59:12 +02:00
Dmitry Gorelik e03f35797e lint 2015-12-17 11:59:12 +02:00
Dmitry Gorelik bdda2470fb wait fot class, not timeout 2015-12-17 11:59:12 +02:00
Dmitry Gorelik da21c610bd clean localstorage & wait for toolbar 2015-12-17 11:59:12 +02:00
Ruslan Malogulko f8d3d8c6fc Merge pull request #92 from FinalAngel/feature/switch-language-check-integration-test
Switch language integration test
2015-12-17 11:11:59 +02:00
Ruslan Malogulko 1423b428d8 Code refactoring 2015-12-17 10:36:31 +02:00
Ruslan Malogulko 0306962d6d Fixes according to the comments in PR 2015-12-16 19:24:58 +02:00
Ruslan Malogulko c76ad39943 Update with proper messages 2015-12-16 18:12:26 +02:00
Ruslan Malogulko 7dc62aff61 Implement switch language integration test 2015-12-16 17:57:09 +02:00
Martin Koistinen 5440f82022 Merge pull request #4855 from mkoistinen/remove_deprecated_dict
Remove references to deprecated dict 'placeholders'
2015-12-16 08:59:18 -05:00
Dmytro Gorelik 44f8628aea Merge pull request #90 from FinalAngel/feature/integration-tests/add-content-fix
add content suite fix
2015-12-16 15:55:59 +02:00
Dmitry Gorelik 61b6f5694f messages 2015-12-16 13:05:27 +02:00
Dmitry Gorelik c6899cb715 add content suite fix 2015-12-16 13:00:34 +02:00
Ruslan Malogulko c6a294796c Merge pull request #89 from FinalAngel/feature/create-content-integration-test
Create Content integration test
2015-12-16 12:23:13 +02:00
Dmytro Gorelik b83741bf21 Merge pull request #84 from FinalAngel/feature/user-management-integration-test
user profile
2015-12-16 10:00:21 +02:00
Martin Koistinen 8ae628e570 Remove references to deprecated dict 'placeholders' 2015-12-15 16:03:40 -05:00
Ruslan Malogulko 6bed3e959c Merge branch 'develop-3.4' of github.com:FinalAngel/django-cms into feature/create-content-integration-test
Conflicts:
	gulpfile.js
2015-12-15 22:31:06 +02:00
Ruslan Malogulko 80ce9edaec Update gulpfile with new test file and jslint fixes 2015-12-15 22:25:21 +02:00
Ruslan Malogulko 2f583f8967 Update messages 2015-12-15 22:22:06 +02:00
Ruslan Malogulko 472ca09dc5 Update tests with cancel creation and text filter check while creation 2015-12-15 21:56:10 +02:00
Ruslan Malogulko 88385f8736 Update with search with filter 2015-12-15 17:25:15 +02:00
Ruslan Malogulko 359efdee4d Core content creation 2015-12-15 16:36:24 +02:00
Dmitry Gorelik 1e717cffbe open users right away 2015-12-15 15:48:45 +02:00
Dmitry Gorelik 33d88815a6 user profile 2015-12-15 15:41:05 +02:00
Dmytro Gorelik abc09bbabb Merge pull request #81 from FinalAngel/feature/sideframe-admin-integration-test
sideframe
2015-12-15 14:43:29 +02:00
Dmitry Gorelik a382ba024f page suite update 2015-12-15 12:16:08 +02:00
Dmitry Gorelik fc7e602724 sideframe 2015-12-14 16:22:47 +02:00
Dmytro Gorelik daac754e42 Merge pull request #80 from FinalAngel/feature/login-toolbar-integration-test
publish & toolbar login
2015-12-14 15:01:44 +02:00
Dmitry Gorelik 6ea4362c53 move handler kill 2015-12-14 13:45:31 +02:00
Dmitry Gorelik 12e1a5dbdf publish & toolbar login 2015-12-14 13:43:42 +02:00
Dmytro Gorelik d82cd74380 Merge pull request #79 from FinalAngel/feature/first-page-creation-integration-test
first page creation
2015-12-14 12:37:33 +02:00
Dmitry Gorelik d0bdf67685 lint 2015-12-14 12:23:49 +02:00
Dmitry Gorelik 4452a7ee06 future messages 2015-12-14 12:06:26 +02:00
Dmitry Gorelik 4768eea4fa first page creation 2015-12-14 12:03:05 +02:00
Vadim Sikora f41a8d57ca no need to wait till dom is ready to declare a class 2015-12-11 17:18:19 +01:00
Vadim Sikora 7daaefcf5c Merge pull request #78 from FinalAngel/feature/fix-saucelabs-condition
fix condition to run saucelabs
2015-12-11 16:50:20 +01:00
Vadim Sikora 39dc770d88 fix condition to run saucelabs 2015-12-11 16:32:24 +01:00
Dmitry Gorelik f81e08e5fd testserver settings update 2015-12-11 16:46:45 +02:00
Dmytro Gorelik bbdb6b10fc Merge pull request #77 from FinalAngel/feature/logout-integration-test
logout integration tests
2015-12-11 16:26:15 +02:00
Vadim Sikora 3d2b1daa96 Merge pull request #76 from FinalAngel/feature/revert-saucelabs
revert `use saucelabs` to be `skip saucelabs`
2015-12-11 15:20:06 +01:00
Dmitry Gorelik 79c4d05226 logout integration tests 2015-12-11 16:06:38 +02:00
Vadim Sikora 84845d7832 a bit of documentation [skip saucelabs] 2015-12-11 15:01:01 +01:00
Dmytro Gorelik 4515b1f6d2 Merge pull request #75 from FinalAngel/toolbar
toolbar show/hide
2015-12-11 15:45:30 +02:00
Vadim Sikora 25008c6454 revert use saucelabs to be skip saucelabs
since we figured out the issue with it, we can use it reliably now
and opt out if needed
2015-12-11 14:45:10 +01:00
Vadim Sikora b059448256 Merge pull request #74 from FinalAngel/feature/cms-tooltip-unit-tests
Tooltip unit tests
2015-12-11 14:44:15 +01:00
Dmitry Gorelik de32a541f1 toolbar show/hide 2015-12-11 15:32:41 +02:00
Vadim Sikora b585ac4788 reformat code a bit 2015-12-11 14:14:25 +01:00
Vadim Sikora ee253f92e5 tests for position 2015-12-11 13:50:56 +01:00
Dmytro Gorelik 68bd6dc503 Merge pull request #73 from FinalAngel/phantomjs-console-errors
Function.prototype.bind polyfill
2015-12-11 12:49:45 +02:00
Vadim Sikora 48b2a457c7 namespace mousemove a bit more, since it's on body 2015-12-11 11:20:41 +01:00
Vadim Sikora 48e59ea8bb tests for hide 2015-12-11 11:20:21 +01:00
Vadim Sikora 70d65f78d8 tests for show 2015-12-11 11:16:28 +01:00
Dmitry Gorelik 717639dc8d Function.prototype.bind polyfill added 2015-12-11 11:57:40 +02:00
Vadim Sikora 2e7ebeae81 tests for displayToggle 2015-12-11 10:05:34 +01:00
Vadim Sikora db6bdd2311 tests for instance 2015-12-11 10:00:06 +01:00
Vadim Sikora e85c34844d fix the bug where forceTouchOnce is undefined 2015-12-11 09:44:27 +01:00
Mykhailo Kolesnyk 17ec834d87 Merge pull request #72 from FinalAngel/feature/testserver-settings
Testserver settings
2015-12-10 18:40:06 +02:00
Mykhailo Kolesnyk 1b6ab4f3f0 testserver: do not remove SQlite database in python script
djangocms-helper actually executes run() method twice: once to
run migrations, and then to start server. So cleaninig up DB there
does not work. Also it was too fragile and hidden from the end user.
2015-12-10 18:14:12 +02:00
Vadim Sikora 7d3a9fff8d outline the tests 2015-12-10 17:04:13 +01:00
Vadim Sikora 6a17935681 don't wait for document ready for declaring a class 2015-12-10 17:04:02 +01:00
Mykhailo Kolesnyk bc2667237a Docs: update integrations tests section with a simpler test servere command 2015-12-10 17:55:19 +02:00
Mykhailo Kolesnyk 89df94327d Use separate file with djangocms-helper runner and settings 2015-12-10 17:55:19 +02:00
Vadim Sikora bc56e2b4ba Merge pull request #71 from FinalAngel/feature/cms-modal-close-tests
messages tests
2015-12-10 16:08:43 +01:00
Vadim Sikora 938a68bc2a cache object.keys [ci skip] 2015-12-10 15:24:01 +01:00
Vadim Sikora 4325ec2b59 add messages tests [use saucelabs] 2015-12-10 12:07:40 +01:00
Vadim Sikora 1422a9e84c add a messages fixture 2015-12-10 12:07:21 +01:00
Vadim Sikora fa2500d8c9 don't wait for dom ready to define a class 2015-12-10 12:06:56 +01:00
Dmytro Gorelik 344f3c012a Merge pull request #67 from FinalAngel/initial-test-suite
initial test setup
2015-12-10 12:29:45 +02:00
Mykhailo Kolesnyk 4c8b98ea4c Docs: show how to create and activate virtualenv for integration tests. 2015-12-10 12:04:51 +02:00
Mykhailo Kolesnyk 1cb5442ce3 Docs: describe how to use integration test server and test suite. 2015-12-10 11:48:44 +02:00
Mykhailo Kolesnyk 054b257d39 Docs: add valid integration test names to example 2015-12-10 11:48:17 +02:00
Mykhailo Kolesnyk e4e288ebcb Travis: show currently installed package versions after running 'pip install' 2015-12-10 11:27:57 +02:00
Mykhailo Kolesnyk 4ad00ee725 Travis: use CMS version from the current directory to run test server 2015-12-10 11:26:12 +02:00
Dmitry Gorelik 143d7cd52e typo 2015-12-10 11:17:28 +02:00
Angelo Dini 06fbbd1df1 Merge pull request #4834 from FinalAngel/feature/flash
Remove remaining flash traces
2015-12-10 09:22:42 +01:00
Dmitry Gorelik 33655d9e94 non-failing minimum 2015-12-09 19:22:06 +02:00
Mykhailo Kolesnyk 53c7e32216 Travis: adjust excludes to match new DATABASE_URL 2015-12-09 18:51:36 +02:00
Mykhailo Kolesnyk 3cd169e19f Travis: try to get rid of multiline shell commands in travis 2015-12-09 18:48:23 +02:00
Vadim Sikora 9a3c92dfdd Merge pull request #70 from FinalAngel/feature/cms-modal-close-tests
cms modal close tests
2015-12-09 17:39:13 +01:00
Mykhailo Kolesnyk 2d7c2db7be Travis: run integration tests only on Python 2.7 2015-12-09 18:27:18 +02:00
Vadim Sikora e0bb135206 fix the tests that depended on the state from base [use saucelabs] 2015-12-09 17:26:41 +01:00
Mykhailo Kolesnyk aefd1eeaa3 Travis: move test server command into separate file 2015-12-09 18:21:17 +02:00
Vadim Sikora 4b03b4313b throw in another assert 2015-12-09 17:16:26 +01:00
Vadim Sikora 5d04d2383b remaining tests for close [use saucelabs] 2015-12-09 17:13:05 +01:00
Vadim Sikora f709f8eb29 initial tests for close 2015-12-09 16:54:18 +01:00
Vadim Sikora 6a9cc7a7a1 add cms-top to modal fixture 2015-12-09 16:31:35 +01:00
Vadim Sikora 86fe9c5037 fix incorrect test 2015-12-09 16:31:23 +01:00
Mykhailo Kolesnyk 5e833dab17 Integration tests: adjust first window title to match plain CMS installation 2015-12-09 17:13:03 +02:00
Mykhailo Kolesnyk deba00eedf Travis: run integration tests server via djangocms-helper 2015-12-09 17:12:24 +02:00
Mykhailo Kolesnyk 7219410546 Travis: use local DB file for SQLite (restriction of djangocms-helper) 2015-12-09 17:11:14 +02:00
Mykhailo Kolesnyk d9652bb2f0 Add djangocms-helper to test requirements 2015-12-09 17:10:30 +02:00
Vadim Sikora da2507f700 Merge pull request #69 from FinalAngel/feature/cms-modal-unit-tests
modal unit tests
2015-12-09 16:01:22 +01:00
Vadim Sikora 5612ca384a fix wording [use saucelabs] 2015-12-09 14:51:26 +01:00
Vadim Sikora d39df4e5fa add reset 2015-12-09 14:25:46 +01:00
Vadim Sikora d358af9fbb use toHaveCss instead of toBeVisible
`toBeVisible` uses jQuery's `:visible` which is using incorrect (or rather, unusual) offsetWidth value for scaled elements in Safari 9 (others not tested)
2015-12-09 14:25:39 +01:00
Vadim Sikora 66b6215a0e reuse modal variable [use saucelabs] 2015-12-09 13:46:33 +01:00
Vadim Sikora ab3475a25f tests for maximize 2015-12-09 13:45:08 +01:00
Vadim Sikora 738398df3d expect restored modal to have correct styles 2015-12-09 13:44:55 +01:00
Vadim Sikora 2f58de6038 restore the karma-sauce-launcher version [use saucelabs] 2015-12-09 10:51:37 +01:00
Vadim Sikora 6757b94bd1 add a comment about why do we need a timeout [ci skip] 2015-12-09 10:35:42 +01:00
Vadim Sikora 9f4dc6ec2d minimize tests [use saucelabs] 2015-12-09 10:34:27 +01:00
Vadim Sikora 47df868ed5 add woff2 2015-12-09 10:33:37 +01:00
Vadim Sikora 26dfcee77a eliminate 404s 2015-12-09 10:29:38 +01:00
Vadim Sikora 24d0a5b796 try safari 7 [use saucelabs] 2015-12-09 09:48:27 +01:00
Dmitry Gorelik 5b6eedc607 error message styling 2015-12-09 10:47:24 +02:00
Vadim Sikora 02faeb18aa ios is also broken [use saucelabs] 2015-12-09 09:30:49 +01:00
Vadim Sikora e330ebb78d fix a bug in ie11 [use saucelabs] 2015-12-09 08:52:14 +01:00
Angelo Dini 851c3cb594 remove remaining flash traces 2015-12-09 08:21:25 +01:00
Vadim Sikora 0e6630be74 limit browsers [use saucelabs] 2015-12-09 08:13:15 +01:00
Vadim Sikora 1842d49f8d again [use saucelabs] 2015-12-09 00:14:38 +01:00
Vadim Sikora fd82bd75df check for ie10, no concurrency [use saucelabs] 2015-12-08 23:12:47 +01:00
Vadim Sikora dfaf0f6ca6 test for _getWindow [use saucelabs] 2015-12-08 22:59:48 +01:00
Vadim Sikora 19664bea78 increase concurrency 2015-12-08 22:59:18 +01:00
Vadim Sikora a723138d2f refactor unit tests for reloadBrowser to use DI
apparently you cannot reassign window.parent in some browsers
2015-12-08 22:59:04 +01:00
Vadim Sikora 085709a53e refactor reloadWindow to use DI 2015-12-08 22:57:20 +01:00
Vadim Sikora 2d1bf6b14b downgrade karma-sauce-launcher [use saucelabs] 2015-12-08 20:37:46 +01:00
Vadim Sikora bd8d685e3c no concurrency [use saucelabs] 2015-12-08 18:29:12 +01:00
Vadim Sikora dd9682aab3 try to [use saucelabs] 2015-12-08 18:17:54 +01:00
Vadim Sikora db6bfbd546 fix linting 2015-12-08 18:02:20 +01:00
Vadim Sikora 450dba9e81 some of the tests for minimize 2015-12-08 18:00:41 +01:00
Vadim Sikora f552786c23 structure for minimize and try to [use saucelabs] 2015-12-08 16:39:58 +01:00
Martin Koistinen e0a9a4a9fa Merge branch 'flash_is_dead' into develop
# Conflicts:
#	docs/how_to/install.rst
2015-12-08 10:00:23 -05:00
Vadim Sikora b2029c6db9 additional tests for open 2015-12-08 15:20:34 +01:00
Vadim Sikora d9eae78c3b more load tests 2015-12-08 14:53:10 +01:00
Vadim Sikora eaeadfd7ba non preprocessed fixtures for iframes 2015-12-08 13:49:41 +01:00
Vadim Sikora 2d0668d1bf initial open tests 2015-12-08 13:49:19 +01:00
Vadim Sikora 10ea473011 simple modal tests 2015-12-08 13:49:02 +01:00
Vadim Sikora 0946c002c0 move pending to jshintrc 2015-12-08 13:48:37 +01:00
Dmitry Gorelik 0c6104c9d7 fix missing external echo 2015-12-08 14:45:34 +02:00
Dmitry Gorelik 898736b25a casper event handlers 2015-12-08 14:40:24 +02:00
Dmitry Gorelik f2fd13ecca structure update 2015-12-08 11:48:14 +02:00
Vadim Sikora ee4d9b03f9 Merge branch 'develop-3.4' into feature/cms-modal-unit-tests 2015-12-08 10:31:40 +01:00
Vadim Sikora 5867cfc88b Merge pull request #68 from FinalAngel/feature/cms-base-tests-additions
skip tests that require localstorage if it is not actually supported
2015-12-08 10:30:43 +01:00
Vadim Sikora 92a8b0a1fd add comment [ci skip] 2015-12-08 10:24:27 +01:00
Vadim Sikora c0d6d99043 skip tests that require localstorage if it is not actually supported 2015-12-08 10:14:32 +01:00
Vadim Sikora eeab00cd0b wip 2015-12-08 09:54:14 +01:00
Vadim Sikora 2afa7e18e6 fix comments 2015-12-08 09:48:40 +01:00
Vadim Sikora e86cde7512 do not wait for document.ready to declare modal class 2015-12-08 09:46:16 +01:00
Vadim Sikora 4095fec3db Merge branch 'develop' into develop-3.4 2015-12-08 09:40:44 +01:00
Vadim Sikora 1c108928af Merge pull request #66 from FinalAngel/feature/cms-base-unit-tests
cms.base.js unit tests
2015-12-08 09:39:54 +01:00
Vadim Sikora 8830798da2 add makeURL check with real url 2015-12-08 09:30:41 +01:00
Vadim Sikora 4b6e88cd29 minified helpers 2015-12-08 09:25:05 +01:00
Vadim Sikora b6dfeae48a tests for reloadBrowser 2015-12-07 21:23:38 +01:00
Vadim Sikora 1f90277915 tests for getSettings 2015-12-07 15:25:44 +01:00
Vadim Sikora 3ae438ee6c use responseText with getSettings 2015-12-07 15:25:02 +01:00
Vadim Sikora e6b0f25f0a test for setSettings 2015-12-07 14:31:29 +01:00
Vadim Sikora 504871e109 use responseText for setSettings 2015-12-07 14:31:22 +01:00
Dmitry Gorelik 2b8a5202eb login setup 2015-12-07 15:29:24 +02:00
Vadim Sikora 341f0a062d test secureConfirm 2015-12-06 14:59:53 +01:00
Vadim Sikora 7492be0fc9 dots > progress 2015-12-06 12:55:40 +01:00
Vadim Sikora 93b578bb00 test prevent/allow touchscrolling 2015-12-05 19:20:22 +01:00
Vadim Sikora fc6b07dbe5 test cms events 2015-12-05 18:53:54 +01:00
Vadim Sikora c6eda45864 use accessible private variable for event bus 2015-12-05 18:53:26 +01:00
Vadim Sikora 8dd182e4d2 rename misleading parameter 2015-12-05 18:52:56 +01:00
Vadim Sikora 6e0b503c35 tests for once 2015-12-05 17:39:26 +01:00
Vadim Sikora fa413e49b5 fix linting 2015-12-04 15:56:29 +01:00
Vadim Sikora ed9180200e Merge branch 'develop-3.4' into feature/cms-base-unit-tests
Conflicts:
	docs/contributing/testing.rst
2015-12-04 15:39:59 +01:00
Dmytro Gorelik 6f08294e79 Merge pull request #62 from FinalAngel/integration-tests-setup
integration tests setup
2015-12-04 16:36:53 +02:00
Vadim Sikora bec1ec0259 test preventSubmit 2015-12-04 15:34:53 +01:00
Vadim Sikora 7383531eab add jasmine-jquery and fixtures 2015-12-04 15:34:44 +01:00
Angelo Dini 54693e7a12 Merge pull request #4814 from FinalAngel/develop
Merge 3.2.x into develop
2015-12-04 15:06:39 +01:00
Angelo Dini a939d12e71 fix merge conflict 2015-12-04 14:26:13 +01:00
Angelo Dini db8ac530df Merge branch 'release/3.2.x' of github.com:divio/django-cms into develop
Conflicts:
	cms/admin/placeholderadmin.py
	cms/tests/test_admin.py
2015-12-04 14:23:39 +01:00
Vadim Sikora 75c9cbc630 add tests for csrf 2015-12-04 13:25:16 +01:00
Vadim Sikora e513e46e11 add jasmine-ajax 2015-12-04 13:25:06 +01:00
Vadim Sikora 55fb4bea9d use same quoting 2015-12-04 12:56:19 +01:00
Vadim Sikora ca2eba5a14 debounce tests 2015-12-04 12:56:09 +01:00
Vadim Sikora cec8e3867e tests for throttle 2015-12-04 12:02:20 +01:00
Dmitry Gorelik 516d64e4f2 typo 2015-12-04 11:33:03 +02:00
Dmitry Gorelik b92a74bd6c integration tests docs 2015-12-04 11:31:58 +02:00
Iacopo Spalletti 3e58004ddd Merge pull request #4698 from yakky/merge/4329
Merge #4329
2015-12-03 21:33:37 +01:00
Vadim Sikora 6e653f7387 fix spelling errors 2015-12-03 20:00:34 +01:00
Vadim Sikora df5b462925 remove modal test, will be changed anyway 2015-12-03 19:58:22 +01:00
Vadim Sikora 7b2425228a actually no need to check for method existence
it will fail all the other tests anyway
2015-12-03 18:13:27 +01:00
Vadim Sikora a29b1b40f2 tests for CMS.API.Helpers.makeURL 2015-12-03 18:07:55 +01:00
Vadim Sikora 8f3754f872 more bulletproof url parsing 2015-12-03 18:07:35 +01:00
Vadim Sikora d082200289 change the condition in makeURL
because JSON existence is completely irrelevant
2015-12-03 18:07:09 +01:00
Vadim Sikora bc3f965b87 fix the bug where makeURL only replaced first & with &amp 2015-12-03 18:06:47 +01:00
Vadim Sikora 48ca97d905 move declaration of CMS.API out of document.ready 2015-12-03 17:43:48 +01:00
Vadim Sikora 2566410a72 initial structure for cms.base.test.js 2015-12-03 17:43:13 +01:00
Vadim Sikora 77c5691c4c Merge branch 'develop-3.4' into integration-tests-setup
Conflicts:
	gulpfile.js
2015-12-03 16:43:06 +01:00
Vadim Sikora 59c44e54ab Merge pull request #65 from FinalAngel/feature/use-saucelabs-on-demand
Use saucelabs on demand
2015-12-03 16:41:37 +01:00
Vadim Sikora 893d63ed47 Merge pull request #63 from FinalAngel/feature/unit-tests-documentation
Unit tests documentation
2015-12-03 16:41:22 +01:00
Dmitry Gorelik f828cb8a7d partial suite run 2015-12-03 17:36:25 +02:00
Dmitry Gorelik b5b9db6c75 lint update with node:true 2015-12-03 16:45:04 +02:00
Vadim Sikora 196bfdfe5c try to [use saucelabs] 2015-12-03 15:40:10 +01:00
Vadim Sikora 7b8adc2d91 try again 2015-12-03 15:29:05 +01:00
Vadim Sikora cb280bd480 fix invalid travis config 2015-12-03 15:28:14 +01:00
Vadim Sikora e76c40c8b5 and again 2015-12-03 15:27:03 +01:00
Vadim Sikora 2fd476bb13 try again 2015-12-03 15:25:39 +01:00
Vadim Sikora 9abf6078b7 travis thinks there is no config 2015-12-03 15:23:01 +01:00
Vadim Sikora ac507dca84 travis please 2015-12-03 15:21:34 +01:00
Dmitry Gorelik 1e12b93433 lint fixes 2015-12-03 16:07:39 +02:00
Vadim Sikora 3d7dd59c99 try to trigger a build 2015-12-03 15:05:49 +01:00
Dmitry Gorelik 17c86a1da2 tests linting setup 2015-12-03 15:54:39 +02:00
Vadim Sikora 609b055580 trigger a build again [use saucelabs] 2015-12-03 14:54:15 +01:00
Vadim Sikora fd90fc86d1 add a small test [use saucelabs] 2015-12-03 14:15:01 +01:00
Vadim Sikora 30ef80b4ee don't use coveralls on local machine 2015-12-03 14:13:05 +01:00
Dmitry Gorelik 327ddeea8b casperjs config 2015-12-03 15:10:14 +02:00
Vadim Sikora f51dbd1565 use saucelabs on demand 2015-12-03 14:08:13 +01:00
Vadim Sikora 666b5af2d5 add an option to run frontend tests on saucelabs through commit message 2015-12-03 13:49:25 +01:00
Vadim Sikora ef38f6aacc rename gulp tests:unit:watch to reflect the docs 2015-12-03 13:45:10 +01:00
Vadim Sikora e2175c833f add docs about unit testing 2015-12-03 13:44:37 +01:00
Vadim Sikora 6bea7bde72 point to correct phantomjs, use local casper 2015-12-03 13:17:21 +01:00
Vadim Sikora f37bf932ec npm shrinkwrap 2015-12-03 11:49:36 +01:00
Vadim Sikora 2e8095fe44 Merge branch 'integration-tests-setup' of github.com:FinalAngel/django-cms into integration-tests-setup 2015-12-03 11:48:29 +01:00
Vadim Sikora 76ff648a2a remove django 1.9 for now 2015-12-03 11:48:24 +01:00
Dmitry Gorelik 5a396d7d35 sample integration test 2015-12-03 12:19:12 +02:00
Vadim Sikora be364e12ca remove duplicated requirement 2015-12-03 11:14:46 +01:00
Vadim Sikora 5a123f1a8f fix condition 2015-12-03 11:05:20 +01:00
Vadim Sikora fea0d6a735 exclude builds 2015-12-03 11:00:52 +01:00
Vadim Sikora fe01d283db try to run on travis 2015-12-03 10:55:14 +01:00
Dmitry Gorelik 1f38b1931a integration tests setup initial commit 2015-12-03 11:37:27 +02:00
Vadim Sikora 523b8415df Merge pull request #61 from FinalAngel/feature/coveralls-tmp
Coveralls
2015-12-03 09:37:51 +01:00
Iacopo Spalletti 756cf4ec6a Remove migration 2015-12-03 09:28:46 +01:00
Iacopo Spalletti 573ad0daf3 Add changelog entry 2015-12-03 08:18:00 +01:00
Iacopo Spalletti 22cfe18c24 Update test 2015-12-03 08:17:07 +01:00
Iacopo Spalletti 6ba5362659 Add migrations 2015-12-03 08:17:07 +01:00
Pawel Markowski af08b0b675 CMSplugin.position not null
Django CMSPlugin.position null raises unorderable types: NoneType() <
int()
2015-12-03 08:17:07 +01:00
Pawel Markowski da682e5636 plugin_instance.position = new_plugin.position in CMSPlugin.copy_plugin fix null position in copy_plugin method. CMSPlugin position not null + default = 0 2015-12-03 08:17:07 +01:00
Vadim Sikora 07f2fe5b56 remove the token from .travis yml
we assumed that it was the coveralls token, but it's actually an unused
saucelabs token from
https://github.com/divio/django-cms/commit/bb796a393de592183c893537bd9c066b1634bb65
2015-12-02 17:39:42 +01:00
Vadim Sikora 09291f14f1 use finalangel repo coveralls 2015-12-02 17:38:36 +01:00
Vadim Sikora 289b6b5a0f Merge pull request #60 from FinalAngel/feature/unit-testing-setup
Unit testing setup
2015-12-02 17:30:53 +01:00
Vadim Sikora 02baf6d923 pr review comments 2015-12-02 17:26:54 +01:00
Vadim Sikora 86d0d41178 fix travis uml 2015-12-02 17:03:12 +01:00
Vadim Sikora 229c7fc663 disable saucelabs in travis 2015-12-02 17:02:01 +01:00
Vadim Sikora cdb6c5425f disable saucelabs for the moment 2015-12-02 17:02:00 +01:00
Vadim Sikora c3e3953164 increase inactivity timeout 2015-12-02 17:02:00 +01:00
Vadim Sikora f863c8be7c no babel 2015-12-02 17:02:00 +01:00
Vadim Sikora 53de8cb794 try concurrency 2015-12-02 17:02:00 +01:00
Vadim Sikora 9001dfc1a6 try with no timeouts 2015-12-02 17:02:00 +01:00
Vadim Sikora d94f103add try coveralls 2015-12-02 17:02:00 +01:00
Vadim Sikora 384797b80e try again 2015-12-02 17:01:34 +01:00
Vadim Sikora 83ffc615bc update browserslist, try full travis yml 2015-12-02 17:01:34 +01:00
Vadim Sikora f371034116 oops 2015-12-02 17:01:01 +01:00
Vadim Sikora 75a3b5bcba try on saucelabs again 2015-12-02 17:01:00 +01:00
Vadim Sikora 23bc4d374b always quote the keys 2015-12-02 17:01:00 +01:00
Vadim Sikora 6edc90e4ea try with saucelabs creds 2015-12-02 17:01:00 +01:00
Vadim Sikora 9c7c0bbf4c add linting as a separate job 2015-12-02 17:01:00 +01:00
Vadim Sikora b819d901b7 again 2015-12-02 17:00:59 +01:00
Vadim Sikora 031abf195d and again 2015-12-02 17:00:59 +01:00
Vadim Sikora 0f4c27c081 again 2015-12-02 17:00:38 +01:00
Vadim Sikora 8acbe5cc0d wip 2015-12-02 17:00:38 +01:00
Vadim Sikora f00ed27274 wip 2015-12-02 17:00:38 +01:00
Vadim Sikora eedc58340d travis wip 2015-12-02 17:00:38 +01:00
Vadim Sikora 1d0f124cbc only do things if frontend is set 2015-12-02 17:00:38 +01:00
Vadim Sikora 88599b6428 wip travis 2015-12-02 17:00:38 +01:00
Vadim Sikora 50ca4fad30 lets see if travis would work 2015-12-02 17:00:08 +01:00
Vadim Sikora a8ca4f9fde ability to run separate test files 2015-12-02 16:58:31 +01:00
Vadim Sikora 65fbc99f4c add browserslist 2015-12-02 16:58:31 +01:00
Vadim Sikora 697e8bf6f8 add phantomjs-shim
function.prototype.bind is not supported in phantomjs 1.9
2015-12-02 16:58:30 +01:00
Vadim Sikora 3f2c5a13af deps and shrinkwrap 2015-12-02 16:58:30 +01:00
Vadim Sikora fac542db60 initial working unit test 2015-12-02 16:58:30 +01:00
Daniele Procida 4f46462754 Merge pull request #4804 from FinalAngel/feature/docs
fixes issue #4785
2015-12-02 14:38:51 +00:00
Angelo Dini 0621a48205 fixes issue #4785 2015-12-02 10:55:43 +01:00
Iacopo Spalletti 611e77898a Merge pull request #4782 from timgraham/code-cleanup
Refs #4580 -- Drop support for Django 1.6, 1.7 and Python 2.6.
2015-12-01 21:32:27 +01:00
Martin Koistinen 6182fe891b Bump develop to 3.3.0.dev1 2015-12-01 13:38:39 -05:00
Martin Koistinen c3af42efca Obliviate djangocms-flash 2015-12-01 13:33:36 -05:00
Tim Graham 664426f7e2 Drop support for Django 1.7. 2015-11-28 09:24:56 -05:00
Tim Graham d98bb0f6d0 Drop support for Python 2.6. 2015-11-28 09:03:58 -05:00
Tim Graham ae85d5a755 Remove support for Django 1.6. 2015-11-27 22:48:42 -05:00
Martin Koistinen 52b8397886 Increase query counts in consideration of the feature 2015-08-25 18:51:59 -04:00
Jonas Obrist 144c6f6b53 Merge remote-tracking branch 'origin/develop' into sane-add-plugin
Conflicts:
	cms/tests/test_frontend.py
	cms/tests/test_security.py
2015-08-21 11:51:18 +02:00
Jonas Obrist c32d5a126d Merge remote-tracking branch 'origin/develop' into sane-add-plugin
Conflicts:
	manage.py
2015-08-20 15:27:39 +02:00
Jonas Obrist 9daaf002c2 fixed two python 2.x compatibility issues 2015-08-18 10:48:56 +02:00
Jonas Obrist 260f978aff Merge remote-tracking branch 'origin/develop' into sane-add-plugin 2015-08-17 18:12:54 +02:00
Jonas Obrist 72cafc1cf8 possibly fixed nonroot url issues 2015-08-15 18:42:49 +02:00
Jonas Obrist f6e46acc41 removed unneccessary import 2015-08-15 18:37:25 +02:00
Jonas Obrist 8fea4bc38f Merge branch 'kill-develop-py' into sane-add-plugin-with-manage-py
Conflicts:
	cms/tests/test_signals.py
	test_requirements/requirements_base.txt
2015-08-15 18:31:15 +02:00
Jonas Obrist 8f6c34d044 Removed time.sleep from PlaceholderBasicTests
Fixed bad merge in cms.plugins.js
Explicitely register apphooks in test_signals
2015-07-28 19:34:06 +02:00
Jonas Obrist 9f6b9a9313 more robust temporary apphook usage 2015-07-25 00:16:01 +02:00
Jonas Obrist 9bed2d0fca made AddPluginTest.test_add_plugin_in_text_plugin more reliable 2015-07-24 23:21:38 +02:00
Jonas Obrist e21bd8e46c fixed css selectors 2015-07-24 23:06:48 +02:00
Jonas Obrist ef92bb6bd4 various test fixes 2015-07-24 22:53:02 +02:00
Jonas Obrist 983b4008cc Merge remote-tracking branch 'origin/develop' into sane-add-plugin-with-manage-py 2015-07-24 20:56:09 +02:00
Jonas Obrist 1ad834bfac close modal after plugin save 2015-07-20 14:21:16 +02:00
Jonas Obrist b4fc1adeed added node modules to gitignore 2015-07-20 00:31:13 +02:00
Jonas Obrist 4977987288 various fixes in cms.plugins.js, updated tests to use new css selectors 2015-07-19 23:37:49 +02:00
Jonas Obrist c53d1780c1 removed obsolete test, fixed broken test 2015-07-18 21:02:51 +02:00
Jonas Obrist 8f0e282e8f cleanups 2015-07-18 20:42:01 +02:00
Jonas Obrist df8e233a89 cleaned up failed merge 2015-07-18 20:38:13 +02:00
Jonas Obrist 80bb89ccf0 Merge branch 'fastlogin' into sane-add-plugin-with-manage-py
Conflicts:
	cms/tests/test_frontend.py
2015-07-18 20:28:07 +02:00
Jonas Obrist f2f426fbb2 fixed two erroring tests 2015-07-18 03:36:54 +02:00
Jonas Obrist 2bfaa338b2 Merge branch 'kill-develop-py' into sane-add-plugin-with-manage-py
Conflicts:
	cms/tests/test_frontend.py
2015-07-18 03:22:48 +02:00
Jonas Obrist b25c8c8541 Merge remote-tracking branch 'origin/develop' into sane-add-plugin 2015-07-16 11:39:30 +02:00
Jonas Obrist e119317edf removed double imports 2015-07-15 19:30:07 +02:00
Jonas Obrist e5aa7c54b5 fixed stuff 2015-07-15 13:59:37 +02:00
Jonas Obrist 7b3707171c Merge remote-tracking branch 'origin/develop' into sane-add-plugin 2015-07-15 13:59:19 +02:00
Jonas Obrist 3c09f6941a Merge branch 'move-jpg-out-of-py-str' into sane-add-plugin
Conflicts:
	cms/tests/plugins.py
2015-07-15 00:59:04 +02:00
Jonas Obrist 22099ccb66 Merge branch 'develop' into sane-add-plugin
Conflicts:
	.travis.yml
	cms/admin/placeholderadmin.py
	cms/plugin_base.py
	cms/static/cms/js/modules/cms.plugins.js
	cms/tests/frontend.py
	cms/tests/no_i18n.py
	cms/tests/placeholder.py
	cms/tests/plugins.py
	cms/tests/security.py
	docs/upgrade/3.1.rst
2015-07-14 23:46:06 +02:00
Jonas Obrist eb829fc768 last attempt 2015-01-30 22:23:17 +09:00
Jonas Obrist 1166f561e5 removed selenium host override 2015-01-30 22:08:28 +09:00
Jonas Obrist 969289cf28 wait for page to load 2015-01-30 21:43:54 +09:00
Jonas Obrist 4e3291287a removed uneccessary imports 2015-01-30 21:20:28 +09:00
Jonas Obrist b79172c18a giving up on fast-login 2015-01-30 21:19:18 +09:00
Jonas Obrist f5f21f0009 Revert "trying to switch to PhantomJS on travis"
This reverts commit 43fc879fc4.
2015-01-30 21:16:40 +09:00
Jonas Obrist 43fc879fc4 trying to switch to PhantomJS on travis 2015-01-30 17:54:19 +09:00
Jonas Obrist 35aad960a6 Trying sauce-connect again 2015-01-30 17:37:14 +09:00
Jonas Obrist 4546971f23 re-added urlparse import 2015-01-30 16:42:26 +09:00
Jonas Obrist af4fd654bc Revert "let selenium handle domain setting for cookies"
This reverts commit c85cdf714f.
2015-01-30 16:42:09 +09:00
Jonas Obrist 8f8b373eb9 removed unused import, fixed ToolbarBasicTests.test_toolbar_login_view
not waiting
2015-01-30 15:15:37 +09:00
Jonas Obrist c85cdf714f let selenium handle domain setting for cookies 2015-01-30 14:53:06 +09:00
Jonas Obrist ce58173950 fixed frontend tests not cooperating with custom user models 2015-01-28 02:36:23 +09:00
Jonas Obrist b4776c3c14 don't use sauce tunnels 2015-01-28 02:32:14 +09:00
Jonas Obrist fd0c8a4768 don't sauce if there's no sauce 2015-01-28 01:25:15 +09:00
Jonas Obrist 48b8342353 Revert "no saucelabs"
This reverts commit d1b4cd56b4.
2015-01-28 01:23:14 +09:00
Jonas Obrist 0551b2dfbc Revert "fixed yml"
This reverts commit 04d8e9cf36.
2015-01-28 01:23:03 +09:00
Jonas Obrist 04d8e9cf36 fixed yml 2015-01-28 00:55:37 +09:00
Jonas Obrist 6fbaf4c892 Merge remote-tracking branch 'origin/develop' into sane-add-plugin
Conflicts:
	cms/tests/frontend.py
	cms/tests/plugins.py
2015-01-28 00:50:43 +09:00
Jonas Obrist d1b4cd56b4 no saucelabs 2015-01-28 00:39:20 +09:00
Jonas Obrist 18fca52e4d retrying travis encrypt 2015-01-27 01:19:39 +09:00
Jonas Obrist cd9f83f865 Merge remote-tracking branch 'origin/develop' into sane-add-plugin
Conflicts:
	cms/admin/placeholderadmin.py
	cms/plugin_base.py
2015-01-27 00:59:22 +09:00
Jonas Obrist 2de22894b1 switched travis account 2015-01-27 00:49:44 +09:00
Jonas Obrist 5c6efbf71d Fixed MTIPluginsTestCase.test_add_edit_plugin using old add-plugin API 2015-01-16 07:04:41 +09:00
Jonas Obrist 25976c0ed3 Merge remote-tracking branch 'origin/develop' into sane-add-plugin 2015-01-16 06:43:09 +09:00
Jonas Obrist 820a51a636 Merge remote-tracking branch 'origin/develop' into sane-add-plugin
Conflicts:
	cms/admin/placeholderadmin.py
2015-01-16 06:41:46 +09:00
Jonas Obrist ae2095234f Merge remote-tracking branch 'origin/develop' into sane-add-plugin 2014-12-28 03:09:22 +09:00
Jonas Obrist 2451896037 switch to develop branch of djangocms-text-ckeditor 2014-12-28 03:09:04 +09:00
Jonas Obrist c50c1521a3 fixed broken tests 2014-12-18 01:41:58 +09:00
Jonas Obrist 31a5b7167e switched to new selenium apis 2014-12-18 00:57:55 +09:00
Jonas Obrist 64136f5347 Merge remote-tracking branch 'origin/develop' into sane-add-plugin 2014-12-16 21:03:22 +09:00
Jonas Obrist 0a827833da Merge remote-tracking branch 'origin/develop' into sane-add-plugin
Conflicts:
	cms/admin/placeholderadmin.py
2014-12-11 03:36:05 +09:00
Jonas Obrist b482760982 save position on plugin addition in CMSPluginBase.save_model 2014-12-09 00:43:13 +09:00
Jonas Obrist 5106172ae6 Merge remote-tracking branch 'origin/develop' into sane-add-plugin 2014-12-03 20:44:12 +09:00
Jonas Obrist 54275a2506 Fixed some comments, drastically speed up CMSLiveTest._login, added test
for plugin in plugin for text plugins
2014-12-03 20:12:58 +09:00
Jonas Obrist e7e0f10fce Merge remote-tracking branch 'origin/develop' into sane-add-plugin
Conflicts:
	docs/upgrade/3.1.rst
2014-11-11 00:03:20 +09:00
Jonas Obrist 412b2e84d7 Merge remote-tracking branch 'origin/develop' into sane-add-plugin 2014-11-06 03:02:29 +09:00
Jonas Obrist 0c628204a8 fixed security tests not working in ancient python versions 2014-11-01 01:09:31 +09:00
Jonas Obrist cd6833d3d6 Merge remote-tracking branch 'origin/develop' into sane-add-plugin 2014-10-31 23:03:10 +09:00
Jonas Obrist b04df26c64 fixed tests on Django 1.7 2014-10-31 22:53:15 +09:00
Jonas Obrist 2b9984f041 emphasize that the changes to add_plugin don't affect documented APIs 2014-10-31 04:52:50 +09:00
evildmp c9e070f3f4 minor edits to text 2014-10-30 19:38:29 +00:00
Jonas Obrist 5dafda3b86 added documentation 2014-10-31 04:16:44 +09:00
Jonas Obrist 1e243c552a fixed two more failing tests 2014-10-31 02:49:50 +09:00
Jonas Obrist f27dc815f3 removed method added that I never ended up using 2014-10-30 23:10:30 +09:00
Jonas Obrist 245f7e767b added selenium test for adding plugins via frontend 2014-10-30 23:07:46 +09:00
Jonas Obrist 1fabd3245c fixed tests 2014-10-30 02:31:36 +09:00
Jonas Obrist aceeb6aaf2 Merge remote-tracking branch 'origin/develop' into sane-add-plugin
Conflicts:
	cms/admin/placeholderadmin.py
2014-10-29 22:05:38 +09:00
Jonas Obrist 8d7baac949 removed comment 2014-10-29 04:02:12 +09:00
Jonas Obrist 51d9424908 tabs, not spaces 2014-10-29 04:00:58 +09:00
Jonas Obrist 256b691b10 frontend integration 2014-10-29 03:58:53 +09:00
Jonas Obrist c8ec72d489 Factored out the request checking in add_view for TextPlugin 2014-10-14 00:11:04 +09:00
Jonas Obrist f18f3a9c85 fixed test 2014-10-08 23:32:10 +09:00
Jonas Obrist b2c1a515be moved "new-add-plugin" to CMSPluginBase, where it arguably belongs 2014-10-08 23:19:10 +09:00
Jonas Obrist 475120cf18 removed old thing 2014-10-08 22:54:42 +09:00
Jonas Obrist 807e066f59 rudimentary sane add-plugin 2014-10-08 17:32:47 +09:00
1221 changed files with 149111 additions and 180468 deletions
+20
View File
@@ -0,0 +1,20 @@
{
"presets": [
["env", {
"modules": false
}]
],
"plugins": ["transform-runtime"],
"env": {
"production": {
"plugins": [
"lodash"
]
},
"test": {
"plugins": [
"rewire"
]
}
}
}
+10
View File
@@ -10,11 +10,21 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.py]
max_line_length = 120
quote_type = single
[*.{scss,js,html}]
max_line_length = 120
indent_style = space
quote_type = double
[*.js]
max_line_length = 120
quote_type = single
[*.rst]
max_line_length = 80
[*.yml]
indent_size = 2
+233
View File
@@ -0,0 +1,233 @@
module.exports = {
env: {
browser: true,
node: true,
jquery: true,
jasmine: true,
es6: true
},
globals: {
CMS: true,
Promise: true,
__CMS_VERSION__: true
},
root: true,
ecmaFeatures: {
modules: true
},
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
plugins: ['compat'],
settings: {
polyfills: ['document-currentscript']
},
rules: {
// Possible Errors
'comma-dangle': [2, 'never'],
'no-cond-assign': 2,
'no-console': 1,
'no-constant-condition': 2,
'no-control-regex': 2,
'no-debugger': 2,
'no-dupe-args': 2,
'no-dupe-keys': 2,
'no-duplicate-case': 2,
'no-empty-character-class': 2,
'no-empty': ['error', { allowEmptyCatch: true }],
'no-ex-assign': 2,
'no-extra-boolean-cast': 2,
'no-extra-parens': 0,
'no-extra-semi': 2,
'no-func-assign': 2,
'no-inner-declarations': 2,
'no-invalid-regexp': 2,
'no-irregular-whitespace': 2,
'no-negated-in-lhs': 2,
'no-obj-calls': 2,
'no-regex-spaces': 2,
'no-sparse-arrays': 2,
'no-unexpected-multiline': 2,
'no-unreachable': 2,
'use-isnan': 2,
'valid-jsdoc': [
2,
{
requireReturn: false,
requireParamDescription: false,
requireReturnDescription: false,
prefer: {
return: 'returns'
}
}
],
'valid-typeof': 2,
// Best Practices
'accessor-pairs': 2,
'block-scoped-var': 2,
complexity: ['error', { max: 10 }],
'consistent-return': 0,
curly: 2,
'default-case': 2,
'dot-location': [2, 'property'],
'dot-notation': 2,
eqeqeq: 2,
'guard-for-in': 2,
'no-alert': 2,
'no-caller': 2,
'no-case-declarations': 2,
'no-div-regex': 2,
'no-else-return': 1,
'no-empty-pattern': 2,
'no-eq-null': 2,
'no-eval': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-fallthrough': 2,
'no-floating-decimal': 2,
'no-implicit-coercion': 0,
'no-implied-eval': 2,
'no-invalid-this': 0,
'no-iterator': 2,
'no-labels': 2,
'no-lone-blocks': 2,
'no-loop-func': 2,
'no-magic-numbers': [
'error',
{
ignore: [0, -1, 1, 2],
ignoreArrayIndexes: true
}
],
'no-multi-spaces': 2,
'no-multi-str': 0,
'no-native-reassign': 2,
'no-new-func': 2,
'no-new-wrappers': 2,
'no-new': 0,
'no-octal-escape': 2,
'no-octal': 2,
'no-param-reassign': 2,
'no-process-env': 0,
'no-proto': 2,
'no-redeclare': 2,
'no-return-assign': 2,
'no-script-url': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-throw-literal': 2,
'no-unused-expressions': [2, { allowShortCircuit: true }],
'no-useless-call': 2,
'no-useless-concat': 2,
'no-void': 2,
'no-warning-comments': 0,
'no-with': 2,
radix: 2,
'vars-on-top': 0, // FIXME should be enabled at some point
'wrap-iife': [2, 'inside'],
yoda: [2, 'never', { exceptRange: true }],
// Strict Mode
strict: 0, // not required with webpack
// Variables
'init-declarations': 0,
'no-catch-shadow': 2,
'no-delete-var': 2,
'no-label-var': 2,
'no-shadow-restricted-names': 2,
'no-shadow': 2,
'no-undef-init': 2,
'no-undef': 2,
'no-undefined': 0,
'no-unused-vars': 2,
'no-use-before-define': 2,
// Stylistic Issues
'array-bracket-spacing': [2, 'never'],
'block-spacing': 2,
'brace-style': [2, '1tbs'],
camelcase: 0,
'comma-spacing': [2, { before: false, after: true }],
'comma-style': [2, 'last'],
'computed-property-spacing': [2, 'never'],
'consistent-this': [2, 'that'],
'eol-last': 2,
'func-names': 0,
'func-style': 0,
'id-length': 0,
'id-match': 0,
indent: [
'error',
4,
{
SwitchCase: 1
}
],
'jsx-quotes': 0,
'key-spacing': [2, { beforeColon: false, afterColon: true }],
'linebreak-style': [2, 'unix'],
'lines-around-comment': 0,
'max-nested-callbacks': [2, 5],
'new-cap': 2,
'new-parens': 2,
'newline-after-var': 2,
'no-array-constructor': 2,
'no-continue': 2,
'no-inline-comments': 0,
'no-lonely-if': 2,
'no-mixed-spaces-and-tabs': 2,
'no-multiple-empty-lines': [2, { max: 2 }],
'no-negated-condition': 2,
'no-nested-ternary': 2,
'no-new-object': 2,
'no-restricted-syntax': 0,
'no-spaced-func': 0,
'no-ternary': 0,
'no-trailing-spaces': 2,
'no-underscore-dangle': 0,
'no-unneeded-ternary': 2,
'object-curly-spacing': [
2,
'always',
{
objectsInObjects: true,
arraysInObjects: true
}
],
'one-var': [2, 'never'],
'operator-assignment': 2,
'operator-linebreak': 0,
'padded-blocks': 0,
'quote-props': [2, 'as-needed'],
quotes: [2, 'single', 'avoid-escape'],
'require-jsdoc': 2,
'semi-spacing': [2, { before: false, after: true }],
semi: [2, 'always'],
'sort-vars': 0,
'keyword-spacing': 2,
'space-before-blocks': 2,
// FIXME reenable after running prettier on full codebase
'space-before-function-paren': [0, { anonymous: 'never', named: 'never' }],
'space-in-parens': [2, 'never'],
'space-infix-ops': 2,
'space-unary-ops': 2,
'spaced-comment': 2,
'wrap-regex': 0,
// ES6
'arrow-parens': [2, 'as-needed'],
// Legacy
'max-depth': [2, 4],
'max-len': [2, 120],
'max-params': [2, 3],
'max-statements': 0,
'no-bitwise': 2,
'no-plusplus': 0,
'compat/compat': 2
}
};
+78
View File
@@ -0,0 +1,78 @@
##########################
Contributing to django CMS
##########################
Like every open-source project, django CMS always welcomes contributions.
*******************************
GitHub issues and pull requests
*******************************
`GitHub issues <https://github.com/divio/django-cms/issues>`_ should only be used to report *suspected issues* in
django CMS.
It should **not** be used for reporting *security issues* - please use `security@django-cms.org
<security@django-cms.org>`_ for those.
For *help with django CMS*, please use our `users' email list <https://groups.google.com/forum/#!forum/django-cms>`_.
For *feature requests*, please use our `developers' email list
<https://groups.google.com/forum/#!forum/django-cms-developers>`_.
**************************
Contribution documentation
**************************
We maintain comprehensive `contribution documentation <http://docs.django-cms.org/en/latest/contributing/>`_ - please
familiarise yourself with it.
***************
Security issues
***************
Security issues should not be reported **anywhere** except via our dedicated and private `security@django-cms.org
<security@django-cms.org>`_ email address.
If you think you have discovered a security issue in our code, please do not raise it on
* IRC
* GitHub
* Twitter
* either of our email lists
or in any other public forum until we have had a chance to deal with it.
***************
Code of conduct
***************
django CMS is governed by a `Code of Conduct
<http://docs.django-cms.org/en/latest/contributing/code_of_conduct.html>`_. All participants in our community and its
various forums are expected to abide by it.
*********
Community
*********
You can join us online:
* in our IRC channel, #django-cms, on ``irc.freenode.net``. If you don't have an IRC client, you can
`join our IRC channel using the KiwiIRC web client
<https://kiwiirc.com/client/irc.freenode.net/django-cms>`_, which works pretty well.
* on our `django CMS users email list <https://groups.google.com/forum/#!forum/django-cms>`_ for
**general** django CMS questions and discussion
* on our `django CMS developers email list
<https://groups.google.com/forum/#!forum/django-cms-developers>`_ for discussions about the
**development of django CMS**
You can also follow:
* the `Travis Continuous Integration build reports <https://travis-ci.org/divio/django-cms>`_
* the `@djangocms`_ Twitter account for general announcements
.. _@djangocms : https://twitter.com/djangocms
+30
View File
@@ -0,0 +1,30 @@
<!-- Important!
Only use this form if you suspect that you have discovered an issue in django CMS.
Do not use this form for reporting security issues - please use security@django-cms.org for those.
For help with django CMS, please use our users' email list: https://groups.google.com/forum/#!forum/django-cms.
For feature requests, please use our developers' email list: https://groups.google.com/forum/#!forum/django-cms-developers.
-->
### Summary
<!-- If this is a security issue stop right here and email security@django-cms.org instead -->
### Expected behaviour
### Actual behaviour
### Environment
* Python version:
* Django version:
* django CMS version:
+33
View File
@@ -0,0 +1,33 @@
<!--
If this is a security-related patch stop immediately!
See http://docs.django-cms.org/en/latest/contributing/development-policies.html
-->
### Summary
Fixes #
### Links to related discussion
### Proposed changes in this pull request
### Documentation checklist
* [ ] I have updated CHANGELOG.txt if appropriate
* [ ] I have updated the release notes document if appropriate, with:
* [ ] general notes
* [ ] bug-fixes
* [ ] improvements/new features
* [ ] backwards-incompatible changes
* [ ] required upgrade steps
* [ ] names of contributors
* [ ] I have updated other documentation
* [ ] I have added my name to the AUTHORS file
* [ ] This PR's documentation has been approved by Daniele Procida
+3
View File
@@ -23,6 +23,7 @@ dist
.project
.coverage
.pydevproject
.vscode
.settings
/*.egg-info/
/*.egg/
@@ -43,6 +44,8 @@ share/
!.jshintrc
cms/static/cms/compass_app_log.txt
!cms/static/cms/js/dist
cms/tests/frontend/coverage
node_modules
screenshots
.idea
.better_test.db
-16
View File
@@ -1,16 +0,0 @@
{
"preset": "crockford",
"maximumLineLength": {
"value": 120,
"allowRegex": true,
"allowUrlComments": true
},
"requireDotNotation": {
"allExcept": ["keywords"]
},
"disallowQuotedKeysInObjects": null,
"requireMultipleVarDecl": null,
"disallowDanglingUnderscores": null,
"requireVarDeclFirst": false
}
-21
View File
@@ -1,21 +0,0 @@
{
"browser": true,
"devel": true,
"esnext": true,
"expr": true,
"bitwise": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 4,
"jquery": true,
"latedef": true,
"newcap": true,
"noarg": true,
"nonbsp": true,
"quotmark": "single",
"strict": true,
"unused": true,
"trailing": true,
"undef": true
}
+117 -182
View File
@@ -1,11 +1,10 @@
language: python
python:
- 3.6
- 3.5
- 3.4
- 3.3
- 2.7
- 2.6
sudo: false
@@ -14,200 +13,136 @@ addons:
packages:
- enchant
cache:
directories:
- node_modules
- $HOME/.pip/cache
env:
global:
- secure: NWiSBCHFB6LbTMget2qLIdqZlx0zeu3j+Y7Lsqb8kuYXyT2IUBGFVedcGWuGv/9Mzypb80EQWtVTokA3/3QIbesqr29uG95pMPHiYWLdnTO6UHcLMcNXiSzhBGdRDZ40iHSVv2dDHs4GNwGOH5+UCA0z3j7SWmChuFbNXh+Vsqw=
matrix:
- DJANGO=1.9 DATABASE_URL='sqlite://localhost/:memory:' SELENIUM=0 MIGRATE_OPTION='--migrate'
- DJANGO=1.9 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- DJANGO=1.9 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0 MIGRATE_OPTION='--migrate'
- DJANGO=1.9 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=1 AUTH_USER_MODEL='emailuserapp.EmailUser'
- DJANGO=1.9 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0 AUTH_USER_MODEL='customuserapp.User'
- DJANGO=1.8 DATABASE_URL='sqlite://localhost/:memory:' SELENIUM=0 MIGRATE_OPTION='--migrate'
- DJANGO=1.8 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- DJANGO=1.8 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0 MIGRATE_OPTION='--migrate'
- DJANGO=1.8 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0 AUTH_USER_MODEL='emailuserapp.EmailUser'
- DJANGO=1.8 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=1 AUTH_USER_MODEL='customuserapp.User'
- DJANGO=1.7 DATABASE_URL='sqlite://localhost/:memory:' SELENIUM=0
- DJANGO=1.7 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- DJANGO=1.7 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0
- DJANGO=1.7 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=1 AUTH_USER_MODEL='emailuserapp.EmailUser'
- DJANGO=1.6 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=1 AUTH_USER_MODEL='customuserapp.User'
# coveralls
- secure: GzxbqfktWQkf6QQvz0OMk4zHbGI8QWcThTLUzEtktheInxwivOHnoJ1kQu2jVVrk0ZVPbOedE+Cn3QMfi6Wj+y6CREwIhfyzqZV+BIgYu/MpW7vT1BQGiN2suHjFOt/TJ90G41DlBRDc7FxGLqL1Mq8hsEdE0W+/Yszo3aMbp2w=
# sauce labs username
- secure: RotktnZ0AqeTDYfh2O472pPiolQJ2ZDRPUKGDajYWgnG2n94K7hBd4pnA1H/cd42sOyReC3lmmweWNSbG0DLD9+X+s0fwaqKcWGnYsLAcjOWaNXPMwvvgaivadT34JmS9Wv29zNudPL2A6zNw0CB+YVxUZIA4Cm9984AxbYJGSk=
# sauce labs access token
- secure: CbPfysSncBB2Ue+VOtLDa8xJvwKl73nJO647zt/9UvZ/3PilnZN9aZv2jHxGvCiFXcez+2AddKptMCcx/5EW5UfRkrWUDHrfLCULU2TfOjmufEGM1eOIXhiAun8WQ85LBzTAYy1r9D514cbU3Yzn3xGZwJljPE8JE4cx3MNN/qQ=
# temporary solution until https://github.com/ariya/phantomjs/issues/13953 is resolved
- PHANTOMJS_CDNURL=https://s3.amazonaws.com/aldryn-local-assets
matrix:
include:
# FRONTEND
- python: 3.6
env: FRONTEND=1 UNIT=1
- python: 3.6
env: FRONTEND=1 LINT=1
- python: 3.6
env: FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=1 DJANGO=1.11 DATABASE_URL='sqlite://localhost/testdb.sqlite'
- python: 3.6
env: FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=2 DJANGO=1.11 DATABASE_URL='sqlite://localhost/testdb.sqlite'
- python: 3.6
env: FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=3 DJANGO=1.11 DATABASE_URL='sqlite://localhost/testdb.sqlite'
# DJANGO 1.11
- python: 2.7
env: DJANGO=1.11 DATABASE_URL='sqlite://localhost/:memory:'
- python: 3.4
env: DJANGO=1.11 DATABASE_URL='sqlite://localhost/:memory:'
- python: 3.5
env: DJANGO=1.11 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test'
- python: 3.6
env: DJANGO=1.11 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test'
- python: 3.6
env: DJANGO=1.11 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' AUTH_USER_MODEL='emailuserapp.EmailUser'
- python: 3.6
env: DJANGO=1.11 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' AUTH_USER_MODEL='customuserapp.User'
# DJANGO 2.0
- python: 3.4
env: DJANGO=2.0 DATABASE_URL='sqlite://localhost/:memory:'
- python: 3.5
env: DJANGO=2.0 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test'
- python: 3.6
env: DJANGO=2.0 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test'
- python: 3.6
env: DJANGO=2.0 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' AUTH_USER_MODEL='emailuserapp.EmailUser'
- python: 3.6
env: DJANGO=2.0 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' AUTH_USER_MODEL='customuserapp.User'
# DJANGO 2.1
- python: 3.5
env: DJANGO=2.1 DATABASE_URL='sqlite://localhost/:memory:'
- python: 3.5
env: DJANGO=2.1 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test'
- python: 3.6
env: DJANGO=2.1 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test'
- python: 3.6
env: DJANGO=2.1 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' AUTH_USER_MODEL='emailuserapp.EmailUser'
- python: 3.6
env: DJANGO=2.1 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' AUTH_USER_MODEL='customuserapp.User'
- python: 3.6
env: TEST_DOCS=1 DJANGO=2.1 DATABASE_URL='sqlite://localhost/:memory:'
# DJANGO 2.2
- python: 3.5
env: DJANGO=2.2 DATABASE_URL='sqlite://localhost/:memory:'
dist: xenial
sudo: true
- python: 3.5
env: DJANGO=2.2 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test'
- python: 3.6
env: DJANGO=2.2 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test'
- python: 3.6
env: DJANGO=2.2 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' AUTH_USER_MODEL='emailuserapp.EmailUser'
- python: 3.6
env: DJANGO=2.2 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' AUTH_USER_MODEL='customuserapp.User'
- python: 3.6
env: TEST_DOCS=1 DJANGO=2.2 DATABASE_URL='sqlite://localhost/:memory:'
dist: xenial
sudo: true
allow_failures:
- python: 2.7
env: DJANGO=1.11 DATABASE_URL='sqlite://localhost/:memory:'
exclude:
- python: 2.7
- python: 3.4
- python: 3.5
- python: 3.6
fast_finish: true
before_script:
- pip freeze
- sh -c "if [ '$DATABASE_URL' = 'postgres://postgres@127.0.0.1/djangocms_test' ];
then psql -c 'DROP DATABASE IF EXISTS djangocms_test;' -U postgres; fi"
- sh -c "if [ '$DATABASE_URL' = 'postgres://postgres@127.0.0.1/djangocms_test' ];
then psql -c 'create database djangocms_test;' -U postgres; fi"
- sh -c "if [ '$DATABASE_URL' = 'mysql://root@127.0.0.1/djangocms_test' ]; then mysql
-e 'create database IF NOT EXISTS djangocms_test CHARACTER SET utf8 COLLATE utf8_general_ci;';
fi"
- if [ "$DATABASE_URL" == "postgres://postgres@127.0.0.1/djangocms_test" ]; then psql -c "DROP DATABASE IF EXISTS djangocms_test;" -U postgres; fi
- if [ "$DATABASE_URL" == "postgres://postgres@127.0.0.1/djangocms_test" ]; then psql -c "create database djangocms_test;" -U postgres; fi
- if [ "$DATABASE_URL" == "mysql://root@127.0.0.1/djangocms_test" ]; then mysql -e 'create database IF NOT EXISTS djangocms_test CHARACTER SET utf8 COLLATE utf8_general_ci;'; fi
before_install:
- "export DISPLAY=:99.0"
# xvfb is started in this way to ensure the screen size is 1280x1024x8
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/cucumber_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x8"
- "export TRAVIS_COMMIT_MSG=\"$(git log --format=%B --no-merges -n 1)\""
- pip install -U pip>=8.0
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip saucelabs\]'; export USE_SAUCE_LABS=$?; true
- echo "$TRAVIS_COMMIT_MSG" | grep '\[ci only docs\]'; export ONLY_DOCS=$?; true
install:
- pip install -r "test_requirements/django-$DJANGO.txt"
- if [ $DATABASE_URL == 'postgres://postgres@127.0.0.1/djangocms_test' ]; then pip install psycopg2 ; fi
- if [ $DATABASE_URL == 'mysql://root@127.0.0.1/djangocms_test' ]; then pip install mysqlclient ; fi
- if [ "$UNIT" != 1 ] && [ "$LINT" != 1 ]; then pip install -r "test_requirements/django-$DJANGO.txt"; pip freeze; fi
- if [ "$FRONTEND" == 1 ] && [ "$ONLY_DOCS" != 0 ]; then nvm install 6 && nvm use 6; fi
# Disable the spinner, it looks bad on Travis
- if [ "$FRONTEND" == 1 ] && [ "$ONLY_DOCS" != 0 ]; then npm config set spin false; fi
- if [ "$FRONTEND" == 1 ] && [ "$ONLY_DOCS" != 0 ]; then npm install -g gulp@3.9.1; fi
- if [ "$FRONTEND" == 1 ] && [ "$ONLY_DOCS" != 0 ]; then scripts/install-npm-dependencies.sh; fi
- if [ "$UNIT" != 1 ] && [ "$LINT" != 1 ] && [ "$DATABASE_URL" == 'postgres://postgres@127.0.0.1/djangocms_test' ]; then pip install psycopg2 ; fi
- if [ "$UNIT" != 1 ] && [ "$LINT" != 1 ] && [ "$DATABASE_URL" == 'mysql://root@127.0.0.1/djangocms_test' ]; then pip install mysqlclient ; fi
script:
- coverage run --parallel-mode manage.py test $MIGRATE_OPTION
- coverage combine
- if [ "$FRONTEND" == 1 ] && [ "$UNIT" == 1 ] && [ "$ONLY_DOCS" != 0 ]; then gulp tests:unit; fi;
- if [ "$FRONTEND" == 1 ] && [ "$LINT" == 1 ] && [ "$ONLY_DOCS" != 0 ]; then gulp lint; fi;
- if [ "$FRONTEND" == 1 ] && [ "$INTEGRATION" == 1 ] && [ "$ONLY_DOCS" != 0 ]; then pip install -e .; pip freeze; gulp tests:integration; fi;
- if [ "$FRONTEND" != 1 ] && ([ "$TEST_DOCS" == 1 ] && [ "$ONLY_DOCS" == 0 ] || [ "$ONLY_DOCS" != 0 ]); then coverage run --parallel-mode manage.py test; fi;
- if [ "$FRONTEND" != 1 ] && ([ "$TEST_DOCS" == 1 ] && [ "$ONLY_DOCS" == 0 ] || [ "$ONLY_DOCS" != 0 ]); then coverage combine; fi;
after_success: coveralls
after_success: if [ "$FRONTEND" != 1 ]; then coveralls; fi;
notifications:
irc:
- irc.freenode.org#django-cms
- irc.freenode.org#django-cms-sprint
webhooks:
- http://addons.us-iad-rs.aldryn.io/en/travis-endpoint/
matrix:
exclude:
- python: 2.6
env: DJANGO=1.6 DATABASE_URL='sqlite://localhost/:memory:' SELENIUM=0 MIGRATE_OPTION='--migrate'
- python: 2.6
env: DJANGO=1.6 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 2.6
env: DJANGO=1.6 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0 MIGRATE_OPTION='--migrate'
- python: 2.6
env: DJANGO=1.6 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=1 AUTH_USER_MODEL='emailuserapp.EmailUser'
- python: 2.6
env: DJANGO=1.7 DATABASE_URL='sqlite://localhost/:memory:' SELENIUM=0
- python: 2.6
env: DJANGO=1.7 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 2.6
env: DJANGO=1.7 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0
- python: 2.6
env: DJANGO=1.7 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=1 AUTH_USER_MODEL='emailuserapp.EmailUser'
- python: 2.6
env: DJANGO=1.8 DATABASE_URL='sqlite://localhost/:memory:' SELENIUM=0 MIGRATE_OPTION='--migrate'
- python: 2.6
env: DJANGO=1.8 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 2.6
env: DJANGO=1.8 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0 MIGRATE_OPTION='--migrate'
- python: 2.6
env: DJANGO=1.8 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0 AUTH_USER_MODEL='emailuserapp.EmailUser'
- python: 2.6
env: DJANGO=1.8 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=1 AUTH_USER_MODEL='customuserapp.User'
- python: 2.6
env: DJANGO=1.9 DATABASE_URL='sqlite://localhost/:memory:' SELENIUM=0 MIGRATE_OPTION='--migrate'
- python: 2.6
env: DJANGO=1.9 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 2.6
env: DJANGO=1.9 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0 MIGRATE_OPTION='--migrate'
- python: 2.6
env: DJANGO=1.9 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=1 AUTH_USER_MODEL='emailuserapp.EmailUser'
- python: 2.6
env: DJANGO=1.9 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0 AUTH_USER_MODEL='customuserapp.User'
- python: 2.7
env: DJANGO=1.6 DATABASE_URL='sqlite://localhost/:memory:' SELENIUM=0 MIGRATE_OPTION='--migrate'
- python: 2.7
env: DJANGO=1.6 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0 MIGRATE_OPTION='--migrate'
- python: 2.7
env: DJANGO=1.6 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=1 AUTH_USER_MODEL='emailuserapp.EmailUser'
- python: 2.7
env: DJANGO=1.7 DATABASE_URL='sqlite://localhost/:memory:' SELENIUM=0
- python: 2.7
env: DJANGO=1.7 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.3
env: DJANGO=1.6 DATABASE_URL='sqlite://localhost/:memory:' SELENIUM=0 MIGRATE_OPTION='--migrate'
- python: 3.3
env: DJANGO=1.6 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.3
env: DJANGO=1.6 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0 MIGRATE_OPTION='--migrate'
- python: 3.3
env: DJANGO=1.6 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=1 AUTH_USER_MODEL='emailuserapp.EmailUser'
- python: 3.3
env: DJANGO=1.7 DATABASE_URL='sqlite://localhost/:memory:' SELENIUM=0
- python: 3.3
env: DJANGO=1.7 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.3
env: DJANGO=1.7 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.3
env: DJANGO=1.8 DATABASE_URL='sqlite://localhost/:memory:' SELENIUM=0 MIGRATE_OPTION='--migrate'
- python: 3.3
env: DJANGO=1.8 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.3
env: DJANGO=1.8 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0 MIGRATE_OPTION='--migrate'
- python: 3.3
env: DJANGO=1.8 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=1 AUTH_USER_MODEL='emailuserapp.EmailUser'
- python: 3.3
env: DJANGO=1.9 DATABASE_URL='sqlite://localhost/:memory:' SELENIUM=0 MIGRATE_OPTION='--migrate'
- python: 3.3
env: DJANGO=1.9 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.3
env: DJANGO=1.9 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0 MIGRATE_OPTION='--migrate'
- python: 3.3
env: DJANGO=1.9 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=1 AUTH_USER_MODEL='emailuserapp.EmailUser'
- python: 3.3
env: DJANGO=1.9 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0 AUTH_USER_MODEL='customuserapp.User'
- python: 3.5
env: DJANGO=1.6 DATABASE_URL='sqlite://localhost/:memory:' SELENIUM=0 MIGRATE_OPTION='--migrate'
- python: 3.5
env: DJANGO=1.6 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.5
env: DJANGO=1.6 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0 MIGRATE_OPTION='--migrate'
- python: 3.5
env: DJANGO=1.6 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=1 AUTH_USER_MODEL='emailuserapp.EmailUser'
- python: 3.5
env: DJANGO=1.6 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=1 AUTH_USER_MODEL='customuserapp.User'
- python: 3.5
env: DJANGO=1.7 DATABASE_URL='sqlite://localhost/:memory:' SELENIUM=0
- python: 3.5
env: DJANGO=1.7 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.5
env: DJANGO=1.7 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.5
env: DJANGO=1.7 DATABASE_URL='postgres://postgres@127.0.0.1/djangocms_test' SELENIUM=1 AUTH_USER_MODEL='emailuserapp.EmailUser'
allow_failures:
- python: 2.7
env: DJANGO=1.7 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 2.7
env: DJANGO=1.8 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 2.7
env: DJANGO=1.9 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.3
env: DJANGO=1.6 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.3
env: DJANGO=1.7 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.3
env: DJANGO=1.8 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.3
env: DJANGO=1.9 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.4
env: DJANGO=1.6 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.4
env: DJANGO=1.7 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.4
env: DJANGO=1.8 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.4
env: DJANGO=1.9 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.5
env: DJANGO=1.8 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
- python: 3.5
env: DJANGO=1.9 DATABASE_URL='mysql://root@127.0.0.1/djangocms_test' SELENIUM=0
fast_finish: true
+183 -118
View File
@@ -21,17 +21,21 @@ Current and previous core designers:
* Matthias Nüesch
Contributors (based on gitlog):
Contributors (based on gitlog, 537 unique authors):
* Антон Евжаков
* A. Bram Neijt
* AQNOUCH Mohammed
* aaloy
* Aaron Fay
* Aaron Renner
* Aaron Spike
* aball
* Adam Chainz
* Adi Sieker
* Admin Adminaras
* Adrien Brunet
* Adrián Ribao Martínez
* Aidas Bendoraitis
* Alberto Paro
* Ales Kocjancic
* Ales Zabala Alava (Shagi)
@@ -39,19 +43,28 @@ Contributors (based on gitlog):
* Alessandro Ronchi
* Alex Cucu
* Alex Marandon
* Alexander Paramonov
* Alexandre Leray
* Alexey Subbotin
* Aliaksei Urbanski
* alskgj
* Alvin Mites
* Anatoly Ivanov
* Andi Albrecht
* Andras Gyömrey
* Andre Bossard
* Andrea Stagi
* Andreas Elvers
* Andrei Avram
* Andrei Fokau
* Andrew Schoen
* André Cruz
* Angelo Dini
* angular_circle
* Anthony Steinhauser
* Antoine Catton
* Anton Parkhomenko
* AQNOUCH Mohammed
* Arcady Usov
* Arne Gellhaus
* Arne Schauf
@@ -59,7 +72,9 @@ Contributors (based on gitlog):
* Arthur Debert
* Artis Avotins
* Aymeric Augustin
* Bartosz Płóciennik
* Basile LEGAL
* behrooz
* Behrooz Nobakht
* Belegnar
* Ben Northway
@@ -67,9 +82,12 @@ Contributors (based on gitlog):
* Benjamin
* Benjamin Liles
* Benjamin Wohlwend
* benjaoming
* benzkji
* Bernardo Cabezas Serra
* Bernd Zeimetz
* Bertrand Bordage
* beshrkayali
* Bitdeli Chef
* Bjorn Sandberg
* Bob Karreman
@@ -77,12 +95,18 @@ Contributors (based on gitlog):
* Brad Walker
* Braden MacDonald
* Brian Schott
* brightwhitefox
* Calvin Cheng
* Carlo Ascani
* Carlos de Paula
* casio
* centralniak
* Cezar Pendarovski
* cezar77
* Chanita Siridechkun
* Charlie Denton
* Charpentier Johan
* Chematronix
* Cheng-Chia Tseng
* Chris Adams
* Chris Franklin
@@ -95,20 +119,24 @@ Contributors (based on gitlog):
* Christof Hagedorn
* Christopher Grebs
* Christos Kopanos
* cip
* Claudio Bartolini
* Colin Wirz
* Conrado Buhrer
* Corey Farwell
* Craig Ricciuto
* Craig de Stigter
* DZ
* DaNmarner
* Craig Ricciuto
* creakings
* cworth-gh
* Damian Moore
* Damir Arbula
* DamirArbula
* Daniel Barden
* daniele
* Daniele Procida
* Danilo Bargen
* DaNmarner
* darbula
* Darii Denis
* Darii Denis Home
* Dario Albanesi
@@ -116,13 +144,19 @@ Contributors (based on gitlog):
* Darryl Woods
* Dave Bell
* Dave Hall
* David D Lowe
* David Grant
* David Jean Louis
* David Lam
* David Lee
* David Thompson
* Davide Setti
* derek73
* deshack
* digi604
* divio
* Diógenes Augusto Fernandes Hermínio
* dlamotte
* Dmitry Akinin
* Dmitry Gorelik
* Dmytro Gorelik
@@ -130,51 +164,86 @@ Contributors (based on gitlog):
* Donatas Kučinskas
* Douwe van der Meij
* Dries Desmet
* dstufft
* Dylann CORDEL
* DylannCordel
* DZ
* eged
* Egor V. Nazarkin
* Ekrem SEREN
* Elias Probst
* Eraldo Energy
* Eric Amador
* Eric Eldredge
* Eric Robitaille
* ericr
* Erik Allik
* Erlend Dalen
* Eugene MechanisM
* Evandro Miquelito
* evildmp
* F. Gabriel Gosselin
* f4nt
* fcurella
* febsn
* Filip Kazimierczak
* Filipe Waitman
* FinalAngel
* fivethreeo
* fj
* floppya
* Florian Verdet
* Frank
* Frank Bieniek
* FrankBie
* frost-nzcr4
* furiousdave
* Gabe Jackson
* Gabriel Hurley
* GaretJax
* Gavin Wahl
* genti94
* Gentian Mazrekaj
* gentleShark
* Geoffrey Fairchild
* Geoffrey Hing
* George Marshall
* Gerard Świderski
* Germano Gabbianelli
* Gianluca Guarini
* Gilles Lenfant
* Gleb Chipiga
* Gokmen Gorgen
* Gregory Klupar
* guandalino
* Hamish Downer
* Hans Andersen
* hedberg
* henning
* Henning Sprang
* heppstux
* Herbert Poul
* hjkelly
* Horst Gutmann
* hysia
* Iacopo Spalletti
* Ian Lewis
* ikudryavtsev
* indexofire
* Ionel Maries Cristian
* Ivan Vershigora
* Iván Raskovsky
* izi
* J. Cliff Dyer
* Jacob Rief
* Jakob Hedman
* Jakub Randák
* jalaziz
* Jameel Al-Aziz
* James Richards
* James Rutherford
* Jana Deutschlaender
* Jannik V
* Jannis Leidel
* Janusz Harkot
* Jared Proffitt
@@ -183,7 +252,9 @@ Contributors (based on gitlog):
* Jason Jenkins
* Jason Robinson
* Jeffrey Goettsch
* Jens Diemer
* JensDiemer
* Jeroen
* Jeroen Noten
* Jessica Tallon
* Jimmy Lam
@@ -194,43 +265,68 @@ Contributors (based on gitlog):
* Jonas Obrist
* Jonathan Liuti
* Jonathan Stoppani
* jordanjambazov
* Jorge Vargas
* Jos van Velzen
* Joseph Bergantine
* Joseph Lin
* Joseph Melettukunnel
* Josh Kalderimis
* Josh Schneier
* João Luiz Lorencetti
* Julien Poissonnier
* Julz
* Júlio R. Lucchese
* Kalle Bronsen
* kater169
* Katie McLaughlin
* kblomqvist
* Kegan Holtzhausen
* Keryn Knight
* Kevin Burton
* Kevin Funk
* Kevin Richardson
* Kim Thoenen
* kochin
* Kristian Øllegaard
* Krzysztof Socha
* kunitoki
* L-A Iscla
* Lars Smit
* Lars van de Kerkhof
* Laurens Bosscher
* Leon Smith
* Leonardo
* Lio Mendonca
* Lionardo Mendonça
* littlepea
* Loriana Indelicato
* lovmat
* Lucas Vogelsang
* Lucio Asnaghi
* Ludwig Hähne
* lug
* Luis Diego Garcia
* Luke Crooks
* Luke Plant
* MW
* m000
* Maik Lustenberger
* maiklust
* Manolis Stamatogiannakis
* Manuel Schmidt
* Marc-Olivier Titeux
* Marco Badan
* Marco Bonetti
* Marco Federighi
* Marco Paolini
* Marco Rimoldi
* marcor
* Marijn Goedegebure
* Mark
* Mark Rogers
* Mark Walker
* Markus Holtermann
* Markus Zapke-Gründemann
* Markus Zapke-Grndemann
* Marti Raudsepp
* Martin
* Martin Bambas
@@ -239,100 +335,161 @@ Contributors (based on gitlog):
* Martin Kosír
* Martin Owens
* Martin Pajuste
* martinkosir
* Matas Dailyda
* Mateusz Dereniowski
* Mateusz Kamycki
* Mateusz Marzantowicz
* mathijs
* Matt Chisholm
* Matteo Rosati
* Matthias Cavigelli
* Mattia Larentis
* Max Shkurygin
* Maxim Bodyansky
* Maxime Haineault
* mbouchar
* mcosta
* meers
* Mel Collins
* meomap
* MerLex
* Michael P. Jung
* Michael Thornhill
* Michal Danilak
* Mike Dory
* Mike Johnson
* mikek
* Mikko Ahlroth
* Milo Price
* Mitar
* Mokys
* Morgan Wahl
* Motiejus Jakštys
* motleytech
* mrlundis
* mvaerle
* MW
* Mykhailo Kolesnyk
* Nelson Brochado
* neoprolog
* Nick Jones
* Nicolas
* Nicolas PASCAL
* nikolas
* Nina Zakharenko
* nsh
* o-zander
* ojii
* Oliver Thane
* Oliver Zander
* Olivier Larchevêque
* Olivier Le Brouster
* Orne Brocaar
* Oyvind Saltvik
* padelt
* Pankrat
* Paolo Leggio
* Paolo Romolini
* Pascal Mouret
* pascal.beyeler
* Patrick Arminio
* Patrick Lauber
* Patrick Toal
* patricklauber
* Patryk Zawadzki
* paul
* Paul van der Linden
* Paulo
* Paulo Alvarado
* Pavel Puchkin
* Pawel Markowski
* pbgc
* pcicman
* Pedro Gracia
* Pete Loggie
* Peter Farrell
* Peter J. Farrell
* Peter Landry
* Peter-Paul van Gemerden
* peterfarrell
* Petteri
* pgcd
* Philipp Bosch
* Philipp Zedler
* philomat
* phuihock
* Pigletto
* Piotr Jakimiak
* Piotr Kilczuk
* piquadrat
* pumalo
* Rafal Radulski
* raidsan
* Rainer Koirikivi
* Rajesh
* Rajesh K.
* Rajesh P.
* Rebecca Breu
* Remco Wendt
* René Fleschenberg
* requires.io
* Restless Being
* Richard Barran
* rizumu
* Robert Barsch
* Robert Buchholz
* Robert Clark
* Robert Feldbinder
* Robert Pogorzelski
* Robert Stein
* Roberto
* Roberto Bampi
* Robin Lewis
* robint
* Rodolfo Carvalho
* Roman Kozlovskiy
* root
* rtpm
* Ruslan Malogulko
* Russ Ferriday
* SachaMPS
* Salmanul Farzy
* Sam Manzi
* Samuel Lahti
* Samuel Luescher
* Samuel Lüscher
* sbussetti
* Schoen
* scottbarnham
* sealibora
* Sean Bleier
* Sebastian Braun
* Sergey Fedoseev
* Seth Buntin
* Seyhun Akyurek
* Shahar Or
* Shatalov Vadim
* Shaun Brady
* shed
* Shinya Okano
* shulcsm
* Simon Charette
* Simon Hedberg
* Simon Meers
* sleytr
* Sophie Leroy
* spookylukey
* srj55
* ssteinerX
* Stavros Korokithakis
* Stefan Foulis
* Stefan Wehrmeyer
* stefanfoulis
* Stefano Brentegani
* Stefano Crosta
* Stefano Morandi
* Stefano Probst
* Steffen Jasper
* Stephan
* Stephan Hepper
@@ -346,21 +503,30 @@ Contributors (based on gitlog):
* Sylvain Fankhauser
* Tadas Dailyda
* Tanel Külaots
* tdelam
* tehfink
* Thibaud Colas
* Thomas Meitz
* Thomas Parslow
* Thomas Remmert
* Thomas Woolford
* thomas-d
* Tim Anderegg
* Tim Davies
* Tim Graham
* timesong
* Tino de Bruijn
* tiret
* Tobias von Klipstein
* Tom
* Tom Berger
* Tom de Simone
* Tom S
* Tom V
* Tom Wardill
* Tom de Simone
* Ulrich Petri
* unknown
* uno
* User
* Vadim Lopatyuk
* Vadim Sikora
@@ -368,130 +534,29 @@ Contributors (based on gitlog):
* Viktor Nagy
* Viliam Segeda
* Vinit (Vermicelli on IRC)
* vinit kumar
* Vinod Kurup
* Vladimir Bolshakov
* Vladyslav
* Wayne Moore
* Xavier Fernandez
* Xavier Ordoquy
* Yann Malet
* Yosuke Ikeda
* Yuri van der Meer
* aaloy
* aball
* angular_circle
* behrooz
* benjaoming
* benzkji
* beshrkayali
* brightwhitefox
* casio
* centralniak
* cip
* creakings
* daniele
* darbula
* derek73
* deshack
* digi604
* divio
* dlamotte
* dstufft
* eged
* ericr
* evildmp
* f4nt
* fcurella
* febsn
* fivethreeo
* fj
* floppya
* frost-nzcr4
* furiousdave
* genti94
* gentleShark
* guandalino
* hedberg
* henning
* hjkelly
* hysia
* ikudryavtsev
* indexofire
* izi
* jalaziz
* jordanjambazov
* kater169
* kblomqvist
* kochin
* kunitoki
* littlepea
* lovmat
* lug
* m000
* maiklust
* marco federighi
* marcor
* martinkosir
* mathijs
* mbouchar
* mcosta
* meers
* mikek
* motleytech
* mrlundis
* mvaerle
* neoprolog
* nikolas
* nsh
* o-zander
* ojii
* padelt
* pascal.beyeler
* patricklauber
* paul
* pbgc
* pcicman
* peterfarrell
* pgcd
* philomat
* phuihock
* piquadrat
* pumalo
* raidsan
* requires.io
* rizumu
* robint
* root
* rtpm
* sbussetti
* scottbarnham
* sealibora
* shed
* shulcsm
* sleytr
* spookylukey
* srj55
* ssteinerX
* stefanfoulis
* tdelam
* tehfink
* timesong
* tiret
* unknown
* vinit kumar
* vvangelovski
* wangJunjie
* Wayne Moore
* wid
* wildermesser
* WYSIATI
* Xavier Fernandez
* Xavier Ordoquy
* xie wei
* xray7224
* Yann Malet
* yann.malet@gmail.com
* ychouinard
* yedpodtrzitko
* yohanboniface
* Yosuke Ikeda
* Yuri van der Meer
* zandeez
* zundoya
* Žan Anderle
* Óscar M. Lage
* Øyvind Saltvik
* Žan Anderle
* Антон Евжаков
+444 -3
View File
@@ -1,3 +1,424 @@
=== 3.7.0 (unreleased) ===
* Introduced Django 2.2 support.
* Fixed test suite.
=== 3.6.0 (2019-01-29) ===
* Removed the ``cms moderator`` command.
* Dropped Django < 1.11 support.
* Removed the translatable content get / set methods from ``CMSPlugin`` model.
* Removed signal handlers for ``Page``, ``Title``, ``Placeholder`` and ``CMSPlugin`` models.
* Moved ``Title.meta_description`` length restriction from model to form
and increased its max length to 320 characters.
* Added ``page_title`` parameter for ``cms.api.create_page()`` and ``cms.api.create_title()``.
* Introduced Django 2.0 support.
* Introduced Django 2.1 support.
=== 3.5.3 (2018-11-20) ===
* Fixed ``TreeNode.DoesNotExist`` exception raised when exporting
and loading database contents via ``dumpdata`` and ``loaddata``.
* Fixed a bug where ``request.current_page`` would always be the public page,
regardless of the toolbar status (draft / live). This only affected custom
urls from an apphook.
* Removed extra quotation mark from the sideframe button template
* Fixed a bug where structureboard tried to preload markup when using legacy
renderer
* Fixed a bug where updates on other tab are not correctly propagated if the
operation was to move a plugin in the top level of same placeholder
* Fixed a bug where xframe options were processed by clickjacking middleware
when page was served from cache, rather then get this value from cache
* Fixed a bug where cached page permissions overrides global permissions
* Fixed a bug where plugins that are not rendered in content wouldn't be
editable in structure board
* Fixed a bug with expanding static placeholder by clicking on "Expand All" button
* Fixed a bug where descendant pages with a custom url would lose the overwritten
url on save.
* Fixed a bug where setting the ``on_delete`` option on ``PlaceholderField``
and ``PageField`` fields would be ignored.
* Fixed a bug when deleting a modal from changelist inside a modal
=== 3.5.2 (2018-04-11) ===
* Fixed a bug where shortcuts menu entry would stop working after toolbar reload
* Fixed a race condition in frontend code that could lead to sideframe being
opened with blank page
* Fixed a bug where the direct children of the homepage would get a leading ``/``
character when the homepage was moved or published.
* Fixed a bug where non-staff user would be able to open empty structure board
* Fixed a bug where a static file from Django admin was referenced that no
longer existed in Django 1.9 and up.
* Fixed a bug where the migration 0018 would fail under certain databases.
=== 3.5.1 (2018-03-05) ===
* Fixed a bug where editing pages with primary keys greater than 999 would throw an
exception.
* Fixed a ``MultipleObjectsReturned`` exception raised on the page types migration
with multiple page types per site.
* Fixed a bug which prevented toolbar js from working correctly when rendered
before toolbar.
* Fixed a bug where CMS would incorrectly highlight plugin content when plugin
contains invisible elements
* Fixed a regression where templates which inherit from a template using an ``{% extends %}``
tag with a default would raise an exception.
=== 3.5.0 (2018-01-31) ===
* Fixed a bug which prevented users from seeing the welcome screen when debug is
turned off.
* Introduced improved repr for ``Page``, ``Title``, ``Placeholder`` and ``CMSPlugin`` models.
* Rename publish buttons to no longer reference "page"
* Page rendering will now use the draft page instead of public page for logged in
users with change permissions, unless the ``preview`` GET parameter is used.
* Fixed "Expand all / Collapse all" not reflecting real state of the placeholder tree
* Fixed a bug where Aliased plugins would render if their host page was unpublished (and user was not on edit mode).
* Fixed a bug where focusing inputs in modal would require 2 clicks in some browsers
* Changed the language chooser to always show all configured languages to staff members
and public-only languages to anon users.
* Introduced logic to copy pages to different sites from the admin.
* Removed "View on Site" button when adding a page
* Welcome page no longer uses multilingual URLs when not required.
* Prevent users from passing a public page as parent in ``create_page`` api function
=== 3.4.5 (2017-10-12) ===
* Introduced Django 1.11 compatibility
* Fixed a bug where slug wouldn't be generated in the creation wizard
* Fixed a bug where the add page endpoint rendered ``Change page`` as the html title.
* Fixed an issue where non-staff users could request the wizard create endpoint.
* Fixed an issue where the ``Edit page`` toolbar button wouldn't show on non-cms pages
with placeholders.
* Fixed a bug where placeholder inheritance wouldn't work if the inherited placeholder
is cached in an ancestor page.
* Fixed a regression where the code following a ``{% placeholder x or %}`` declaration,
was rendered before attempting to inherit content from parent pages.
* Changed page/placeholder cache keys to use sha1 hash instead of md5 to be FIPS compliant.
* Fixed a bug where the change of a slug would not propagate to all descendant pages
* Fixed a ``ValueError`` raised when using ``ManifestStaticFilesStorage`` or similar for static files.
This only affects Django >= 1.10
=== 3.4.4 (2017-06-15) ===
* Fixed a bug in which cancelling the publishing dialog wasn't respected.
* Fixed a bug causing post-login redirection to an incorrect URL on single-language sites.
* Changed the signature for internal ``cms.plugin_base.CMSPluginBase`` methods ``get_child_classes``
and ``get_parent_classes`` to take an optional ``instance`` parameter.
* Fixed an error when retrieving placeholder label from configuration.
* Fixed a bug which caused certain translations to display double-escaped text in the page
list admin view.
* Adjusted the toolbar JavaScript template to escape values coming from the request.
* Added Dropdown class to toolbar items
* Replaced all custom markup on the ``admin/cms/page/includes/fieldset.html`` template
with an ``{% include %}`` call to Django's built-in ``fieldset.html`` template.
* Fixed a bug which prevented a page from being marked as dirty when a placeholder was cleared.
* Fixed an IntegrityError raised when publishing a page with no public version and whose publisher
state was pending.
* Fixed an issue with JavaScript not being able to determine correct path to the async bundle
* Fixed a ``DoesNotExist`` database error raised when moving a page marked as published, but whose public
translation did not exist.
* Fixed a bug in which the menu rendered nodes using the site session variable (set in the admin),
instead of the current request site.
* Fixed a race condition bug in which the database cache keys were deleted without syncing with the
cache server, and as a result old menu items would continue to be displayed.
* Fixed a 404 raised when using the ``Delete`` button for a Page or Title extension on Django >= 1.9
* Added "How to serve multiple languages" section to documentation
* Fixed a performance issue with nested pages when using the ``inherit`` flag on the ``{% placeholder %}`` tag.
* Removed the internal ``reset_to_public`` page method in favour of the ``revert_to_live`` method.
* Fixed a bug in which the placeholder cache was not consistently cleared when a page was published.
* Enhanced the plugin menu to not show plugins the user does not have permission to add.
* Fixed a regression which prevented users from setting a redirect to the homepage.
=== 3.4.3 (2017-04-24) ===
* Fixed a security vulnerability in the page redirect field which allowed users
to insert JavaScript code.
* Fixed a security vulnerability where the ``next`` parameter for the toolbar login
was not sanitised and could point to another domain.
=== 3.4.2 (2017-01-23) ===
* Escaped strings in ``close_frame`` JS template.
* Fixed a bug with `text-transform` styles on inputs affecting CMS login
* Fixed a typo in the confirmation message for copying plugins from a different
language
* Fixed a bug which prevented certain migrations from running in a multi-db setup.
* Fixed a regression which prevented the ``Page`` model from rendering correctly
when used in a ``raw_id_field``.
* Fixed a regression which caused the CMS to cache the toolbar when ``CMS_PAGE_CACHE``
was set to ``True`` and an anonymous user had ``cms_edit`` set to ``True`` on their session.
* Fixed a regression which prevented users from overriding content in an inherited
placeholder.
* Added official support for Django 1.10.
* Fixed a bug affecting Firefox for Macintosh users, in which use of the Command key later followed by Return would
trigger a plugin save.
* Fixed a bug where template inheritance setting creates spurious migration (see #3479)
* Fixed a bug which prevented the page from being marked as dirty (pending changes)
when changing the value of the overwrite url field.
* Adjusted Ajax calls triggered when performing a placeholder operation (add plugin, etc..) to include
a GET query called cms_path. This query points to the path where the operation originates from.
* Added a deprecation warning to method ``render_plugin()`` in class ``CMSPlugin``.
* Since ``get_parent_classes()`` became a classmethod, do not instantiate plugin before invocation.
* Fixed a bug where the page tree would not update correctly when a sibling page was moved
from left to right or right to left.
* Improved the ``fix-tree`` command so that it also fixes non-root nodes (pages).
* Removed the deprecated ``add_url()``, ``edit_url()``, ``move_url()``, ``delete_url()``, ``copy_url()`` properties of
CMSPlugin model.
* Deprecated ``frontend_edit_template`` attribute of ``CMSPluginBase``.
* Introduced placeholder operation signals.
* The ``post_`` methods in ```PlaceholderAdminMixin`` have been deprecated in favor of
placeholder operation signals.
* Re-introduced the "Revert to live" menu option.
* Added support for django-reversion >= 2 (see #5830)
* Rewrote manual installation how-to documentation
=== 3.4.1 (2016-10-04) ===
* Fixed a regression when static placeholder was uneditable if it was present
on the page multiple times
* Removed globally unique constraint for Apphook configs.
* Fixed a bug when keyboard shortcuts were triggered when form fields were
focused
* Fixed a bug when ``shift + space`` shortcut wouldn't correctly highlight a
plugin in the structure board
* Fixed a bug when plugins that have top-level svg element would break
structure board
* Fixed a bug where output from the ``show_admin_menu_for_pages`` template tag
was escaped in Django 1.9
* Fixed a bug where plugins would be rendered as editable if toolbar was shown
but user was not in edit mode.
* Fixed css reset issue with shortcuts modal
=== 3.4.0 (2016-09-14) ===
* Changed the way CMS plugins are rendered. The div with `cms-plugin` class is
no longer rendered around every CMS plugin, instead a combination of `template`
tags and JavaScript is used to add event handlers and plugin data directly to
the plugin markup. This fixes most of the rendering issues that were present
because of the extra markup.
* Changed cache-busting implementation, it is now handled by a path change,
not by GET parameter.
* Added a possibility to copy pages in the Page Tree by drag'n'drop.
* Make it possible to use multi-table inheritance for Page/Title extensions.
* Refactored plugin rendering functionality to speed up loading time in both
structure and content mode.
* Added ``Shift + Space`` shortcut that behaves similar to ``Space`` shortcut
but takes into account currently hovered plugin.
* Improved keyboard navigation
* Added help modal about available shortcuts
* Added fuzzy matching to plugin picker
* Changed the ``downcast_plugins`` utility to return a generator instead of a list
* Fixed a bug that caused an aliased placeholder to show in structure mode.
* Fixed a bug which prevented aliased content from showing correctly without
publishing the page first.
* Added help text to an ``Alias`` plugin change form when attached to a page
to show the content editor where the content is aliased from.
* Removed revision support from djangoCMS core.
As a result both ``CMS_MAX_PAGE_HISTORY_REVERSIONS`` and ``CMS_MAX_PAGE_PUBLISH_REVERSIONS``
settings are no longer supported, as well as the ``with_revision`` parameter
in ``cms.api.create_page`` and ``cms.api.create_title``.
=== 3.3.3 (unreleased) ===
* Fixed a bug where where the plugin picker would display the plugin names
translated in the request language instead of the user's language.
* Fixed a bug which raised an exception when the ``AdvancedSettingsForm``
failed validation on certain fields.
* Fixed a bug with widgets not initialising correctly sometimes
* Fixed a tree corruption when moving a published page under a published one.
* Fixed a tree corruption caused by ``fix-tree`` when an unpublished page is parent
to a published page.
* Fixed an error when publishing a page that has an unpublished child page who is
parent to a published page.
* Fixed a bug where moving a published page under a page marked as pending publishing
is left as published instead of being marked as pending publishing.
* Fixed AttributeError when using ``create_page`` in management command
* Fixed a bug in getting the language from current request which can cause error 500
* API functions are now atomic by design (use the @atomic decorator)
* Fixed a bug where a ``Page`` was created with it's languages field set to ``None``.
=== 3.3.2 (2016-08-11) ===
* Fixed a bug where it wasn't possible to scroll the toolbar menu if scroll
started on the disabled menu item on small screens.
* Fixed a migration error (0014) that occurred under certain environments.
* Fixed a regression when standalone CMS Widgets wouldn't work due to
non-existing JavaScript dependencies.
* Fixed a possible recursion error when using the ``Alias`` plugin.
* Fixed a regression where submit handlers for modal form wouldn't be executed
under certain circumstances
=== 3.3.1 (2016-07-13) ===
* Added a warning for users who are leaving the page or closing the plugin
modal by pressing ESC to prevent accidental loss of content.
* Fixed a bug when clicking inside sideframe didn't close toolbar dropdowns
* Fixed a bug where saving errors wouldn't be shown in the modal window.
* Fixed a misleading message when modal iframe contents couldn't be accessed.
* Added a workaround for a bug when plugins couldn't be deleted in Firefox
with 1Password extension installed
* Changed CMS JavaScript bundling from simple concatenation to webpack-based.
Using CMS JavaScript modules directly is no longer possible.
* Fixed an issue where plugins that have no immediate DOM representation
wouldn't be editable or movable.
* Fixed a regression in which plugins that defined ``parent_classes``
would not show up in the structure mode.
* Introduced new logic to leverage Django's dynamic related name
functionality on ``CMSPlugin`` subclasses for the parent link field.
* Backported a performance fix from Django to avoid extra queries when
plugins access their parent via the parent link field ``cmsplugin_ptr``.
* Fixed typo in ``AdvancedSettingsForm`` error messages.
* Fixed long standing bug that prevented apphook endspoints from being
CSRF exempt.
* Changed default value for ``CMS_INTERNAL_IPS``.
* Fixed an issue that prevented non superusers from copying all plugins
in a placeholder.
* Fixed an issue where plugin permissions where not checked when clearing
a placeholder.
* Fixed an issue where plugin permissions where not checked when deleting
a page or page translation.
* Added support for tiered ``CMS_PLACEHOLDER_CONF``.
* Fixed a useless placeholders edit permissions checking when not in edit
mode.
* Fixed a bug where users with limited permissions could not interact with
page tree dropdowns.
* Fixed a bug where Django Compressor could not be used on the sekizai ``js``
block.
* Fixed an encoding error when running the ``publisher-publish`` command.
* Fixed regression introduced in 3.3.0 when using the
``render_plugin_toolbar_config`` template tag directly.
* Fixed ``render_model`` template tags to work with models containing deferred
fields.
* Fixed error in retrieving placeholder label from configuration.
=== 3.3.0 (2016-05-26) ===
* [no changes vs. rc4]
=== 3.3.0.rc4 (2016-05-24) ===
* Fixed regression in management commands
* Fixed documentation typo
=== 3.3.0.rc3 (2016-05-23) ===
* Added contribution policies documentation
* Corrected documentation in numerous places
* Corrected an issue where someone could see and use the internal placeholder plugin in the structure board
* Fixed a regression where the first page created was not automatically published
* Corrected the instructions for using the ``delete-orphaned-plugins`` command
* Re-pinned django-treebeard to >=4.0.1
=== 3.3.0.rc2 (2016-05-19) ===
* Added CMS_WIZARD_CONTENT_PLACEHOLDER setting
* Renamed the CMS_WIZARD_* settings to CMS_PAGE_WIZARD_*
* Deprecated the old-style wizard-related settings
* Improved documentation further
* Improved handling of uninstalled apphooks
* Fixed toolbar placement when foundation is installed
* Fixed an issue which could lead to an apphook without a slug
* Fixed numerous frontend issues
=== 3.3.0.rc1 (2016-05-16) ===
* Removed support for Django 1.6, 1.7 and python 2.6
* Changed the default value of CMSPlugin.position to 0 instead of null
* Refactored the language menu to allow for better integration with many languages
* Refactored management commands completely for better consistency
* Fixed "failed to load resource" for favicon on welcome screen
* Changed behaviour of toolbar CSS classes: ``cms-toolbar-expanded`` class is only added now when toolbar is fully
expanded and not at the beginning of the animation. ``cms-toolbar-expanding`` and ``cms-toolbar-collapsing`` classes
are added at the beginning of their respective animations.
* Added unit tests for CMS JavaScript files
* Added frontend integration tests (written with Casper JS)
* Removed frontend integration tests (written with Selenium)
* Added the ability to declare cache expiration periods on a per-plugin basis
* Improved UI of page tree
* Improved UI in various minor ways
* Added a new setting CMS_INTERNAL_IPS for defining a set of IP addresses for which
the toolbar will appear for authorized users. If left unset, retains the
existing behavior of allowing toolbar for authorized users at any IP address.
* Changed behaviour of sideframe; is no longer resizable, opens to 90% of the screen or 100% on
small screens.
* Removed some unnecessary reloads after closing sideframe.
* Added the ability to make pagetree actions work on currently picked language
* Removed deprecated CMS_TOOLBAR_SIMPLE_STRUCTURE_MODE setting
* Introduced the method ``get_cache_expiration`` on CMSPluginBase to be used
by plugins for declaring their rendered content's period of validity.
* Introduced the method ``get_vary_cache_on`` on CMSPluginBase to be used
by plugins for declaring ``VARY`` headers.
* Improved performance of plugin moving; no longer saves all plugins inside the placeholder.
* Fixed breadcrumbs of recently moved plugin reflecting previous position in
the tree
* Refactored plugin adding logic to no longer create the plugin before the user submits the form.
* Improved the behaviour of the placeholder cache
* Improved fix-tree command to sort by position and path when rebuilding positions.
* Fixed several regressions and tree corruptions on page move.
* Added new class method on CMSPlugin ``requires_parent_plugin``
* Fixed behaviour of ``get_child_classes``; now correctly calculates child classes when not
configured in the placeholder.
* Removed internal ``ExtraMenuItems`` tag.
* Removed internal ``PluginChildClasses`` tag.
* Modified RenderPlugin tag; no longer renders the ``content.html`` template
and instead just returns the results.
* Added a ``get_cached_template`` method to the ``Toolbar()`` main class to reuse loaded templates per request. It
works like Django's cached template loader, but on a request basis.
* Added a new method ``get_urls()`` on the appbase class to get CMSApp.urls, to allow passing a page object to it.
* Changed JavaScript linting from JSHint and JSCS to ESLint
* Fixed a bug when it was possible to drag plugin into clipboard
* Fixed a bug where clearing clipboard was closing any open modal
=== 3.2.5 (2016-04-27) ===
- Fixed regression when page couldn't be copied if CMS_PERMISSION was False
- Improved handling of uninstalled apphooks
- Fix packaging problem with the wheel distribution
=== 3.2.4 (2016-04-26) ===
- Fix cache settings
- Fix user lookup for view restrictions/page permissions when using raw id field
- Fixed regression when page couldn't be copied if CMS_PERMISSION was False
- Fixes an issue relating to uninstalling a namespaced application
- Adds "Can change page" permission
- Fixes a number of page-tree issues the could lead data corruption under
certain conditions
- Addresses security vulnerabilities in the `render_model` template tag that
could lead to escalation of privileges or other security issues.
- Addresses a security vulnerability in the cms' usage of the messages framework
- Fixes security vulnerabilities in custom FormFields that could lead to
escalation of privileges or other security issues.
=== 3.2.3 (2016-03-09) ===
- Fix the display of hyphenated language codes in the page tree
- Fix a family of issues relating to unescaped translations in the page tree
=== 3.2.2 (2016-03-02) ===
- Substantial improvements to the page tree and significant reduction of reloads
@@ -42,7 +463,7 @@
- Added tooltips for certain user interaction elements
- Added full touch support and optimisations for mobile devices
- Added gulp.js for linting, compressing and bundling
- Added YuiDocs for Javascript documentation
- Added YuiDocs for JavaScript documentation
- Added ``CMS_TOOLBAR_SIMPLE_STRUCTURE_MODE`` to switch back to the old board rendering,
this will be deprecated in 3.3.0
- Added ``request.toolbars.placeholder_list`` this will replace
@@ -89,9 +510,27 @@
- Fixed an issue where ``allow_children`` and ``disable_child_plugins`` didn't work on dragitems
=== 3.1.6 (unreleased) ===
=== 3.1.8 (unreleased) ===
- Removed html5lib from setup.py
=== 3.1.7 (2016-04-27) ===
- Fix packaging problem with the wheel distribution
=== 3.1.6 (2016-04-26) ===
- Fix cache settings
- Fix user lookup for view restrictions/page permissions when using raw id field
- Fixes an issue relating to uninstalling a namespaced application
- Adds "Can change page" permission
- Addresses security vulnerabilities in the `render_model` template tag that
could lead to escalation of privileges or other security issues.
- Addresses a security vulnerability in the cms' usage of the messages framework
- Fixes security vulnerabilities in custom FormFields that could lead to
escalation of privileges or other security issues.
=== 3.1.5 (2016-01-29) ===
@@ -216,6 +655,8 @@
=== 3.0.17 (unreleased) ===
- Addresses security vulnerabilities in the `render_model` template tag that could
lead to escalation of privileges or other security issues.
- Fix ExtensionToolbar when language is removed but titles still exists…
- Fix PageSelectWidget JS syntax
- Fix cache settings
@@ -632,7 +1073,7 @@ Please see Install/2.4 release notes *before* attempting to upgrade to version 2
==== 2.1.0 (2011-01-26) ====
- language namespaces for apphooks (reverse("de:myview"), reverse("en:myview"))
- video plugin switch to http://github.com/FlashJunior/OSFlashVideoPlayer
- video plugin switch to https://github.com/FlashJunior/OSFlashVideoPlayer
- frontediting added (cms.middlware.toolbar.ToolbarMiddleware)
- testsuite works now under sqlite and postgres
- orphaned text embed plugins get now deleted if not referenced in the text anymore
-44
View File
@@ -1,44 +0,0 @@
##########################
Contributing to django CMS
##########################
Like every open-source project, django CMS is always looking for motivated
individuals to contribute to its source code.
There's more guidance on `how to contribute in our documentation <http://docs.django-cms.org/en/latest/introduction>`_.
Key points:
.. ATTENTION::
If you think you have discovered a security issue in our code, please report
it **privately**, by emailing us at `security@django-cms.org`_.
Please **do not** raise it on:
* IRC
* GitHub
* either of our email lists
or in any other public forum until we have had a chance to deal with it.
*********
Community
*********
People interested in developing for the django CMS should join the
`django-cms-developers`_ mailing list as well as heading over to #django-cms on
the `freenode`_ IRC network for help and to discuss the development.
You may also be interested in following `@djangocmsstatus`_ on twitter to get
the GitHub commits as well as the hudson build reports. There is also a
`@djangocms`_ account for less technical announcements.
.. _security@django-cms.org: mailto:security@django-cms.org
.. _fork: http://github.com/divio/django-cms
.. _django-cms-developers: http://groups.google.com/group/django-cms-developers
.. _freenode : http://freenode.net/
.. _@djangocmsstatus : https://twitter.com/djangocmsstatus
.. _@djangocms : https://twitter.com/djangocms
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (c) 2008, Batiste Bieler
Copyright (c) 2008-present, Batiste Bieler
All rights reserved.
Redistribution and use in source and binary forms, with or without
+47 -43
View File
@@ -2,11 +2,9 @@
django CMS
##########
.. image:: https://travis-ci.org/divio/django-cms.svg?branch=develop
:target: http://travis-ci.org/divio/django-cms
:target: https://travis-ci.org/divio/django-cms
.. image:: https://img.shields.io/pypi/v/django-cms.svg
:target: https://pypi.python.org/pypi/django-cms/
.. image:: https://img.shields.io/pypi/dm/django-cms.svg
:target: https://pypi.python.org/pypi/django-cms/
.. image:: https://img.shields.io/badge/wheel-yes-green.svg
:target: https://pypi.python.org/pypi/django-cms/
.. image:: https://img.shields.io/pypi/l/django-cms.svg
@@ -15,65 +13,68 @@ django CMS
:target: https://codeclimate.com/github/divio/django-cms
:alt: Code Climate
Open source enterprise content management system based on the django framework.
Open source enterprise content management system based on the Django framework.
.. image:: https://raw.githubusercontent.com/divio/django-cms/develop/docs/images/try-with-aldryn.png
:target: http://demo.django-cms.org/
:alt: Try demo with Aldryn
.. image:: https://raw.githubusercontent.com/divio/django-cms/develop/docs/images/try-with-divio.png
:target: http://try.django-cms.org/
:alt: Try demo with Divio Cloud
.. ATTENTION:: To propose features, always open pull requests on the **develop** branch.
It's the branch for features that will go into the next django CMS feature release.
.. ATTENTION::
For fixes for 3.1.x releases, please work on **support/3.1.x** which contains
the next patch release for 3.1.x series.
To propose **significant new features**, open pull requests based on and made against the **develop** branch. It's
the branch for features that will go into the next django CMS feature release.
For fixes for 3.0.x releases, please work on **support/3.0.x** which contains
the next patch release for 3.0.x series.
To propose **fixes and backwards-compatible improvements**, please work on the latest **release** branch. This is
the branch that will become the next PyPI release ("the next version of django CMS").
The **master** branch is the current stable release, the one released on PyPI.
Changes based on **master** will not be accepted.
Security fixes will be backported to older branches by the core team as appropriate.
********
Features
********
* Hierarchical pages
* Extensive support for multilingual websites
* Multi site support
* Draft/Published workflows
* Undo/Redo
* Use the content blocks (placeholders) in your own apps (models)
* Use the content blocks (static placeholders) anywhere in your templates
* Edit content directly in the frontend on your pages
* Hierarchical content plugins (columns, style changes etc)
* Navigation rendering and extending from your apps
* SEO friendly URLs
* Highly integrative into your own apps
* hierarchical pages
* extensive built-in support for multilingual websites
* multi-site support
* draft/publish workflows
* version control
* a sophisticated publishing architecture, that's also usable in your own applications
* frontend content editing
* a hierarchical content structure for nested plugins
* an extensible navigation system that your own applications can hook into
* SEO-friendly URLs
* designed to integrate thoroughly into other applications
Developing applications that integrate with and take advantage of django CMS features is easy and well-documented.
You can define editable areas, called placeholders, in your templates which you fill
with many different so called CMS content plugins.
A list of all the plugins can be found here:
`3rd party plugins <http://www.djangopackages.com/grids/g/django-cms/>`_
Should you be unable to find a suitable plugin for you needs, writing your own is very simple.
More information on `our website <http://www.django-cms.org>`_.
More information on `our website <https://www.django-cms.org>`_.
************
Requirements
************
django CMS requires Django version 1.6.9 or later, 1.7 or 1.8, and Python 2.6, 2.7, 3.3 or 3.4.
See the `Python/Django requirements for the current release version
<http://docs.django-cms.org/en/latest/#software-version-requirements-and-release-notes>`_ in our documentation.
See the `installation how-to guide for an overview of some other requirements and dependencies of the current release
<http://docs.django-cms.org/en/latest/how_to/install.html>`_
*************
Documentation
*************
Please head over to our `documentation <http://docs.django-cms.org/>`_ for all
the details on how to install, extend and use the django CMS.
We maintain documentation for several versions of the project. Key versions are:
* `stable <http://docs.django-cms.org>`_ (default), for the **current release** version
* `latest <http://docs.django-cms.org/en/latest/>`_, representing the latest build of the **release-3.4.x branch**
* `develop <http://docs.django-cms.org/en/develop/>`_, representing the latest build of the **develop branch**
For more information about our branch policy, see `Branches
<http://docs.django-cms.org/en/latest/contributing/development-policies.html>`_.
Our documentation is hosted courtesy of `Read the Docs <https://readthedocs.org>`_.
********
Tutorial
@@ -85,7 +86,7 @@ http://docs.django-cms.org/en/latest/introduction/index.html
Quick Start
***********
You can use the `django CMS installer <http://djangocms-installer.readthedocs.org>`_::
You can use the `django CMS installer <https://djangocms-installer.readthedocs.io>`_::
$ pip install --upgrade virtualenv
$ virtualenv env
@@ -103,11 +104,14 @@ Getting Help
Please head over to our IRC channel, #django-cms, on irc.freenode.net or write
to our `mailing list <https://groups.google.com/forum/#!forum/django-cms>`_.
If you don't have an IRC client, you can `join our IRC channel using the KiwiIRC web client
<https://kiwiirc.com/client/irc.freenode.net/django-cms>`_, which works pretty well.
******************
Commercial support
******************
This project is backed by `Divio <http://www.divio.com/>`_.
This project is backed by `Divio <https://www.divio.com/en/commercial-support/>`_.
If you need help implementing or hosting django CMS, please contact us:
sales@divio.com.
@@ -118,7 +122,7 @@ Credits
* Includes icons from `FamFamFam <http://www.famfamfam.com>`_.
* Python tree engine powered by
`django-treebeard <https://tabo.pe/projects/django-treebeard/>`_.
* JavaScript tree in admin uses `jsTree <http://www.jstree.com>`_.
* JavaScript tree in admin uses `jsTree <https://www.jstree.com>`_.
* Many thanks to the
`over 515 contributors <https://github.com/divio/django-cms/blob/master/AUTHORS>`_
`over 515 contributors <https://github.com/divio/django-cms/blob/develop/AUTHORS>`_
to the django CMS!
+4 -2
View File
@@ -5,8 +5,10 @@
- Build newest english JS translations (django-admin.py makemessages -l en -d djangojs)
- Pull translations (tx pull -f -a)
- Compile translations (django-admin.py compilemessages)
- Make sure css files are compiled from latest sass source (gulp sass)
- Make sure js files are bundled and minified propery from latest source (gulp bundle)
- Make sure icons are recreated in the new place (gulp icons)
- Make sure CSS files are compiled from latest sass source (gulp sass)
- Make sure JS files are bundled and minified propery from latest source (gulp bundle)
- Make sure to remove JS, CSS and font files from the older version of CMS
- Check CHANGELOG that all closed PRs are present.
- Prepare blog post, including "Release" tag
- update AUTHORS file (python develop.py authors)
+2
View File
@@ -0,0 +1,2 @@
last 2 versions
> 1%
+1 -1
View File
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
__version__ = '3.2.2'
__version__ = '3.6.0'
default_app_config = 'cms.apps.CMSConfig'
-208
View File
@@ -1,208 +0,0 @@
# -*- coding: utf-8 -*-
import bisect
from cms.models import Title, Page, EmptyTitle
from cms.utils import get_language_list
from cms.utils.conf import get_cms_setting
from cms.utils.permissions import get_user_sites_queryset, load_view_restrictions
from django.contrib.admin.views.main import ChangeList, ALL_VAR, IS_POPUP_VAR, \
ORDER_TYPE_VAR, ORDER_VAR, SEARCH_VAR
from django.contrib.sites.models import Site
COPY_VAR = "copy"
def cache_tree_children(queryset):
"""
For all items in the queryset, set the '_cached_children' attribute to a
list. This attribute is in turn used by the 'get_children' method on the
item, which would otherwise (if '_cached_children' is not set) cause a
database query.
The queryset must be ordered by 'path', or the function will put the children
in the wrong order.
"""
parents_dict = {}
# Loop through the queryset twice, so that the function works even if the
# mptt tree is broken. Since django caches querysets internally, the extra
# computation time is minimal.
for obj in queryset:
parents_dict[obj.pk] = obj
obj._cached_children = []
for obj in queryset:
parent = parents_dict.get(obj.parent_id)
if parent:
parent._cached_children.append(obj)
class CMSChangeList(ChangeList):
"""
Renders a Changelist - In our case it looks like a tree - it's the list of
*instances* in the Admin.
It is usually responsible for pagination (not here though, we have a
treeview)
"""
real_queryset = False
def __init__(self, request, *args, **kwargs):
from cms.utils.helpers import current_site
self._current_site = current_site(request)
super(CMSChangeList, self).__init__(request, *args, **kwargs)
try:
self.queryset = self.get_queryset(request)
except: # pragma: no cover
raise
self.get_results(request)
if self._current_site:
request.session['cms_admin_site'] = self._current_site.pk
self.set_sites(request)
def get_queryset(self, request):
if COPY_VAR in self.params:
del self.params[COPY_VAR]
if 'language' in self.params:
del self.params['language']
if 'page_id' in self.params:
del self.params['page_id']
qs = super(CMSChangeList, self).get_queryset(request).drafts()
site = self.current_site()
permissions = Page.permissions.get_change_id_list(request.user, site)
if permissions != Page.permissions.GRANT_ALL:
qs = qs.filter(pk__in=permissions)
self.root_queryset = self.root_queryset.filter(pk__in=permissions)
self.real_queryset = True
qs = qs.filter(site=self._current_site)
return qs
def is_filtered(self):
from cms.utils.helpers import SITE_VAR
lookup_params = self.params.copy() # a dictionary of the query string
for i in (ALL_VAR, ORDER_VAR, ORDER_TYPE_VAR, SEARCH_VAR, IS_POPUP_VAR, SITE_VAR, 'language', 'page_id'):
if i in lookup_params:
del lookup_params[i]
if not lookup_params.items() and not self.query:
return False
return True
def get_results(self, request):
if self.real_queryset:
super(CMSChangeList, self).get_results(request)
if not self.is_filtered():
self.full_result_count = self.result_count = self.root_queryset.drafts().count()
else:
self.full_result_count = self.root_queryset.drafts().count()
def set_items(self, request):
site = self.current_site()
# Get all the pages, ordered by tree ID (it's convenient to build the
# tree using a stack now)
pages = self.get_queryset(request).drafts().order_by('path').select_related('publisher_public')
# Get lists of page IDs for which the current user has
# "permission to..." on the current site.
if get_cms_setting('PERMISSION'):
perm_edit_ids = Page.permissions.get_change_id_list(request.user, site)
perm_publish_ids = Page.permissions.get_publish_id_list(request.user, site)
perm_advanced_settings_ids = Page.permissions.get_advanced_settings_id_list(request.user, site)
restricted_ids = Page.permissions.get_restricted_id_list(site)
if perm_edit_ids and perm_edit_ids != Page.permissions.GRANT_ALL:
pages = pages.filter(pk__in=perm_edit_ids)
root_pages = []
# Cache view restrictions for the is_restricted template tag
load_view_restrictions(request, pages)
pages = list(pages)
all_pages = pages[:] # That is, basically, a copy.
# Unfortunately we cannot use the MPTT builtin code for pre-caching
# the children here, because MPTT expects the tree to be 'complete'
# and otherwise complaints about 'invalid item order'
cache_tree_children(pages)
ids = dict((page.id, page) for page in pages)
parent_ids = {}
for page in pages:
if not page.parent_id in parent_ids:
parent_ids[page.parent_id] = []
parent_ids[page.parent_id].append(page)
for page in pages:
children = parent_ids.get(page.pk, [])
# If the parent page is not among the nodes shown, this node should
# be a "root node". The filtering for this has already been made, so
# using the ids dictionary means this check is constant time
page.root_node = page.parent_id not in ids
if get_cms_setting('PERMISSION'):
# caching the permissions
page.permission_edit_cache = perm_edit_ids == Page.permissions.GRANT_ALL or page.pk in perm_edit_ids
page.permission_publish_cache = perm_publish_ids == Page.permissions.GRANT_ALL or page.pk in perm_publish_ids
page.permission_advanced_settings_cache = perm_advanced_settings_ids == Page.permissions.GRANT_ALL or page.pk in perm_advanced_settings_ids
page.permission_user_cache = request.user
page.permission_restricted = page.pk in restricted_ids
if page.root_node or self.is_filtered():
page.last = True
if len(children):
# TODO: WTF!?!
# The last one is not the last... wait, what?
# children should NOT be a queryset. If it is, check that
# your django-mptt version is 0.5.1
children[-1].last = False
page.menu_level = 0
root_pages.append(page)
if page.parent_id:
page.get_cached_ancestors()
else:
page.ancestors_ascending = []
# Because 'children' is the reverse-FK accessor for the 'parent'
# FK from Page->Page, we have to use wrong English here and set
# an attribute called 'childrens'. We are aware that this is WRONG
# but what should we do?
# If the queryset is filtered, do NOT set the 'childrens' attribute
# since *ALL* pages will be in the 'root_pages' list and therefore
# be displayed. (If the queryset is filtered, the result is not a
# tree but rather a flat list).
if self.is_filtered():
page.childrens = []
else:
page.childrens = children
for page in all_pages:
page.title_cache = {}
page.all_languages = []
if page.publisher_public_id:
page.publisher_public.title_cache = {}
page.publisher_public.all_languages = []
ids[page.publisher_public_id] = page.publisher_public
titles = Title.objects.filter(page__in=ids)
insort = bisect.insort # local copy to avoid globals lookup in the loop
for title in titles:
page = ids[title.page_id]
page.title_cache[title.language] = title
if not title.language in page.all_languages:
insort(page.all_languages, title.language)
site_id = self.current_site()
languages = get_language_list(site_id)
for page in all_pages:
for lang in languages:
if not lang in page.title_cache:
page.title_cache[lang] = EmptyTitle(lang)
self.root_pages = root_pages
def get_items(self):
return self.root_pages
def set_sites(self, request):
"""Sets sites property to current instance - used in tree view for
sites combo.
"""
if get_cms_setting('PERMISSION'):
self.sites = get_user_sites_queryset(request.user)
else:
self.sites = Site.objects.all()
self.has_access_to_multiple_sites = len(self.sites) > 1
def current_site(self):
return self._current_site
-11
View File
@@ -1,11 +0,0 @@
# -*- coding: utf-8 -*-
from django import forms
from django.utils.translation import ugettext_lazy as _
class PermissionForm(forms.Form):
"""
Holds the specific field for permissions
"""
copy_permissions = forms.BooleanField(label=_('Copy permissions'),
required=False, initial=True)
-33
View File
@@ -1,33 +0,0 @@
# -*- coding: utf-8 -*-
from django.contrib.admin.views.decorators import staff_member_required
from django.http import Http404, HttpResponse
from django.shortcuts import get_object_or_404, render
from cms.models import Page
from cms.utils import get_cms_setting
from cms.admin.dialog.forms import PermissionForm
@staff_member_required
def get_copy_dialog(request, page_id):
if not get_cms_setting('PERMISSION'):
return HttpResponse('')
target_id = request.GET.get('target', False) or request.POST.get('target', False)
callback = request.GET.get('callback', False) or request.POST.get('callback', False)
page = get_object_or_404(Page, pk=page_id)
if target_id:
target = get_object_or_404(Page, pk=target_id)
if not page.has_change_permission(request) or (
target_id and not target.has_add_permission(request)):
raise Http404
context = {
'dialog_id': 'dialog-copy',
'form': PermissionForm(), # class needs to be instantiated
'callback': callback,
}
return render(request, "admin/cms/page/tree/copy_premissions.html", context)
+1017 -310
View File
File diff suppressed because it is too large Load Diff
+1220 -1130
View File
File diff suppressed because it is too large Load Diff
+49 -95
View File
@@ -1,18 +1,21 @@
# -*- coding: utf-8 -*-
from copy import deepcopy
from django.contrib import admin
from django.contrib.admin import site
from django.contrib.auth import get_user_model, get_permission_codename
from django.contrib.auth import get_user_model
from django.contrib.auth.admin import UserAdmin
from django.contrib.sites.models import Site
from django.db import OperationalError
from django.utils.translation import ugettext, ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from cms.admin.forms import GlobalPagePermissionAdminForm, PagePermissionInlineAdminForm, ViewRestrictionInlineAdminForm
from cms.exceptions import NoPermissionsException
from cms.models import Page, PagePermission, GlobalPagePermission, PageUser
from cms.models import PagePermission, GlobalPagePermission
from cms.utils import permissions, page_permissions
from cms.utils.conf import get_cms_setting
from cms.utils.helpers import classproperty
from cms.utils.permissions import get_user_permission_level
PERMISSION_ADMIN_INLINES = []
@@ -32,8 +35,20 @@ class PagePermissionInlineAdmin(TabularInline):
# use special form, so we can override of user and group field
form = PagePermissionInlineAdminForm
classes = ['collapse', 'collapsed']
exclude = ['can_view']
extra = 0 # edit page load time boost
show_with_view_permissions = False
def has_change_permission(self, request, obj=None):
if not obj:
return False
return page_permissions.user_can_change_page_permissions(
request.user,
page=obj,
site=obj.node.site,
)
def has_add_permission(self, request, obj=None):
return self.has_change_permission(request, obj)
@classproperty
def raw_id_fields(cls):
@@ -55,18 +70,18 @@ class PagePermissionInlineAdmin(TabularInline):
def get_queryset(self, request):
"""
Queryset change, so user with global change permissions can see
all permissions. Otherwise can user see only permissions for
all permissions. Otherwise user can see only permissions for
peoples which are under him (he can't see his permissions, because
this will lead to violation, when he can add more power to itself)
this will lead to violation, when he can add more power to himself)
"""
# can see only permissions for users which are under him in tree
site = Site.objects.get_current(request)
# here an exception can be thrown
try:
qs = self.model.objects.subordinate_to_user(request.user)
return qs.filter(can_view=False)
# can see only permissions for users which are under him in tree
qs = self.model.objects.subordinate_to_user(request.user, site)
except NoPermissionsException:
return self.objects.get_empty_query_set()
return self.model.objects.none()
return qs.filter(can_view=self.show_with_view_permissions)
def get_formset(self, request, obj=None, **kwargs):
"""
@@ -76,18 +91,20 @@ class PagePermissionInlineAdmin(TabularInline):
"""
exclude = self.exclude or []
if obj:
if not obj.has_add_permission(request):
user = request.user
if not obj.has_add_permission(user):
exclude.append('can_add')
if not obj.has_delete_permission(request):
if not obj.has_delete_permission(user):
exclude.append('can_delete')
if not obj.has_publish_permission(request):
if not obj.has_publish_permission(user):
exclude.append('can_publish')
if not obj.has_advanced_settings_permission(request):
if not obj.has_advanced_settings_permission(user):
exclude.append('can_change_advanced_settings')
if not obj.has_move_page_permission(request):
if not obj.has_move_page_permission(user):
exclude.append('can_move_page')
formset_cls = super(PagePermissionInlineAdmin, self
).get_formset(request, obj=None, exclude=exclude, **kwargs)
kwargs['exclude'] = exclude
formset_cls = super(PagePermissionInlineAdmin, self).get_formset(request, obj=obj, **kwargs)
qs = self.get_queryset(request)
if obj is not None:
qs = qs.filter(page=obj)
@@ -100,32 +117,7 @@ class ViewRestrictionInlineAdmin(PagePermissionInlineAdmin):
form = ViewRestrictionInlineAdminForm
verbose_name = _("View restriction")
verbose_name_plural = _("View restrictions")
exclude = [
'can_add', 'can_change', 'can_delete', 'can_view',
'can_publish', 'can_change_advanced_settings', 'can_move_page',
'can_change_permissions'
]
def get_formset(self, request, obj=None, **kwargs):
"""
Some fields may be excluded here. User can change only permissions
which are available for him. E.g. if user does not haves can_publish
flag, he can't change assign can_publish permissions.
"""
formset_cls = super(PagePermissionInlineAdmin, self).get_formset(request, obj, **kwargs)
qs = self.get_queryset(request)
if obj is not None:
qs = qs.filter(page=obj)
formset_cls._queryset = qs
return formset_cls
def get_queryset(self, request):
"""
Returns a QuerySet of all model instances that can be edited by the
admin site. This is used by changelist_view.
"""
qs = self.model.objects.subordinate_to_user(request.user)
return qs.filter(can_view=True)
show_with_view_permissions = True
class GlobalPagePermissionAdmin(admin.ModelAdmin):
@@ -138,8 +130,6 @@ class GlobalPagePermissionAdmin(admin.ModelAdmin):
search_fields.append("user__%s" % field)
search_fields.append('group__name')
exclude = []
list_display.append('can_change_advanced_settings')
list_filter.append('can_change_advanced_settings')
@@ -154,6 +144,18 @@ class GlobalPagePermissionAdmin(admin.ModelAdmin):
filter_copy.remove('user')
return filter_copy
def has_add_permission(self, request):
site = Site.objects.get_current(request)
return permissions.user_can_add_global_permissions(request.user, site)
def has_change_permission(self, request, obj=None):
site = Site.objects.get_current(request)
return permissions.user_can_change_global_permissions(request.user, site)
def has_delete_permission(self, request, obj=None):
site = Site.objects.get_current(request)
return permissions.user_can_delete_global_permissions(request.user, site)
@classproperty
def raw_id_fields(cls):
# Dynamically set raw_id_fields based on settings
@@ -172,54 +174,6 @@ class GlobalPagePermissionAdmin(admin.ModelAdmin):
return ['user'] if threshold else []
class GenericCmsPermissionAdmin(object):
"""
Custom mixin for permission-enabled admin interfaces.
"""
def update_permission_fieldsets(self, request, obj=None):
"""
Nobody can grant more than he haves, so check for user permissions
to Page and User model and render fieldset depending on them.
"""
fieldsets = deepcopy(self.fieldsets)
perm_models = (
(Page, ugettext('Page permissions')),
(PageUser, ugettext('User & Group permissions')),
(PagePermission, ugettext('Page permissions management')),
)
for i, perm_model in enumerate(perm_models):
model, title = perm_model
opts, fields = model._meta, []
name = model.__name__.lower()
for key in ('add', 'change', 'delete'):
perm_code = '%s.%s' % (opts.app_label, get_permission_codename(key, opts))
if request.user.has_perm(perm_code):
fields.append('can_%s_%s' % (key, name))
if fields:
fieldsets.insert(2 + i, (title, {'fields': (fields,)}))
return fieldsets
def _has_change_permissions_permission(self, request):
"""
User is able to add/change objects only if he haves can change
permission on some page.
"""
try:
get_user_permission_level(request.user)
except NoPermissionsException:
return False
return True
def has_add_permission(self, request):
return self._has_change_permissions_permission(request) and \
super(self.__class__, self).has_add_permission(request)
def has_change_permission(self, request, obj=None):
return self._has_change_permissions_permission(request) and \
super(self.__class__, self).has_change_permission(request, obj)
if get_cms_setting('PERMISSION'):
admin.site.register(GlobalPagePermission, GlobalPagePermissionAdmin)
PERMISSION_ADMIN_INLINES.extend([
File diff suppressed because it is too large Load Diff
+39 -1
View File
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
from functools import update_wrapper
import copy
import json
from django.conf.urls import url
@@ -7,14 +8,20 @@ from django.contrib import admin
from django.contrib.admin import ModelAdmin
from django.contrib.auth.admin import csrf_protect_m
from django.db import transaction
from django.http import HttpResponseRedirect, HttpResponse
from django.http import HttpResponseRedirect, HttpResponse, HttpResponseBadRequest
from django.http.request import QueryDict
from django.utils.translation import override
from django.utils.six.moves.urllib.parse import urlparse
from cms.admin.forms import RequestToolbarForm
from cms.models import UserSettings
from cms.toolbar.toolbar import CMSToolbar
from cms.utils.page import get_page_from_request
from cms.utils.urlutils import admin_reverse
class SettingsAdmin(ModelAdmin):
def get_urls(self):
def wrap(view):
def wrapper(*args, **kwargs):
@@ -28,6 +35,9 @@ class SettingsAdmin(ModelAdmin):
url(r'^session_store/$',
self.session_store,
name='%s_%s_session_store' % info),
url(r'^cms-toolbar/$',
wrap(self.get_toolbar),
name='%s_%s_get_toolbar' % info),
url(r'^$',
wrap(self.change_view),
name='%s_%s_change' % info),
@@ -62,6 +72,34 @@ class SettingsAdmin(ModelAdmin):
content_type="application/json"
)
def get_toolbar(self, request):
form = RequestToolbarForm(request.GET or None)
if not form.is_valid():
return HttpResponseBadRequest('Invalid parameters')
form_data = form.cleaned_data
cms_path = form_data.get('cms_path') or request.path_info
origin_url = urlparse(cms_path)
attached_obj = form_data.get('attached_obj')
current_page = get_page_from_request(request, use_path=origin_url.path, clean_path=True)
if attached_obj and current_page and not (attached_obj == current_page):
return HttpResponseBadRequest('Generic object does not match current page')
data = QueryDict(query_string=origin_url.query, mutable=True)
placeholders = request.GET.getlist("placeholders[]")
if placeholders:
data.setlist('placeholders[]', placeholders)
request = copy.copy(request)
request.GET = data
request.current_page = current_page
request.toolbar = CMSToolbar(request, request_path=origin_url.path, _async=True)
request.toolbar.set_object(attached_obj or current_page)
return HttpResponse(request.toolbar.render())
def save_model(self, request, obj, form, change):
obj.user = request.user
obj.save()
+1 -1
View File
@@ -4,7 +4,7 @@ from cms.admin.placeholderadmin import PlaceholderAdminMixin
class StaticPlaceholderAdmin(PlaceholderAdminMixin, admin.ModelAdmin):
list_display = ('name', 'code', 'site', 'creation_method')
list_display = ('get_name', 'code', 'site', 'creation_method')
search_fields = ('name', 'code',)
exclude = ('creation_method',)
list_filter = ('creation_method', 'site')
+122 -19
View File
@@ -1,15 +1,24 @@
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.contrib.auth import get_user_model
from copy import deepcopy
from cms.admin.forms import PageUserForm, PageUserGroupForm
from cms.admin.permissionadmin import GenericCmsPermissionAdmin
from django.contrib import admin
from django.contrib.admin import site
from django.contrib.auth import get_user_model
from django.contrib.sites.models import Site
from django.utils.translation import ugettext
from cms.admin.forms import PageUserChangeForm, PageUserGroupForm
from cms.exceptions import NoPermissionsException
from cms.models import PageUser, PageUserGroup
from cms.models import Page, PagePermission, PageUser, PageUserGroup
from cms.utils.compat.forms import UserAdmin
from cms.utils.conf import get_cms_setting
from cms.utils.permissions import get_subordinate_users
from django.contrib.admin import site
from cms.utils.permissions import (
get_model_permission_codename,
get_subordinate_groups,
get_subordinate_users,
get_user_permission_level,
)
user_model = get_user_model()
admin_class = UserAdmin
@@ -17,21 +26,91 @@ for model, admin_instance in site._registry.items():
if model == user_model:
admin_class = admin_instance.__class__
class PageUserAdmin(admin_class, GenericCmsPermissionAdmin):
form = PageUserForm
add_form = PageUserForm
model = PageUser
class GenericCmsPermissionAdmin(object):
def get_subordinates(self, user, site):
raise NotImplementedError
def _has_change_permissions_permission(self, request):
"""
User is able to add/change objects only if he haves can change
permission on some page.
"""
site = Site.objects.get_current(request)
try:
get_user_permission_level(request.user, site)
except NoPermissionsException:
return False
return True
def get_form(self, request, obj=None, **kwargs):
form_class = super(GenericCmsPermissionAdmin, self).get_form(request, obj, **kwargs)
form_class._current_user = request.user
return form_class
def get_queryset(self, request):
qs = super(PageUserAdmin, self).get_queryset(request)
try:
user_id_set = get_subordinate_users(request.user).values_list('id', flat=True)
return qs.filter(pk__in=user_id_set)
except NoPermissionsException:
return self.model.objects.get_empty_query_set()
queryset = super(GenericCmsPermissionAdmin, self).get_queryset(request)
site = Site.objects.get_current(request)
user_ids = self.get_subordinates(request.user, site).values_list('pk', flat=True)
return queryset.filter(pk__in=user_ids)
def has_add_permission(self, request):
has_model_perm = super(GenericCmsPermissionAdmin, self).has_add_permission(request)
if not has_model_perm:
return False
return self._has_change_permissions_permission(request)
def has_change_permission(self, request, obj=None):
has_model_perm = super(GenericCmsPermissionAdmin, self).has_change_permission(request, obj)
if not has_model_perm:
return False
return self._has_change_permissions_permission(request)
def has_delete_permission(self, request, obj=None):
has_model_perm = super(GenericCmsPermissionAdmin, self).has_delete_permission(request, obj)
if not has_model_perm:
return False
return self._has_change_permissions_permission(request)
def has_view_permission(self, request, obj=None):
# For django 2.1
# Default is to return True if user got `change` perm, but we have to
# get in consideration also cms permission system
return self.has_change_permission(request, obj)
class PageUserGroupAdmin(admin.ModelAdmin, GenericCmsPermissionAdmin):
class PageUserAdmin(GenericCmsPermissionAdmin, admin_class):
form = PageUserChangeForm
model = PageUser
def get_subordinates(self, user, site):
return get_subordinate_users(user, site).values_list('pk', flat=True)
def get_readonly_fields(self, request, obj=None):
fields = super(PageUserAdmin, self).get_readonly_fields(request, obj)
if not request.user.is_superuser:
# Non superusers can't set superuser status on
# their subordinates.
fields = list(fields) + ['is_superuser']
return fields
def save_model(self, request, obj, form, change):
if not change:
# By default set the staff flag to True
# when a PageUser is first created
obj.is_staff = True
# Set the created_by field to the current user
obj.created_by = request.user
super(PageUserAdmin, self).save_model(request, obj, form, change)
class PageUserGroupAdmin(GenericCmsPermissionAdmin, admin.ModelAdmin):
form = PageUserGroupForm
list_display = ('name', 'created_by')
@@ -40,7 +119,31 @@ class PageUserGroupAdmin(admin.ModelAdmin, GenericCmsPermissionAdmin):
]
def get_fieldsets(self, request, obj=None):
return self.update_permission_fieldsets(request, obj)
"""
Nobody can grant more than he haves, so check for user permissions
to Page and User model and render fieldset depending on them.
"""
fieldsets = deepcopy(self.fieldsets)
perm_models = (
(Page, ugettext('Page permissions')),
(PageUser, ugettext('User & Group permissions')),
(PagePermission, ugettext('Page permissions management')),
)
for i, perm_model in enumerate(perm_models):
fields = []
model, title = perm_model
name = model.__name__.lower()
for key in ('add', 'change', 'delete'):
perm_code = get_model_permission_codename(model, action=key)
if request.user.has_perm(perm_code):
fields.append('can_%s_%s' % (key, name))
if fields:
fieldsets.insert(2 + i, (title, {'fields': (fields,)}))
return fieldsets
def get_subordinates(self, user, site):
return get_subordinate_groups(user, site).values_list('pk', flat=True)
if get_cms_setting('PERMISSION'):
admin.site.register(PageUser, PageUserAdmin)
-67
View File
@@ -1,67 +0,0 @@
# -*- coding: utf-8 -*-
from django.http import Http404
from django.shortcuts import get_object_or_404
from cms.models import Page, Title, CMSPlugin, Placeholder
def revert_plugins(request, version_id, obj):
from cms.utils.reversion_hacks import Version
version = get_object_or_404(Version, pk=version_id)
revs = [related_version.object_version for related_version in version.revision.version_set.all()]
cms_plugin_list = []
placeholders = {}
plugin_list = []
titles = []
others = []
page = obj
for rev in revs:
obj = rev.object
if obj.__class__ == Placeholder:
placeholders[obj.pk] = obj
if obj.__class__ == CMSPlugin:
cms_plugin_list.append(obj)
elif hasattr(obj, 'cmsplugin_ptr_id'):
plugin_list.append(obj)
elif obj.__class__ == Page:
pass
elif obj.__class__ == Title:
titles.append(obj)
else:
others.append(rev)
if not page.has_change_permission(request):
raise Http404
current_plugins = list(CMSPlugin.objects.filter(placeholder__page=page))
for pk, placeholder in placeholders.items():
# admin has already created the placeholders/ get them instead
try:
placeholders[pk] = page.placeholders.get(slot=placeholder.slot)
except Placeholder.DoesNotExist:
placeholders[pk].save()
page.placeholders.add(placeholders[pk])
for plugin in cms_plugin_list:
# connect plugins to the correct placeholder
plugin.placeholder = placeholders[plugin.placeholder_id]
plugin.save(no_signals=True)
for plugin in cms_plugin_list:
plugin.save()
for p in plugin_list:
if int(p.cmsplugin_ptr_id) == int(plugin.pk):
plugin.set_base_attr(p)
p.save()
for old in current_plugins:
if old.pk == plugin.pk:
plugin.save()
current_plugins.remove(old)
for title in titles:
title.page = page
try:
title.save()
except:
title.pk = Title.objects.get(page=page, language=title.language).pk
title.save()
for other in others:
other.object.save()
for plugin in current_plugins:
plugin.delete()
+63 -78
View File
@@ -13,6 +13,7 @@ from django.contrib.sites.models import Site
from django.core.exceptions import FieldError
from django.core.exceptions import PermissionDenied
from django.core.exceptions import ValidationError
from django.db import transaction
from django.template.defaultfilters import slugify
from django.template.loader import get_template
from django.utils import six
@@ -30,10 +31,11 @@ from cms.models.pluginmodel import CMSPlugin
from cms.models.titlemodels import Title
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from cms.utils import copy_plugins
from cms.utils import copy_plugins, get_current_site
from cms.utils.conf import get_cms_setting
from cms.utils.i18n import get_language_list
from cms.utils.permissions import _thread_locals, current_user, has_page_change_permission
from cms.utils.page import get_available_slug
from cms.utils.permissions import _thread_locals, current_user
from menus.menu_pool import menu_pool
@@ -41,26 +43,6 @@ from menus.menu_pool import menu_pool
# Helpers/Internals
#===============================================================================
def generate_valid_slug(source, parent, language):
"""
Generate a valid slug for a page from source for the given language.
Parent is passed so we can make sure the slug is unique for this level in
the page tree.
"""
if parent:
qs = Title.objects.filter(language=language, page__parent=parent)
else:
qs = Title.objects.filter(language=language, page__parent__isnull=True)
used = list(qs.values_list('slug', flat=True))
baseslug = slugify(source)
slug = baseslug
i = 1
if used:
while slug in used:
slug = '%s-%s' % (baseslug, i)
i += 1
return slug
def _verify_apphook(apphook, namespace):
"""
@@ -97,7 +79,6 @@ def _verify_plugin_type(plugin_type):
"""
if (hasattr(plugin_type, '__module__') and
issubclass(plugin_type, CMSPluginBase)):
plugin_pool.set_plugin_meta()
plugin_model = plugin_type.model
assert plugin_type in plugin_pool.plugins.values()
plugin_type = plugin_type.__name__
@@ -117,6 +98,7 @@ def _verify_plugin_type(plugin_type):
# Public API
#===============================================================================
@transaction.atomic
def create_page(title, template, language, menu_title=None, slug=None,
apphook=None, apphook_namespace=None, redirect=None, meta_description=None,
created_by='python-api', parent=None,
@@ -124,20 +106,13 @@ def create_page(title, template, language, menu_title=None, slug=None,
in_navigation=False, soft_root=False, reverse_id=None,
navigation_extenders=None, published=False, site=None,
login_required=False, limit_visibility_in_menu=constants.VISIBILITY_ALL,
position="last-child", overwrite_url=None, xframe_options=Page.X_FRAME_OPTIONS_INHERIT):
position="last-child", overwrite_url=None,
xframe_options=Page.X_FRAME_OPTIONS_INHERIT, page_title=None):
"""
Create a CMS Page and it's title for the given language
See docs/extending_cms/api_reference.rst for more info
"""
# ugly permissions hack
if created_by and isinstance(created_by, get_user_model()):
_thread_locals.user = created_by
created_by = getattr(created_by, get_user_model().USERNAME_FIELD)
else:
_thread_locals.user = None
# validate template
if not template == TEMPLATE_INHERITANCE_MAGIC:
assert template in [tpl[0] for tpl in get_cms_setting('TEMPLATES')]
@@ -145,21 +120,17 @@ def create_page(title, template, language, menu_title=None, slug=None,
# validate site
if not site:
site = Site.objects.get_current()
site = get_current_site()
else:
assert isinstance(site, Site)
# validate language:
assert language in get_language_list(site), get_cms_setting('LANGUAGES').get(site.pk)
# set default slug:
if not slug:
slug = generate_valid_slug(title, parent, language)
# validate parent
if parent:
assert isinstance(parent, Page)
parent = Page.objects.get(pk=parent.pk)
assert parent.publisher_is_draft
# validate publication date
if publication_date:
@@ -180,27 +151,28 @@ def create_page(title, template, language, menu_title=None, slug=None,
# validate position
assert position in ('last-child', 'first-child', 'left', 'right')
if parent:
if position in ('last-child', 'first-child'):
parent_id = parent.pk
else:
parent_id = parent.parent_id
else:
parent_id = None
target_node = parent.node if parent else None
# validate and normalize apphook
if apphook:
application_urls = _verify_apphook(apphook, apphook_namespace)
else:
application_urls = None
# ugly permissions hack
if created_by and isinstance(created_by, get_user_model()):
_thread_locals.user = created_by
created_by = getattr(created_by, get_user_model().USERNAME_FIELD)
else:
_thread_locals.user = None
if reverse_id:
if Page.objects.drafts().filter(reverse_id=reverse_id, site=site).count():
if Page.objects.drafts().filter(reverse_id=reverse_id, node__site=site).exists():
raise FieldError('A page with the reverse_id="%s" already exist.' % reverse_id)
page = Page(
created_by=created_by,
changed_by=created_by,
parent_id=parent_id,
publication_date=publication_date,
publication_end_date=publication_end_date,
in_navigation=in_navigation,
@@ -210,19 +182,18 @@ def create_page(title, template, language, menu_title=None, slug=None,
template=template,
application_urls=application_urls,
application_namespace=apphook_namespace,
site=site,
login_required=login_required,
limit_visibility_in_menu=limit_visibility_in_menu,
xframe_options=xframe_options,
)
page = page.add_root(instance=page)
if parent:
page = page.move(target=parent, pos=position)
page.set_tree_node(site=site, target=target_node, position=position)
page.save()
page.rescan_placeholders()
create_title(
language=language,
title=title,
page_title=page_title,
menu_title=menu_title,
slug=slug,
redirect=redirect,
@@ -234,13 +205,17 @@ def create_page(title, template, language, menu_title=None, slug=None,
if published:
page.publish(language)
if parent and position in ('last-child', 'first-child'):
parent._clear_node_cache()
del _thread_locals.user
return page.reload()
return page
@transaction.atomic
def create_title(language, title, page, menu_title=None, slug=None,
redirect=None, meta_description=None,
parent=None, overwrite_url=None):
redirect=None, meta_description=None, parent=None,
overwrite_url=None, page_title=None, path=None):
"""
Create a title.
@@ -252,30 +227,39 @@ def create_title(language, title, page, menu_title=None, slug=None,
assert isinstance(page, Page)
# validate language:
assert language in get_language_list(page.site_id)
assert language in get_language_list(page.node.site_id)
# set default slug:
if not slug:
slug = generate_valid_slug(title, parent, language)
base = page.get_path_for_slug(slugify(title), language)
slug = get_available_slug(page.node.site, base, language)
if overwrite_url:
path = overwrite_url.strip('/')
elif path is None:
path = page.get_path_for_slug(slug, language)
title = Title.objects.create(
language=language,
title=title,
menu_title=menu_title,
page_title=page_title,
slug=slug,
path=path,
redirect=redirect,
meta_description=meta_description,
page=page
page=page,
has_url_overwrite=bool(overwrite_url),
)
if overwrite_url:
title.has_url_overwrite = True
title.path = overwrite_url
title.save()
page_languages = page.get_languages()
if language not in page_languages:
page.update_languages(page_languages + [language])
return title
@transaction.atomic
def add_plugin(placeholder, plugin_type, language, position='last-child',
target=None, **data):
"""
@@ -424,7 +408,7 @@ def assign_user_to_page(page, user, grant_on=ACCESS_PAGE_AND_DESCENDANTS,
page_permission = GlobalPagePermission(
user=user, can_recover_page=can_recover_page, **data)
page_permission.save()
page_permission.sites.add(Site.objects.get_current())
page_permission.sites.add(get_current_site())
return page_permission
@@ -437,12 +421,7 @@ def publish_page(page, user, language):
"""
page = page.reload()
class FakeRequest(object):
def __init__(self, user):
self.user = user
request = FakeRequest(user)
if not page.has_publish_permission(request):
if not page.has_publish_permission(user):
raise PermissionDenied()
# Set the current_user to have the page's changed_by
# attribute set correctly.
@@ -457,10 +436,12 @@ def publish_pages(include_unpublished=False, language=None, site=None):
Create published public version of selected drafts.
"""
qs = Page.objects.drafts()
if not include_unpublished:
qs = qs.filter(title_set__published=True).distinct()
if site:
qs = qs.filter(site=site)
qs = qs.filter(node__site=site)
output_language = None
for i, page in enumerate(qs):
@@ -493,7 +474,7 @@ def get_page_draft(page):
if page.publisher_is_draft:
return page
else:
return page.publisher_draft
return page.publisher_public
else:
return None
@@ -524,9 +505,9 @@ def copy_plugins_to_language(page, source_language, target_language,
for placeholder in placeholders:
# only_empty is True we check if the placeholder already has plugins and
# we skip it if has some
if not only_empty or not placeholder.cmsplugin_set.filter(language=target_language).exists():
if not only_empty or not placeholder.get_plugins(language=target_language).exists():
plugins = list(
placeholder.cmsplugin_set.filter(language=source_language).order_by('path'))
placeholder.get_plugins(language=source_language).order_by('path'))
copied_plugins = copy_plugins.copy_plugins_to(plugins, placeholder, target_language)
copied += len(copied_plugins)
return copied
@@ -539,9 +520,13 @@ def can_change_page(request):
This will work across all permission-related setting, with a unified interface
to permission checking.
"""
# check global permissions if CMS_PERMISSION is active
global_permission = get_cms_setting('PERMISSION') and has_page_change_permission(request)
# check if user has page edit permission
page_permission = request.current_page and request.current_page.has_change_permission(request)
from cms.utils import page_permissions
return global_permission or page_permission
user = request.user
current_page = request.current_page
if current_page:
return page_permissions.user_can_change_page(user, current_page)
site = Site.objects.get_current(request)
return page_permissions.user_can_change_all_pages(user, site)
+63 -2
View File
@@ -1,11 +1,20 @@
# -*- coding: utf-8 -*-
class CMSApp(object):
#: list of urlconfs: example: ``_urls = ["myapp.urls"]``
_urls = []
#: list of menu classes: example: ``_menus = [MyAppMenu]``
_menus = []
#: name of the apphook (required)
name = None
urls = None
menus = []
#: name of the app, this enables Django namespaces support (optional)
app_name = None
#: configuration model (optional)
app_config = None
#: if set to true, apphook inherits permissions from the current page
permissions = True
#: list of application names to exclude from inheriting CMS permissions
exclude_permissions = []
def __new__(cls):
@@ -25,10 +34,62 @@ class CMSApp(object):
return super(CMSApp, cls).__new__(cls)
def get_configs(self):
"""
Returns all the apphook configuration instances.
"""
raise NotImplemented('Configurable AppHooks must implement this method')
def get_config(self, namespace):
"""
Returns the apphook configuration instance linked to the given namespace
"""
raise NotImplemented('Configurable AppHooks must implement this method')
def get_config_add_url(self):
"""
Returns the url to add a new apphook configuration instance
(usually the model admin add view)
"""
raise NotImplemented('Configurable AppHooks must implement this method')
def get_menus(self, page=None, language=None, **kwargs):
"""
Returns the menus for the apphook instance, eventually selected according
to the given arguments.
By default it returns the menus assigned to :py:attr:`CMSApp._menus`.
If no menus are returned, then the user will need to attach menus to pages
manually in the admin.
This method must return all the menus used by this apphook if no arguments are
provided. Example::
if page and page.reverse_id == 'page1':
return [Menu1]
elif page and page.reverse_id == 'page2':
return [Menu2]
else:
return [Menu1, Menu2]
:param page: page the apphook is attached to
:param language: current site language
:return: list of menu classes
"""
return self._menus
def get_urls(self, page=None, language=None, **kwargs):
"""
Returns the urlconfs for the apphook instance, eventually selected
according to the given arguments.
By default it returns the urls assigned to :py:attr:`CMSApp._urls`
This method **must** return a non empty list of urlconfs,
even if no argument is passed.
:param page: page the apphook is attached to
:param language: current site language
:return: list of urlconfs strings
"""
return self._urls
+9 -13
View File
@@ -2,11 +2,12 @@
import warnings
from django.core.exceptions import ImproperlyConfigured
from django.utils.module_loading import autodiscover_modules, import_string
from django.utils.translation import ugettext as _
from cms.app_base import CMSApp
from cms.exceptions import AppAlreadyRegistered
from cms.utils.conf import get_cms_setting
from cms.utils.django_load import load, iterload_objects
class ApphookPool(object):
@@ -27,11 +28,6 @@ class ApphookPool(object):
if app is None:
return lambda app: self.register(app, discovering_apps)
if app.__module__.split('.')[-1] == 'cms_app':
warnings.warn('cms_app.py filename is deprecated, '
'and it will be removed in version 3.4; '
'please rename it to cms_apps.py', DeprecationWarning)
if self.apphooks and not discovering_apps:
return app
@@ -56,16 +52,15 @@ class ApphookPool(object):
self.apphooks = get_cms_setting('APPHOOKS')
if self.apphooks:
for cls in iterload_objects(self.apphooks):
for path in self.apphooks:
cls = import_string(path)
try:
self.register(cls, discovering_apps=True)
except AppAlreadyRegistered:
pass
else:
# FIXME: Remove in 3.4
load('cms_app')
load('cms_apps')
autodiscover_modules('cms_apps')
self.discovered = True
@@ -78,7 +73,7 @@ class ApphookPool(object):
for app_name in self.apps:
app = self.apps[app_name]
if app.urls:
if app.get_urls():
hooks.append((app_name, app.name))
# Unfortunately, we lose the ordering since we now have a list of
@@ -97,10 +92,11 @@ class ApphookPool(object):
# deprecated: return apphooks registered in db with urlconf name
# instead of apphook class name
for app in self.apps.values():
if app_name in app.urls:
if app_name in app.get_urls():
return app
raise ImproperlyConfigured('No registered apphook %r found' % app_name)
warnings.warn(_('No registered apphook "%r" found') % app_name)
return None
apphook_pool = ApphookPool()
+71 -63
View File
@@ -1,32 +1,22 @@
# -*- coding: utf-8 -*-
from __future__ import with_statement
from django.db import OperationalError, ProgrammingError
from cms.utils.compat import DJANGO_1_8
try:
from collections import OrderedDict
except ImportError:
# Python < 2.7
from django.utils.datastructures import SortedDict as OrderedDict
try:
from importlib import import_module
except ImportError:
# Python < 2.7
from django.utils.importlib import import_module
from collections import OrderedDict
from importlib import import_module
from django.conf import settings
from django.contrib.sites.models import Site
from django.core.exceptions import ImproperlyConfigured
from django.core.urlresolvers import (RegexURLResolver, Resolver404, reverse,
RegexURLPattern)
from django.db import OperationalError, ProgrammingError
from django.utils import six
from django.utils.translation import get_language, override
from django.urls import Resolver404, reverse
from cms.apphook_pool import apphook_pool
from cms.models.pagemodel import Page
from cms.utils import get_current_site
from cms.utils.compat import DJANGO_1_11
from cms.utils.compat.dj import RegexPattern, URLPattern, URLResolver
from cms.utils.i18n import get_language_list
from cms.utils.moderator import use_draft
APP_RESOLVERS = []
@@ -50,6 +40,9 @@ def applications_page_check(request, current_page=None, path=None):
for lang in get_language_list():
if path.startswith(lang + "/"):
path = path[len(lang + "/"):]
use_public = not use_draft(request)
for resolver in APP_RESOLVERS:
try:
page_id = resolver.resolve_page_id(path)
@@ -58,14 +51,16 @@ def applications_page_check(request, current_page=None, path=None):
# If current page was matched, then we have some override for
# content from cms, but keep current page. Otherwise return page
# to which was application assigned.
return page
return page if use_public else page.publisher_public
except Resolver404:
# Raised if the page is not managed by an apphook
pass
except Page.DoesNotExist:
pass
return None
class AppRegexURLResolver(RegexURLResolver):
class AppRegexURLResolver(URLResolver):
def __init__(self, *args, **kwargs):
self.page_id = None
self.url_patterns_dict = {}
@@ -85,7 +80,8 @@ class AppRegexURLResolver(RegexURLResolver):
assigned.
"""
tried = []
match = self.regex.search(path)
pattern = getattr(self, 'pattern', self)
match = pattern.regex.search(path)
if match:
new_path = path[match.end():]
for pattern in self.url_patterns:
@@ -105,61 +101,63 @@ class AppRegexURLResolver(RegexURLResolver):
tried.extend([pattern])
else:
if sub_match:
return pattern.page_id
return getattr(pattern, 'page_id', None)
pattern = getattr(pattern, 'pattern', pattern)
tried.append(pattern.regex.pattern)
raise Resolver404({'tried': tried, 'path': new_path})
def recurse_patterns(path, pattern_list, page_id, default_args=None, nested=False):
def recurse_patterns(path, pattern_list, page_id, default_args=None,
nested=False):
"""
Recurse over a list of to-be-hooked patterns for a given path prefix
"""
newpatterns = []
for pattern in pattern_list:
app_pat = pattern.regex.pattern
app_pat = getattr(pattern, 'pattern', pattern).regex.pattern
# make sure we don't get patterns that start with more than one '^'!
app_pat = app_pat.lstrip('^')
path = path.lstrip('^')
regex = r'^%s%s' % (path, app_pat) if not nested else r'^%s' % (app_pat)
if isinstance(pattern, RegexURLResolver):
if isinstance(pattern, URLResolver):
# include default_args
args = pattern.default_kwargs
if default_args:
args.update(default_args)
if DJANGO_1_8:
# this is an 'include', recurse!
resolver = RegexURLResolver(regex, 'cms_appresolver',
pattern.default_kwargs, pattern.app_name, pattern.namespace)
# see lines 243 and 236 of urlresolvers.py to understand the next line
resolver._urlconf_module = recurse_patterns(regex, pattern.url_patterns, page_id, args, nested=True)
else:
# see lines 243 and 236 of urlresolvers.py to understand the next line
urlconf_module = recurse_patterns(regex, pattern.url_patterns, page_id, args, nested=True)
# this is an 'include', recurse!
resolver = RegexURLResolver(regex, urlconf_module,
pattern.default_kwargs, pattern.app_name, pattern.namespace)
resolver.page_id = page_id
# see lines 243 and 236 of urlresolvers.py to understand the next line
urlconf_module = recurse_patterns(regex, pattern.url_patterns, page_id, args, nested=True)
# this is an 'include', recurse!
regex_pattern = regex
if not DJANGO_1_11:
regex_pattern = RegexPattern(regex)
resolver = URLResolver(regex_pattern, urlconf_module,
pattern.default_kwargs, pattern.app_name,
pattern.namespace)
else:
# Re-do the RegexURLPattern with the new regular expression
# Re-do the URLPattern with the new regular expression
args = pattern.default_args
if default_args:
args.update(default_args)
resolver = RegexURLPattern(regex, pattern.callback,
args, pattern.name)
resolver.page_id = page_id
regex_pattern = regex
if not DJANGO_1_11:
regex_pattern = RegexPattern(regex, name=pattern.name)
resolver = URLPattern(regex_pattern, pattern.callback, args,
pattern.name)
resolver.page_id = page_id
newpatterns.append(resolver)
return newpatterns
def _set_permissions(patterns, exclude_permissions):
for pattern in patterns:
if isinstance(pattern, RegexURLResolver):
if isinstance(pattern, URLResolver):
if pattern.namespace in exclude_permissions:
continue
_set_permissions(pattern.url_patterns, exclude_permissions)
else:
from cms.utils.decorators import cms_perms
pattern._callback = cms_perms(pattern.callback)
pattern.callback = cms_perms(pattern.callback)
def get_app_urls(urls):
@@ -170,8 +168,10 @@ def get_app_urls(urls):
raise ImproperlyConfigured(
"URLConf `%s` has no urlpatterns attribute" % urlconf)
yield getattr(mod, 'urlpatterns')
else:
elif isinstance(urlconf, (list, tuple)):
yield urlconf
else:
yield [urlconf]
def get_patterns_for_title(path, title):
@@ -181,7 +181,7 @@ def get_patterns_for_title(path, title):
"""
app = apphook_pool.get_apphook(title.page.application_urls)
url_patterns = []
for pattern_list in get_app_urls(app.urls):
for pattern_list in get_app_urls(app.get_urls(title.page, title.language)):
if path and not path.endswith('/'):
path += '/'
page_id = title.page.id
@@ -191,7 +191,8 @@ def get_patterns_for_title(path, title):
def get_app_patterns():
try:
return _get_app_patterns()
site = get_current_site()
return _get_app_patterns(site)
except (OperationalError, ProgrammingError):
# ignore if DB is not ready
# Starting with Django 1.9 this code gets called even when creating
@@ -199,62 +200,69 @@ def get_app_patterns():
return []
def _get_app_patterns():
def _get_app_patterns(site):
"""
Get a list of patterns for all hooked apps.
How this works:
By looking through all titles with an app hook (application_urls) we find all
urlconf modules we have to hook into titles.
By looking through all titles with an app hook (application_urls) we find
all urlconf modules we have to hook into titles.
If we use the ML URL Middleware, we namespace those patterns with the title
language.
All 'normal' patterns from the urlconf get re-written by prefixing them with
the title path and then included into the cms url patterns.
If the app is still configured, but is no longer installed/available, then
this method returns a degenerate patterns object: patterns('')
"""
from cms.models import Title
try:
current_site = Site.objects.get_current()
except Site.DoesNotExist:
current_site = None
included = []
# we don't have a request here so get_page_queryset() can't be used,
# so use public() queryset.
# This can be done because url patterns are used just in frontend
title_qs = Title.objects.public().filter(page__site=current_site)
title_qs = Title.objects.public().filter(page__node__site=site)
hooked_applications = OrderedDict()
# Loop over all titles with an application hooked to them
titles = (title_qs.exclude(page__application_urls=None)
.exclude(page__application_urls='')
.order_by('-page__node__path').select_related())
# TODO: Need to be fixed for django-treebeard when forward ported to 3.1
for title in title_qs.exclude(page__application_urls=None).exclude(page__application_urls='').order_by('-page__path').select_related():
for title in titles:
path = title.path
mix_id = "%s:%s:%s" % (path + "/", title.page.application_urls, title.language)
mix_id = "%s:%s:%s" % (
path + "/", title.page.application_urls, title.language)
if mix_id in included:
# don't add the same thing twice
continue
if not settings.APPEND_SLASH:
path += '/'
app = apphook_pool.get_apphook(title.page.application_urls)
if not app:
continue
if title.page_id not in hooked_applications:
hooked_applications[title.page_id] = {}
app = apphook_pool.get_apphook(title.page.application_urls)
app_ns = app.app_name, title.page.application_namespace
with override(title.language):
hooked_applications[title.page_id][title.language] = (app_ns, get_patterns_for_title(path, title), app)
hooked_applications[title.page_id][title.language] = (
app_ns, get_patterns_for_title(path, title), app)
included.append(mix_id)
# Build the app patterns to be included in the cms urlconfs
app_patterns = []
for page_id in hooked_applications.keys():
resolver = None
for lang in hooked_applications[page_id].keys():
(app_ns, inst_ns), current_patterns, app = hooked_applications[page_id][lang]
(app_ns, inst_ns), current_patterns, app = hooked_applications[page_id][lang] # nopyflakes
if not resolver:
resolver = AppRegexURLResolver(r'', 'app_resolver', app_name=app_ns, namespace=inst_ns)
regex_pattern = RegexPattern(r'') if not DJANGO_1_11 else r''
resolver = AppRegexURLResolver(
regex_pattern, 'app_resolver', app_name=app_ns, namespace=inst_ns)
resolver.page_id = page_id
if app.permissions:
_set_permissions(current_patterns, app.exclude_permissions)
+2 -2
View File
@@ -1,12 +1,12 @@
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
from cms.utils.setup import setup
class CMSConfig(AppConfig):
name = 'cms'
verbose_name = _("django CMS")
def ready(self):
from cms.utils.setup import setup
setup()
+2 -2
View File
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
import re
from cms.utils import get_cms_setting
from cms.utils.conf import get_cms_setting
CMS_PAGE_CACHE_VERSION_KEY = get_cms_setting("CACHE_PREFIX") + 'CMS_PAGE_CACHE_VERSION'
CMS_PAGE_CACHE_VERSION_KEY = get_cms_setting("CACHE_PREFIX") + '_PAGE_CACHE_VERSION'
def _get_cache_version():
+1 -1
View File
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from django.conf import settings
from cms.utils import get_cms_setting
from cms.utils.conf import get_cms_setting
def _site_cache_key(lang):
+70 -38
View File
@@ -1,69 +1,101 @@
# -*- coding: utf-8 -*-
import hashlib
from datetime import timedelta
from django.conf import settings
from django.utils.cache import add_never_cache_headers
from django.utils.encoding import iri_to_uri, force_text
from django.utils.timezone import get_current_timezone_name
from django.utils.cache import add_never_cache_headers, patch_response_headers, patch_vary_headers
from django.utils.encoding import iri_to_uri
from django.utils.timezone import now
from cms.cache import _get_cache_version, _set_cache_version, _get_cache_key
from cms.utils import get_cms_setting
from cms.constants import EXPIRE_NOW, MAX_EXPIRATION_TTL
from cms.toolbar.utils import get_toolbar_from_request
from cms.utils.conf import get_cms_setting
from cms.utils.helpers import get_timezone_name
def _page_cache_key(request):
#md5 key of current path
#sha1 key of current path
cache_key = "%s:%d:%s" % (
get_cms_setting("CACHE_PREFIX"),
settings.SITE_ID,
hashlib.md5(iri_to_uri(request.get_full_path()).encode('utf-8')).hexdigest()
hashlib.sha1(iri_to_uri(request.get_full_path()).encode('utf-8')).hexdigest()
)
if settings.USE_TZ:
# The datetime module doesn't restrict the output of tzname().
# Windows is known to use non-standard, locale-dependant names.
# User-defined tzinfo classes may return absolutely anything.
# Hence this paranoid conversion to create a valid cache key.
tz_name = force_text(get_current_timezone_name(), errors='ignore')
cache_key += '.%s' % tz_name.encode('ascii', 'ignore').decode('ascii').replace(' ', '_')
cache_key += '.%s' % get_timezone_name()
return cache_key
def set_page_cache(response):
from django.core.cache import cache
if not get_cms_setting('PAGE_CACHE'):
return response
request = response._request
save_cache = True
for placeholder in getattr(request, 'placeholders', []):
if not placeholder.cache_placeholder:
save_cache = False
break
if hasattr(request, 'toolbar'):
if request.toolbar.edit_mode or request.toolbar.show_toolbar:
save_cache = False
if request.user.is_authenticated():
save_cache = False
if not save_cache:
toolbar = get_toolbar_from_request(request)
is_authenticated = request.user.is_authenticated
if is_authenticated or toolbar._cache_disabled or not get_cms_setting("PAGE_CACHE"):
add_never_cache_headers(response)
return response
else:
version = _get_cache_version()
ttl = get_cms_setting('CACHE_DURATIONS')['content']
cache.set(
_page_cache_key(request),
(response.content, response._headers),
ttl,
version=version
# This *must* be TZ-aware
timestamp = now()
placeholders = toolbar.content_renderer.get_rendered_placeholders()
# Checks if there's a plugin using the legacy "cache = False"
placeholder_ttl_list = []
vary_cache_on_set = set()
for ph in placeholders:
# get_cache_expiration() always returns:
# EXPIRE_NOW <= int <= MAX_EXPIRATION_IN_SECONDS
ttl = ph.get_cache_expiration(request, timestamp)
vary_cache_on = ph.get_vary_cache_on(request)
placeholder_ttl_list.append(ttl)
if ttl and vary_cache_on:
# We're only interested in vary headers if they come from
# a cache-able placeholder.
vary_cache_on_set |= set(vary_cache_on)
if EXPIRE_NOW not in placeholder_ttl_list:
if placeholder_ttl_list:
min_placeholder_ttl = min(x for x in placeholder_ttl_list)
else:
# Should only happen when there are no placeholders at all
min_placeholder_ttl = MAX_EXPIRATION_TTL
ttl = min(
get_cms_setting('CACHE_DURATIONS')['content'],
min_placeholder_ttl
)
# See note in invalidate_cms_page_cache()
_set_cache_version(version)
if ttl > 0:
# Adds expiration, etc. to headers
patch_response_headers(response, cache_timeout=ttl)
patch_vary_headers(response, sorted(vary_cache_on_set))
version = _get_cache_version()
# We also store the absolute expiration timestamp to avoid
# recomputing it on cache-reads.
expires_datetime = timestamp + timedelta(seconds=ttl)
cache.set(
_page_cache_key(request),
(
response.content,
response._headers,
expires_datetime,
),
ttl,
version=version
)
# See note in invalidate_cms_page_cache()
_set_cache_version(version)
return response
def get_page_cache(request):
from django.core.cache import cache
return cache.get(_page_cache_key(request),
version=_get_cache_version())
return cache.get(_page_cache_key(request), version=_get_cache_version())
def get_xframe_cache(page):
+5 -5
View File
@@ -1,14 +1,14 @@
# -*- coding: utf-8 -*-
from django.contrib.auth import get_user_model
from cms.utils import get_cms_setting
from cms.utils.conf import get_cms_setting
PERMISSION_KEYS = [
'can_change', 'can_add', 'can_delete',
'can_change_advanced_settings', 'can_publish',
'can_change_permissions', 'can_move_page',
'can_moderate', 'can_view']
'add_page', 'change_page', 'change_page_advanced_settings',
'change_page_permissions', 'delete_page', 'move_page',
'publish_page', 'view_page',
]
def get_cache_key(user, key):
+162 -47
View File
@@ -1,63 +1,178 @@
# -*- coding: utf-8 -*-
from django.conf import settings
from django.utils.encoding import force_text
from django.utils.timezone import get_current_timezone_name
from cms.cache import _get_cache_version, _set_cache_version, _clean_key, _get_cache_key
from cms.utils import get_cms_setting
"""
This module manages placeholder caching. We use a cache-versioning strategy
in which each (placeholder x lang x site_id) manages its own version. The
actual cache includes additional keys appropriate for the placeholders
get_vary_cache_on().
Invalidation of a placeholder's cache simply increments the version number for
the (placeholder x lang) pair, which renders any cache entries for that
placeholder under that version inaccessible. Those cache entries will simply
expire and will be purged according to the policy of the cache backend in-use.
The cache entries themselves may include additional sub-keys, according to the
list of VARY header-names as returned by placeholder.get_vary_cache_on() and
the current HTTPRequest object.
The vary-on header-names are also stored with the version. This enables us to
check for cache hits without re-computing placeholder.get_vary_cache_on().
"""
import hashlib
import time
from django.utils.timezone import now
from cms.utils.conf import get_cms_setting
from cms.utils.helpers import get_header_name, get_timezone_name
def _placeholder_cache_key(placeholder, lang):
cache_key = '%srender_placeholder:%s.%s' % (get_cms_setting("CACHE_PREFIX"), placeholder.pk, str(lang))
if settings.USE_TZ:
tz_name = force_text(get_current_timezone_name(), errors='ignore')
cache_key += '.%s' % tz_name.encode('ascii', 'ignore').decode('ascii').replace(' ', '_')
def _get_placeholder_cache_version_key(placeholder, lang, site_id):
"""
Returns the version key for the given «placeholder», «lang» and «site_id».
Invalidating this (via clear_placeholder_cache by replacing the stored
value with a new value) will effectively make all "sub-caches" relating to
this (placeholder x lang) inaccessible. Sub-caches include caches per TZ
and per VARY header.
"""
prefix = get_cms_setting('CACHE_PREFIX')
key = '{prefix}|placeholder_cache_version|id:{id}|lang:{lang}|site:{site}'.format(
prefix=prefix,
id=placeholder.pk,
lang=str(lang),
site=site_id,
)
if len(key) > 250:
key = '{prefix}|{hash}'.format(
prefix=prefix,
hash=hashlib.sha1(key.encode('utf-8')).hexdigest(),
)
return key
def _get_placeholder_cache_version(placeholder, lang, site_id):
"""
Gets the (placeholder x lang)'s current version and vary-on header-names
list, if present, otherwise resets to («timestamp», []).
"""
from django.core.cache import cache
key = _get_placeholder_cache_version_key(placeholder, lang, site_id)
cached = cache.get(key)
if cached:
version, vary_on_list = cached
else:
version = int(time.time() * 1000000)
vary_on_list = []
_set_placeholder_cache_version(placeholder, lang, site_id, version, vary_on_list)
return version, vary_on_list
def _set_placeholder_cache_version(placeholder, lang, site_id, version, vary_on_list=None, duration=None):
"""
Sets the (placeholder x lang)'s version and vary-on header-names list.
"""
from django.core.cache import cache
key = _get_placeholder_cache_version_key(placeholder, lang, site_id)
if not version or version < 1:
version = int(time.time() * 1000000)
if vary_on_list is None:
vary_on_list = []
cache.set(key, (version, vary_on_list), duration)
def _get_placeholder_cache_key(placeholder, lang, site_id, request, soft=False):
"""
Returns the fully-addressed cache key for the given placeholder and
the request.
The kwarg «soft» should be set to True if getting the cache key to then
read from the cache. If instead the key retrieval is to support a cache
write, let «soft» be False.
"""
prefix = get_cms_setting('CACHE_PREFIX')
version, vary_on_list = _get_placeholder_cache_version(placeholder, lang, site_id)
main_key = '{prefix}|render_placeholder|id:{id}|lang:{lang}|site:{site}|tz:{tz}|v:{version}'.format(
prefix=prefix,
id=placeholder.pk,
lang=lang,
site=site_id,
tz=get_timezone_name(),
version=version,
)
if not soft:
# We are about to write to the cache, so we want to get the latest
# vary_cache_on headers and the correct cache expiration, ignoring any
# we already have. If the placeholder has already been rendered, this
# will be very efficient (zero-additional queries) due to the caching
# of all its plugins during the rendering process anyway.
vary_on_list = placeholder.get_vary_cache_on(request)
duration = placeholder.get_cache_expiration(request, now())
# Update the main placeholder cache version
_set_placeholder_cache_version(
placeholder, lang, site_id, version, vary_on_list, duration)
sub_key_list = []
for key in vary_on_list:
value = request.META.get(get_header_name(key)) or '_'
sub_key_list.append(key + ':' + value)
cache_key = main_key
if sub_key_list:
cache_key += '|' + '|'.join(sub_key_list)
if len(cache_key) > 250:
cache_key = '{prefix}|{hash}'.format(
prefix=prefix,
hash=hashlib.sha1(cache_key.encode('utf-8')).hexdigest(),
)
return cache_key
def set_placeholder_cache(placeholder, lang, content):
def set_placeholder_cache(placeholder, lang, site_id, content, request):
"""
Caches the rendering of a placeholder
"""
from django.core.cache import cache
cache.set(_placeholder_cache_key(placeholder, lang),
content,
get_cms_setting('CACHE_DURATIONS')['content'],
version=_get_cache_version())
_set_cache_version(_get_cache_version())
def get_placeholder_cache(placeholder, lang):
"""
Retrieves the cached content of a placeholder
Sets the (correct) placeholder cache with the rendered placeholder.
"""
from django.core.cache import cache
return cache.get(_placeholder_cache_key(placeholder, lang),
version=_get_cache_version())
key = _get_placeholder_cache_key(placeholder, lang, site_id, request)
duration = min(
get_cms_setting('CACHE_DURATIONS')['content'],
placeholder.get_cache_expiration(request, now())
)
cache.set(key, content, duration)
# "touch" the cache-version, so that it stays as fresh as this content.
version, vary_on_list = _get_placeholder_cache_version(placeholder, lang, site_id)
_set_placeholder_cache_version(
placeholder, lang, site_id, version, vary_on_list, duration=duration)
def clear_placeholder_cache(placeholder, lang):
def get_placeholder_cache(placeholder, lang, site_id, request):
"""
Returns the placeholder from cache respecting the placeholder's
VARY headers.
"""
from django.core.cache import cache
cache.delete(_placeholder_cache_key(placeholder, lang), version=_get_cache_version())
key = _get_placeholder_cache_key(placeholder, lang, site_id, request, soft=True)
content = cache.get(key)
return content
def _placeholder_page_cache_key(page_lookup, lang, site_id, placeholder_name):
base_key = _get_cache_key('_show_placeholder_for_page', page_lookup, lang, site_id)
return _clean_key('%s_placeholder:%s' % (base_key, placeholder_name))
def get_placeholder_page_cache(page_lookup, lang, site_id, placeholder_name):
from django.core.cache import cache
return cache.get(_placeholder_page_cache_key(page_lookup, lang, site_id, placeholder_name),
version=_get_cache_version())
def set_placeholder_page_cache(page_lookup, lang, site_id, placeholder_name, content):
from django.core.cache import cache
cache.set(_placeholder_page_cache_key(page_lookup, lang, site_id, placeholder_name),
content,
get_cms_setting('CACHE_DURATIONS')['content'], version=_get_cache_version())
_set_cache_version(_get_cache_version())
def clear_placeholder_cache(placeholder, lang, site_id):
"""
Invalidates all existing cache entries for (placeholder x lang x site_id).
We don't need to re-store the vary_on_list, because the cache is now
effectively empty.
"""
version = int(time.time() * 1000000)
_set_placeholder_cache_version(placeholder, lang, site_id, version, [])
+224 -160
View File
@@ -1,110 +1,93 @@
# -*- coding: utf-8 -*-
from django.utils.translation import get_language
from django.db.models.query import Prefetch, prefetch_related_objects
from django.urls import reverse
from django.utils.functional import SimpleLazyObject
from django.utils.translation import override as force_language
from cms import constants
from cms.api import get_page_draft
from cms.apphook_pool import apphook_pool
from cms.utils.permissions import load_view_restrictions, has_global_page_permission
from cms.utils import get_language_from_request
from cms.models import EmptyTitle
from cms.utils.conf import get_cms_setting
from cms.utils.helpers import current_site
from cms.utils.i18n import get_fallback_languages, hide_untranslated
from cms.utils.page_resolver import get_page_queryset
from cms.utils.moderator import get_title_queryset, use_draft
from cms.utils.i18n import (
get_fallback_languages,
get_public_languages,
hide_untranslated,
is_valid_site_language,
)
from cms.utils.permissions import get_view_restrictions
from cms.utils.page import get_page_queryset
from cms.utils.page_permissions import user_can_view_all_pages
from menus.base import Menu, NavigationNode, Modifier
from menus.menu_pool import menu_pool
def get_visible_page_objects(request, pages, site=None):
def get_visible_nodes(request, pages, site):
"""
This code is basically a many-pages-at-once version of
Page.has_view_permission.
cms.utils.page_permissions.user_can_view_page
pages contains all published pages
check if there is ANY restriction
that needs a permission page visibility calculation
"""
user = request.user
_get_page_draft = get_page_draft
public_for = get_cms_setting('PUBLIC_FOR')
can_see_unrestricted = public_for == 'all' or (
public_for == 'staff' and request.user.is_staff)
is_auth_user = request.user.is_authenticated()
can_see_unrestricted = public_for == 'all' or (public_for == 'staff' and user.is_staff)
if not user.is_authenticated and not can_see_unrestricted:
# User is not authenticated and can't see unrestricted pages,
# no need to check for page restrictions because if there's some,
# user is anon and if there is not any, user can't see unrestricted.
return []
if user_can_view_all_pages(user, site):
return list(pages)
# Permissions are only attached to draft pages
draft_pages = [_get_page_draft(page) for page in pages]
restricted_pages = get_view_restrictions(draft_pages)
restricted_pages = load_view_restrictions(request, pages)
if not restricted_pages:
if can_see_unrestricted:
return pages
elif not is_auth_user:
return [] # Unauth user can't acquire global or user perm to see pages
# If there's no restrictions, let the user see all pages
# only if he can see unrestricted, otherwise return no pages.
return list(pages) if can_see_unrestricted else []
if get_cms_setting('PERMISSION') and not site:
site = current_site(request) # avoid one extra query when possible
if has_global_page_permission(request, site, can_view=True):
return pages
user_id = user.pk
user_groups = SimpleLazyObject(lambda: frozenset(user.groups.values_list('pk', flat=True)))
is_auth_user = user.is_authenticated
def has_global_perm():
if has_global_perm.cache < 0:
if request.user.has_perm('cms.view_page'):
has_global_perm.cache = 1
else:
has_global_perm.cache = 0
return bool(has_global_perm.cache)
has_global_perm.cache = -1
def user_can_see_page(page):
page_id = page.pk if page.publisher_is_draft else page.publisher_public_id
page_permissions = restricted_pages.get(page_id, [])
def has_permission_membership(page_id):
"""
PagePermission user group membership tests
"""
user_pk = request.user.pk
for perm in restricted_pages[page_id]:
if perm.user_id == user_pk:
return True
if not perm.group_id:
continue
if has_permission_membership.user_groups is None:
has_permission_membership.user_groups = request.user.groups.all().values_list(
'pk', flat=True)
if perm.group_id in has_permission_membership.user_groups:
if not page_permissions:
# Page has no view restrictions, fallback to the project's
# CMS_PUBLIC_FOR setting.
return can_see_unrestricted
if not is_auth_user:
return False
for perm in page_permissions:
if perm.user_id == user_id or perm.group_id in user_groups:
return True
return False
has_permission_membership.user_groups = None
visible_pages = []
for page in pages:
to_add = False
page_id = page.pk
is_restricted = page_id in restricted_pages
# restricted_pages contains as key any page.pk that is
# affected by a permission grant_on
if not is_restricted and can_see_unrestricted:
to_add = True
elif is_auth_user:
# setting based handling of unrestricted pages
# check group and user memberships to restricted pages
if is_restricted and has_permission_membership(page_id):
to_add = True
elif has_global_perm():
to_add = True
if to_add:
visible_pages.append(page)
return visible_pages
return [page for page in pages if user_can_see_page(page)]
def get_visible_pages(request, pages, site=None):
"""Returns the IDs of all visible pages"""
pages = get_visible_page_objects(request, pages, site)
return [page.pk for page in pages]
def page_to_node(page, home, cut):
def get_menu_node_for_page(renderer, page, language, fallbacks=None):
"""
Transform a CMS page into a navigation node.
:param renderer: MenuRenderer instance bound to the request
:param page: the page you wish to transform
:param home: a reference to the "home" page (the page with path="0001")
:param cut: Should we cut page from its parent pages? This means the node will not
have a parent anymore.
:param language: The current language used to render the menu
"""
if fallbacks is None:
fallbacks = []
# Theses are simple to port over, since they are not calculated.
# Other attributes will be added conditionnally later.
# Other attributes will be added conditionally later.
attr = {
'is_page': True,
'soft_root': page.soft_root,
@@ -112,15 +95,6 @@ def page_to_node(page, home, cut):
'reverse_id': page.reverse_id,
}
parent_id = page.parent_id
# Should we cut the Node from its parents?
if home and page.parent_id == home.pk and cut:
parent_id = None
# possible fix for a possible problem
# if parent_id and not page.parent.get_calculated_status():
# parent_id = None # ????
if page.limit_visibility_in_menu is constants.VISIBILITY_ALL:
attr['visible_for_authenticated'] = True
attr['visible_for_anonymous'] = True
@@ -131,20 +105,20 @@ def page_to_node(page, home, cut):
# Extenders can be either navigation extenders or from apphooks.
extenders = []
if page.navigation_extenders:
if page.navigation_extenders in menu_pool.menus:
if page.navigation_extenders in renderer.menus:
extenders.append(page.navigation_extenders)
elif "{0}:{1}".format(page.navigation_extenders, page.pk) in menu_pool.menus:
elif "{0}:{1}".format(page.navigation_extenders, page.pk) in renderer.menus:
extenders.append("{0}:{1}".format(page.navigation_extenders, page.pk))
# Is this page an apphook? If so, we need to handle the apphooks's nodes
lang = get_language()
# Only run this if we have a translation in the requested language for this
# object. The title cache should have been prepopulated in CMSMenu.get_nodes
# but otherwise, just request the title normally
if not hasattr(page, 'title_cache') or lang in page.title_cache:
app_name = page.get_application_urls(fallback=False)
if app_name: # it means it is an apphook
app = apphook_pool.get_apphook(app_name)
extenders += app.menus
if page.title_cache.get(language) and page.application_urls:
# it means it is an apphook
app = apphook_pool.get_apphook(page.application_urls)
if app:
extenders += app.get_menus(page, language)
exts = []
for ext in extenders:
if hasattr(ext, "get_instances"):
@@ -158,88 +132,177 @@ def page_to_node(page, home, cut):
if exts:
attr['navigation_extenders'] = exts
# Do we have a redirectURL?
attr['redirect_url'] = page.get_redirect() # save redirect URL if any
for lang in [language] + fallbacks:
translation = page.title_cache[lang]
# Now finally, build the NavigationNode object and return it.
ret_node = NavigationNode(
page.get_menu_title(),
page.get_absolute_url(),
page.pk,
parent_id,
attr=attr,
visible=page.in_navigation,
)
return ret_node
if translation:
# Do we have a redirectURL?
attr['redirect_url'] = translation.redirect # save redirect URL if any
# Now finally, build the NavigationNode object and return it.
# The parent_id is manually set by the menu get_nodes method.
ret_node = CMSNavigationNode(
title=translation.menu_title or translation.title,
url='',
id=page.pk,
attr=attr,
visible=page.in_navigation,
path=translation.path or translation.slug,
language=(translation.language if translation.language != language else None),
)
return ret_node
else:
raise RuntimeError('Unable to render cms menu. There is a language misconfiguration.')
class CMSNavigationNode(NavigationNode):
def __init__(self, *args, **kwargs):
self.path = kwargs.pop('path')
# language is only used when we're dealing with a fallback
self.language = kwargs.pop('language', None)
super(CMSNavigationNode, self).__init__(*args, **kwargs)
def is_selected(self, request):
try:
page_id = request.current_page.pk
except AttributeError:
return False
return page_id == self.id
def _get_absolute_url(self):
if self.attr['is_home']:
return reverse('pages-root')
return reverse('pages-details-by-slug', kwargs={"slug": self.path})
def get_absolute_url(self):
if self.language:
with force_language(self.language):
return self._get_absolute_url()
return self._get_absolute_url()
class CMSMenu(Menu):
def get_nodes(self, request):
page_queryset = get_page_queryset(request)
site = current_site(request)
lang = get_language_from_request(request)
from cms.models import Title
filters = {
'site': site,
}
if hide_untranslated(lang, site.pk):
filters['title_set__language'] = lang
if not use_draft(request):
filters['title_set__published'] = True
site = self.renderer.site
lang = self.renderer.request_language
pages = get_page_queryset(
site,
draft=self.renderer.draft_mode_active,
published=not self.renderer.draft_mode_active,
)
if not use_draft(request):
page_queryset = page_queryset.published()
pages = page_queryset.filter(**filters).order_by("path")
ids = {}
nodes = []
first = True
home_cut = False
home_children = []
home = None
actual_pages = []
if is_valid_site_language(lang, site_id=site.pk):
_valid_language = True
_hide_untranslated = hide_untranslated(lang, site.pk)
else:
_valid_language = False
_hide_untranslated = False
if _valid_language:
# The request language has been explicitly configured
# for the current site.
if _hide_untranslated:
fallbacks = []
else:
fallbacks = get_fallback_languages(lang, site_id=site.pk)
languages = [lang] + [_lang for _lang in fallbacks if _lang != lang]
else:
# The request language is not configured for the current site.
# Fallback to all configured public languages for the current site.
languages = get_public_languages(site.pk)
fallbacks = languages
pages = (
pages
.filter(title_set__language__in=languages)
.select_related('node')
.order_by('node__path')
.distinct()
)
if not self.renderer.draft_mode_active:
# we're dealing with public pages.
# prefetch the draft versions.
pages = pages.select_related('publisher_public__node')
pages = get_visible_nodes(request, pages, site)
if not pages:
return []
try:
homepage = [page for page in pages if page.is_home][0]
except IndexError:
homepage = None
titles = Title.objects.filter(
language__in=languages,
publisher_is_draft=self.renderer.draft_mode_active,
)
lookup = Prefetch(
'title_set',
to_attr='filtered_translations',
queryset=titles,
)
prefetch_related_objects(pages, lookup)
# Build the blank title instances only once
blank_title_cache = {language: EmptyTitle(language=language) for language in languages}
if lang not in blank_title_cache:
blank_title_cache[lang] = EmptyTitle(language=lang)
# Maps a node id to its page id
node_id_to_page = {}
def _page_to_node(page):
# EmptyTitle is used to prevent the cms from trying
# to find a translation in the database
page.title_cache = blank_title_cache.copy()
for trans in page.filtered_translations:
page.title_cache[trans.language] = trans
menu_node = get_menu_node_for_page(
self.renderer,
page,
language=lang,
fallbacks=fallbacks,
)
return menu_node
menu_nodes = []
# cache view perms
visible_pages = get_visible_pages(request, pages, site)
for page in pages:
# Pages are ordered by path, therefore the first page is the root
# of the page tree (a.k.a "home")
if page.pk not in visible_pages:
# Don't include pages the user doesn't have access to
node = page.node
parent_id = node_id_to_page.get(node.parent_id)
if node.parent_id and not parent_id:
# If the parent page is not available (unpublished, etc..)
# don't bother creating menu nodes for its descendants.
continue
if not home:
home = page
if first and page.pk != home.pk:
home_cut = True
if (home_cut and (page.parent_id == home.pk or
page.parent_id in home_children)):
home_children.append(page.pk)
if ((page.pk == home.pk and home.in_navigation)
or page.pk != home.pk):
first = False
ids[page.id] = page
actual_pages.append(page)
page.title_cache = {}
langs = [lang]
if not hide_untranslated(lang):
langs.extend(get_fallback_languages(lang))
menu_node = _page_to_node(page)
cut_homepage = homepage and not homepage.in_navigation
titles = list(get_title_queryset(request).filter(
page__in=ids, language__in=langs))
for title in titles: # add the title and slugs and some meta data
page = ids[title.page_id]
page.title_cache[title.language] = title
for page in actual_pages:
if page.title_cache:
nodes.append(page_to_node(page, home, home_cut))
return nodes
if cut_homepage and parent_id == homepage.pk:
# When the homepage is hidden from navigation,
# we need to cut all its direct children from it.
menu_node.parent_id = None
else:
menu_node.parent_id = parent_id
node_id_to_page[node.pk] = page.pk
menu_nodes.append(menu_node)
return menu_nodes
menu_pool.register_menu(CMSMenu)
class NavExtender(Modifier):
def modify(self, request, nodes, namespace, root_id, post_cut, breadcrumb):
if post_cut:
return nodes
@@ -268,8 +331,9 @@ class NavExtender(Modifier):
extnode.parent = node
node.children.append(extnode)
removed = []
# find all not assigned nodes
for menu in menu_pool.menus.items():
for menu in self.renderer.menus.items():
if (hasattr(menu[1], 'cms_enabled')
and menu[1].cms_enabled and not menu[0] in exts):
for node in nodes:
+48 -22
View File
@@ -4,18 +4,16 @@ from cms.models.aliaspluginmodel import AliasPluginModel
from cms.models.placeholderpluginmodel import PlaceholderReference
from cms.plugin_base import CMSPluginBase, PluginMenuItem
from cms.plugin_pool import plugin_pool
from cms.plugin_rendering import render_placeholder
from cms.utils.urlutils import admin_reverse
from django.conf.urls import url
from django.http import HttpResponseForbidden, HttpResponseBadRequest, HttpResponse
from django.middleware.csrf import get_token
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _, get_language
from django.utils.translation import ugettext, ugettext_lazy as _, get_language
class PlaceholderPlugin(CMSPluginBase):
name = _("Placeholder")
parent_classes = [0] # so you will not be able to add it something
parent_classes = ['0'] # so you will not be able to add it something
#require_parent = True
render_plugin = False
admin_preview = False
@@ -34,23 +32,13 @@ class AliasPlugin(CMSPluginBase):
render_template = "cms/plugins/alias.html"
system = True
def render(self, context, instance, placeholder):
from cms.utils.plugins import downcast_plugins, build_plugin_tree
context['instance'] = instance
context['placeholder'] = placeholder
if instance.plugin_id:
plugins = instance.plugin.get_descendants().order_by('placeholder', 'path')
plugins = [instance.plugin] + list(plugins)
plugins = downcast_plugins(plugins)
plugins[0].parent_id = None
plugins = build_plugin_tree(plugins)
context['plugins'] = plugins
if instance.alias_placeholder_id:
content = render_placeholder(instance.alias_placeholder, context)
context['content'] = mark_safe(content)
return context
@classmethod
def get_render_queryset(cls):
queryset = super(AliasPlugin, cls).get_render_queryset()
return queryset.select_related('plugin', 'alias_placeholder')
def get_extra_global_plugin_menu_items(self, request, plugin):
@classmethod
def get_extra_plugin_menu_items(cls, request, plugin):
return [
PluginMenuItem(
_("Create Alias"),
@@ -59,7 +47,8 @@ class AliasPlugin(CMSPluginBase):
)
]
def get_extra_placeholder_menu_items(self, request, placeholder):
@classmethod
def get_extra_placeholder_menu_items(cls, request, placeholder):
return [
PluginMenuItem(
_("Create Alias"),
@@ -73,6 +62,43 @@ class AliasPlugin(CMSPluginBase):
url(r'^create_alias/$', self.create_alias, name='cms_create_alias'),
]
@classmethod
def get_empty_change_form_text(cls, obj=None):
original = super(AliasPlugin, cls).get_empty_change_form_text(obj=obj)
if not obj:
return original
instance = obj.get_plugin_instance()[0]
if not instance:
# Ghost plugin
return original
aliased_placeholder_id = instance.get_aliased_placeholder_id()
if not aliased_placeholder_id:
# Corrupt (sadly) Alias plugin
return original
aliased_placeholder = Placeholder.objects.get(pk=aliased_placeholder_id)
origin_page = aliased_placeholder.page
if not origin_page:
# Placeholder is not attached to a page
return original
# I have a feeling this could fail with a NoReverseMatch error
# if this is the case, then it's likely a corruption.
page_url = origin_page.get_absolute_url(language=obj.language)
page_title = origin_page.get_title(language=obj.language)
message = ugettext('This is an alias reference, '
'you can edit the content only on the '
'<a href="%(page_url)s?edit" target="_parent">%(page_title)s</a> page.')
return message % {'page_url': page_url, 'page_title': page_title}
def create_alias(self, request):
if not request.user.is_staff:
return HttpResponseForbidden("not enough privileges")
@@ -92,7 +118,7 @@ class AliasPlugin(CMSPluginBase):
placeholder = Placeholder.objects.get(pk=pk)
except Placeholder.DoesNotExist:
return HttpResponseBadRequest("placeholder with id %s not found." % pk)
if not placeholder.has_change_permission(request):
if not placeholder.has_change_permission(request.user):
return HttpResponseBadRequest("You do not have enough permission to alias this placeholder.")
clipboard = request.toolbar.clipboard
clipboard.cmsplugin_set.all().delete()
+421 -267
View File
@@ -1,29 +1,29 @@
# -*- coding: utf-8 -*-
from classytags.utils import flatten_context
from django.conf import settings
from django.contrib import admin
from django.contrib.auth import get_permission_codename, get_user_model
from django.contrib.auth.models import AnonymousUser
from django.contrib.sites.models import Site
from django.core.urlresolvers import reverse, NoReverseMatch, resolve, Resolver404
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
from django.db.models import Q
from django.urls import NoReverseMatch, Resolver404, resolve, reverse
from django.utils.translation import override as force_language, ugettext_lazy as _
from cms.api import get_page_draft, can_change_page
from cms.constants import TEMPLATE_INHERITANCE_MAGIC, PUBLISHER_STATE_PENDING
from cms.models import CMSPlugin, Title, Page
from cms.toolbar.items import TemplateItem, REFRESH_PAGE
from cms.models import Placeholder, Title, Page, PageType, StaticPlaceholder
from cms.toolbar.items import ButtonList, TemplateItem, REFRESH_PAGE
from cms.toolbar_base import CMSToolbar
from cms.toolbar_pool import toolbar_pool
from cms.utils.i18n import get_language_tuple, force_language, get_language_dict
from cms.utils.compat.dj import is_installed
from cms.utils import get_cms_setting
from cms.utils.permissions import (
get_user_sites_queryset,
has_auth_page_permission,
from cms.utils import get_language_from_request, page_permissions
from cms.utils.conf import get_cms_setting
from cms.utils.i18n import get_language_tuple, get_language_dict
from cms.utils.page_permissions import (
user_can_change_page,
user_can_delete_page,
user_can_publish_page,
)
from cms.utils.urlutils import add_url_parameters, admin_reverse
from menus.utils import DefaultLanguageChanger
@@ -38,7 +38,6 @@ PAGE_MENU_SECOND_BREAK = 'Page Menu Second Break'
PAGE_MENU_THIRD_BREAK = 'Page Menu Third Break'
PAGE_MENU_FOURTH_BREAK = 'Page Menu Fourth Break'
PAGE_MENU_LAST_BREAK = 'Page Menu Last Break'
HISTORY_MENU_IDENTIFIER = 'history'
HISTORY_MENU_BREAK = 'History Menu Break'
MANAGE_PAGES_BREAK = 'Manage Pages Break'
ADMIN_SITES_BREAK = 'Admin Sites Break'
@@ -49,6 +48,7 @@ ADD_PAGE_LANGUAGE_BREAK = "Add page language Break"
REMOVE_PAGE_LANGUAGE_BREAK = "Remove page language Break"
COPY_PAGE_LANGUAGE_BREAK = "Copy page language Break"
TOOLBAR_DISABLE_BREAK = 'Toolbar disable Break'
SHORTCUTS_BREAK = 'Shortcuts Break'
@toolbar_pool.register
@@ -57,66 +57,36 @@ class PlaceholderToolbar(CMSToolbar):
Adds placeholder edit buttons if placeholders or static placeholders are detected in the template
"""
def init_from_request(self):
def populate(self):
self.page = get_page_draft(self.request.current_page)
def init_placeholders_from_request(self):
self.placeholders = getattr(self.request, 'placeholders', [])
self.statics = getattr(self.request, 'static_placeholders', [])
def populate(self):
self.init_from_request()
def post_template_populate(self):
self.init_placeholders_from_request()
super(PlaceholderToolbar, self).post_template_populate()
self.add_wizard_button()
self.add_structure_mode()
def add_structure_mode(self):
if self.page and not self.page.application_urls:
if self.page.has_change_permission(self.request):
return self.add_structure_mode_item()
elif self.placeholders:
return self.add_structure_mode_item()
for sp in self.statics:
if sp.has_change_permission(self.request):
return self.add_structure_mode_item()
def add_structure_mode_item(self, extra_classes=('cms-toolbar-item-cms-mode-switcher',)):
build_mode = self.toolbar.build_mode
build_url = '?%s' % get_cms_setting('CMS_TOOLBAR_URL__BUILD')
edit_url = '?%s' % get_cms_setting('CMS_TOOLBAR_URL__EDIT_ON')
if self.request.user.has_perm("cms.use_structure"):
switcher = self.toolbar.add_button_list('Mode Switcher', side=self.toolbar.RIGHT,
extra_classes=extra_classes)
switcher.add_button(_('Structure'), build_url, active=build_mode, disabled=False)
switcher.add_button(_('Content'), edit_url, active=not build_mode, disabled=False)
def add_wizard_button(self):
from cms.wizards.wizard_pool import entry_choices
title = _("Create")
try:
page_pk = self.page.pk
except AttributeError:
if self.page:
user = self.request.user
page_pk = self.page.pk
disabled = len(list(entry_choices(user, self.page))) == 0
else:
page_pk = ''
disabled = True
user = getattr(self.request, "user", None)
disabled = user and hasattr(self, "page") and len(
list(entry_choices(user, self.page))) == 0
url = '{url}?page={page}&edit'.format(
url = '{url}?page={page}&language={lang}&edit'.format(
url=reverse("cms_wizard_create"),
page=page_pk
page=page_pk,
lang=self.toolbar.site_language,
)
self.toolbar.add_modal_button(title, url,
side=self.toolbar.RIGHT,
disabled=disabled,
on_close=REFRESH_PAGE)
@toolbar_pool.register
class BasicToolbar(CMSToolbar):
"""
@@ -132,9 +102,7 @@ class BasicToolbar(CMSToolbar):
def populate(self):
if not self.page:
self.init_from_request()
user_settings = self.request.toolbar.get_user_settings()
self.clipboard = user_settings.clipboard
self.clipboard = self.request.toolbar.user_settings.clipboard
self.add_admin_menu()
self.add_language_menu()
@@ -145,10 +113,7 @@ class BasicToolbar(CMSToolbar):
self.add_users_button(self._admin_menu)
# sites menu
if get_cms_setting('PERMISSION'):
sites_queryset = get_user_sites_queryset(self.request.user)
else:
sites_queryset = Site.objects.all()
sites_queryset = Site.objects.order_by('name')
if len(sites_queryset) > 1:
sites_menu = self._admin_menu.get_or_create_menu('sites', _('Sites'))
@@ -167,9 +132,9 @@ class BasicToolbar(CMSToolbar):
self._admin_menu.add_break(USER_SETTINGS_BREAK)
# clipboard
if self.toolbar.edit_mode or self.toolbar.build_mode:
if self.toolbar.edit_mode_active:
# True if the clipboard exists and there's plugins in it.
clipboard_is_bound = self.get_clipboard_plugins().exists()
clipboard_is_bound = self.toolbar.clipboard_plugin
self._admin_menu.add_link_item(_('Clipboard...'), url='#',
extra_classes=['cms-clipboard-trigger'],
@@ -182,6 +147,9 @@ class BasicToolbar(CMSToolbar):
# Disable toolbar
self._admin_menu.add_link_item(_('Disable toolbar'), url='?%s' % get_cms_setting('CMS_TOOLBAR_URL__DISABLE'))
self._admin_menu.add_break(TOOLBAR_DISABLE_BREAK)
self._admin_menu.add_link_item(_('Shortcuts...'), url='#',
extra_classes=('cms-show-shortcuts',))
self._admin_menu.add_break(SHORTCUTS_BREAK)
# logout
self.add_logout_button(self._admin_menu)
@@ -202,12 +170,18 @@ class BasicToolbar(CMSToolbar):
# * unpublished page: redirect to the home page
# * published page with login_required: redirect to the home page
# * published page with view permissions: redirect to the home page
page_is_published = self.page and self.page.is_published(self.current_lang)
if (self.page and self.page.is_published(self.current_lang) and not self.page.login_required and
self.page.has_view_permission(self.request, AnonymousUser())):
on_success = self.toolbar.REFRESH_PAGE
if page_is_published and not self.page.login_required:
anon_can_access = page_permissions.user_can_view_page(
user=AnonymousUser(),
page=self.page,
site=self.current_site,
)
else:
on_success = '/'
anon_can_access = False
on_success = self.toolbar.REFRESH_PAGE if anon_can_access else '/'
# We'll show "Logout Joe Bloggs" if the name fields in auth.User are completed, else "Logout jbloggs". If
# anything goes wrong, it'll just be "Logout".
@@ -215,11 +189,17 @@ class BasicToolbar(CMSToolbar):
user_name = self.get_username()
logout_menu_text = _('Logout %s') % user_name if user_name else _('Logout')
parent.add_ajax_item(logout_menu_text, action=admin_reverse('logout'), active=True, on_success=on_success)
parent.add_ajax_item(
logout_menu_text,
action=admin_reverse('logout'),
active=True,
on_success=on_success,
method='GET',
)
def add_language_menu(self):
if settings.USE_I18N and not self._language_menu:
self._language_menu = self.toolbar.get_or_create_menu(LANGUAGE_MENU_IDENTIFIER, _('Language'))
self._language_menu = self.toolbar.get_or_create_menu(LANGUAGE_MENU_IDENTIFIER, _('Language'), position=-1)
language_changer = getattr(self.request, '_language_changer', DefaultLanguageChanger(self.request))
for code, name in get_language_tuple(self.current_site.pk):
try:
@@ -239,37 +219,61 @@ class BasicToolbar(CMSToolbar):
except (AttributeError, NotImplementedError):
return default
def get_clipboard_plugins(self):
self.populate()
if not hasattr(self, "clipboard"):
return CMSPlugin.objects.none()
return self.clipboard.get_plugins()
def render_addons(self, context):
context.push()
context['local_toolbar'] = self
clipboard = mark_safe(render_to_string('cms/toolbar/clipboard.html', flatten_context(context)))
context.pop()
return [clipboard]
@toolbar_pool.register
class PageToolbar(CMSToolbar):
_changed_admin_menu = None
watch_models = [Page]
watch_models = [Page, PageType]
# Helpers
def init_placeholders(self):
request = self.request
toolbar = self.toolbar
def init_from_request(self):
self.page = get_page_draft(self.request.current_page)
self.title = self.get_title()
self.permissions_activated = get_cms_setting('PERMISSION')
if toolbar._async and 'placeholders[]' in request.GET:
# AJAX request to reload page structure
placeholder_ids = request.GET.getlist("placeholders[]")
self.placeholders = Placeholder.objects.filter(pk__in=placeholder_ids)
self.statics = StaticPlaceholder.objects.filter(
Q(draft__in=placeholder_ids) | Q(public__in=placeholder_ids)
)
self.dirty_statics = [sp for sp in self.statics if sp.dirty]
else:
if toolbar.structure_mode_active and not toolbar.uses_legacy_structure_mode:
# User has explicitly requested structure mode
# and the object (page, blog, etc..) allows for the non-legacy structure mode
renderer = toolbar.structure_renderer
else:
renderer = toolbar.get_content_renderer()
def init_placeholders_from_request(self):
self.placeholders = getattr(self.request, 'placeholders', [])
self.statics = getattr(self.request, 'static_placeholders', [])
self.dirty_statics = [sp for sp in self.statics if sp.dirty]
self.placeholders = renderer.get_rendered_placeholders()
self.statics = renderer.get_rendered_static_placeholders()
self.dirty_statics = [sp for sp in self.statics if sp.dirty]
def add_structure_mode(self):
if self.page and not self.page.application_urls:
if user_can_change_page(self.request.user, page=self.page):
return self.add_structure_mode_item()
elif any(ph for ph in self.placeholders if ph.has_change_permission(self.request.user)):
return self.add_structure_mode_item()
for sp in self.statics:
if sp.has_change_permission(self.request):
return self.add_structure_mode_item()
def add_structure_mode_item(self, extra_classes=('cms-toolbar-item-cms-mode-switcher',)):
structure_active = self.toolbar.structure_mode_active
edit_mode_active = (not structure_active and self.toolbar.edit_mode_active)
build_url = '{}?{}'.format(self.toolbar.request_path, get_cms_setting('CMS_TOOLBAR_URL__BUILD'))
edit_url = '{}?{}'.format(self.toolbar.request_path, get_cms_setting('CMS_TOOLBAR_URL__EDIT_ON'))
if self.request.user.has_perm("cms.use_structure"):
switcher = self.toolbar.add_button_list('Mode Switcher', side=self.toolbar.RIGHT,
extra_classes=extra_classes)
switcher.add_button(_('Structure'), build_url, active=structure_active, disabled=False,
extra_classes='cms-structure-btn')
switcher.add_button(_('Content'), edit_url, active=edit_mode_active, disabled=False,
extra_classes='cms-content-btn')
def get_title(self):
try:
@@ -278,31 +282,25 @@ class PageToolbar(CMSToolbar):
return None
def has_publish_permission(self):
if not hasattr(self, 'publish_permission'):
publish_permission = bool(self.page or self.statics)
if self.page:
publish_permission = page_permissions.user_can_publish_page(
self.request.user,
page=self.page,
site=self.current_site
)
else:
publish_permission = False
if self.page:
publish_permission = self.page.has_publish_permission(self.request)
if publish_permission and self.statics:
publish_permission = all(sp.has_publish_permission(self.request) for sp in self.dirty_statics)
return publish_permission
if self.statics:
publish_permission &= all(sp.has_publish_permission(self.request) for sp in self.dirty_statics)
self.publish_permission = publish_permission
return self.publish_permission
def has_unpublish_permission(self):
return self.has_publish_permission()
def has_page_change_permission(self):
if not hasattr(self, 'page_change_permission'):
if not self.page and not get_cms_setting('PERMISSION'):
# We can't check permissions for an individual page
# and can't check global cms permissions because
# user opted out of them.
# So just check django auth permissions.
user = self.request.user
can_change = has_auth_page_permission(user, action='change')
else:
can_change = can_change_page(self.request)
self.page_change_permission = can_change
self.page_change_permission = can_change_page(self.request)
return self.page_change_permission
def page_is_pending(self, page, language):
@@ -310,22 +308,35 @@ class PageToolbar(CMSToolbar):
page.publisher_public.get_publisher_state(language) == PUBLISHER_STATE_PENDING)
def in_apphook(self):
with force_language(self.toolbar.language):
with force_language(self.toolbar.request_language):
try:
resolver = resolve(self.request.path_info)
resolver = resolve(self.toolbar.request_path)
except Resolver404:
return False
else:
from cms.views import details
return resolver.func != details
def in_apphook_root(self):
"""
Returns True if the request is for a page handled by an apphook, but
is also the page it is attached to.
:return: Boolean
"""
page = getattr(self.request, 'current_page', False)
if page:
language = get_language_from_request(self.request)
return self.toolbar.request_path == page.get_absolute_url(language=language)
return False
def get_on_delete_redirect_url(self):
parent, language = self.page.parent, self.current_lang
language = self.current_lang
parent_page = self.page.parent_page if self.page else None
# if the current page has a parent in the request's current language redirect to it
if parent and language in parent.get_languages():
if parent_page and language in parent_page.get_languages():
with force_language(language):
return parent.get_absolute_url(language=language)
return parent_page.get_absolute_url(language=language)
# else redirect to root, do not redirect to Page.objects.get_home() because user could have deleted the last
# page, if DEBUG == False this could cause a 404
@@ -334,61 +345,92 @@ class PageToolbar(CMSToolbar):
# Populate
def populate(self):
self.init_from_request()
self.page = get_page_draft(self.request.current_page)
self.title = self.get_title()
self.permissions_activated = get_cms_setting('PERMISSION')
self.change_admin_menu()
self.add_page_menu()
self.add_history_menu()
self.change_language_menu()
def post_template_populate(self):
self.init_placeholders_from_request()
self.init_placeholders()
self.add_draft_live()
self.add_publish_button()
self.add_structure_mode()
def has_dirty_objects(self):
language = self.current_lang
if self.page:
if self.dirty_statics:
# There's dirty static placeholders on this page.
# Only show the page as dirty (publish button) if the page
# translation has been configured.
dirty = self.page.has_translation(language)
else:
dirty = (self.page.is_dirty(language) or self.page_is_pending(self.page, language))
else:
dirty = bool(self.dirty_statics)
return dirty
# Buttons
def add_publish_button(self, classes=('cms-btn-action', 'cms-btn-publish',)):
# only do dirty lookups if publish permission is granted else button isn't added anyway
if self.toolbar.edit_mode and self.has_publish_permission():
classes = list(classes or [])
pk = self.page.pk if self.page else 0
if self.user_can_publish():
button = self.get_publish_button(classes=classes)
self.toolbar.add_item(button)
dirty = (bool(self.dirty_statics) or
(self.page and (self.page.is_dirty(self.current_lang) or
self.page_is_pending(self.page, self.current_lang))))
def user_can_publish(self):
if self.page and self.page.is_page_type:
# By design, page-types are not publishable.
return False
if dirty:
classes.append('cms-btn-publish-active')
if not self.toolbar.edit_mode_active:
return False
return self.has_publish_permission() and self.has_dirty_objects()
if self.dirty_statics or (self.page and self.page.is_published(self.current_lang)):
title = _('Publish changes')
else:
title = _('Publish page now')
classes.append('cms-publish-page')
def get_publish_button(self, classes=None):
dirty = self.has_dirty_objects()
classes = list(classes or [])
params = {}
if dirty and 'cms-btn-publish-active' not in classes:
classes.append('cms-btn-publish-active')
if self.dirty_statics:
params['statics'] = ','.join(str(sp.pk) for sp in self.dirty_statics)
if self.dirty_statics or (self.page and self.page.is_published(self.current_lang)):
title = _('Publish page changes')
else:
title = _('Publish page now')
classes.append('cms-publish-page')
if self.in_apphook():
params['redirect'] = self.request.path_info
item = ButtonList(side=self.toolbar.RIGHT)
item.add_button(
title,
url=self.get_publish_url(),
disabled=not dirty,
extra_classes=classes,
)
return item
with force_language(self.current_lang):
url = admin_reverse('cms_page_publish_page', args=(pk, self.current_lang))
def get_publish_url(self):
pk = self.page.pk if self.page else 0
params = {}
url = add_url_parameters(url, params)
if self.dirty_statics:
params['statics'] = ','.join(str(sp.pk) for sp in self.dirty_statics)
self.toolbar.add_button(title, url=url, extra_classes=classes,
side=self.toolbar.RIGHT, disabled=not dirty)
if self.in_apphook():
params['redirect'] = self.toolbar.request_path
with force_language(self.current_lang):
url = admin_reverse('cms_page_publish_page', args=(pk, self.current_lang))
return add_url_parameters(url, params)
def add_draft_live(self):
if self.page:
if self.toolbar.edit_mode and not self.title:
if self.toolbar.edit_mode_active and not self.title:
self.add_page_settings_button()
if self.page.has_change_permission(self.request) and self.page.is_published(self.current_lang):
if user_can_change_page(self.request.user, page=self.page) and self.page.is_published(self.current_lang):
return self.add_draft_live_item()
elif self.placeholders:
@@ -399,19 +441,27 @@ class PageToolbar(CMSToolbar):
return self.add_draft_live_item()
def add_draft_live_item(self, template='cms/toolbar/items/live_draft.html', extra_context=None):
context = {'request': self.request}
context = {'cms_toolbar': self.toolbar}
context.update(extra_context or {})
pos = len(self.toolbar.right_items)
self.toolbar.add_item(TemplateItem(template, extra_context=context, side=self.toolbar.RIGHT), position=pos)
def add_page_settings_button(self, extra_classes=('cms-btn-action',)):
url = '%s?language=%s' % (admin_reverse('cms_page_change', args=[self.page.pk]), self.toolbar.language)
url = '%s?language=%s' % (admin_reverse('cms_page_change', args=[self.page.pk]), self.toolbar.request_language)
self.toolbar.add_modal_button(_('Page settings'), url, side=self.toolbar.RIGHT, extra_classes=extra_classes)
# Menus
def change_language_menu(self):
if self.toolbar.edit_mode and self.page:
if self.toolbar.edit_mode_active and self.page:
can_change = page_permissions.user_can_change_page(
user=self.request.user,
page=self.page,
site=self.current_site,
)
else:
can_change = False
if can_change:
language_menu = self.toolbar.get_menu(LANGUAGE_MENU_IDENTIFIER)
if not language_menu:
return None
@@ -421,38 +471,65 @@ class PageToolbar(CMSToolbar):
remove = [(code, languages.get(code, code)) for code in self.page.get_languages() if code in languages]
add = [l for l in languages.items() if l not in remove]
copy = [(code, name) for code, name in languages.items() if code != self.current_lang and (code, name) in remove]
if add:
if add or remove or copy:
language_menu.add_break(ADD_PAGE_LANGUAGE_BREAK)
page_change_url = admin_reverse('cms_page_change', args=(self.page.pk,))
title = _('Add %(language)s Translation')
if add:
add_plugins_menu = language_menu.get_or_create_menu('{0}-add'.format(LANGUAGE_MENU_IDENTIFIER), _('Add Translation'))
if self.page.is_page_type:
page_change_url = admin_reverse('cms_pagetype_change', args=(self.page.pk,))
else:
page_change_url = admin_reverse('cms_page_change', args=(self.page.pk,))
for code, name in add:
url = add_url_parameters(page_change_url, language=code)
language_menu.add_modal_item(title % {'language': name}, url=url)
add_plugins_menu.add_modal_item(name, url=url)
if remove:
language_menu.add_break(REMOVE_PAGE_LANGUAGE_BREAK)
translation_delete_url = admin_reverse('cms_page_delete_translation', args=(self.page.pk,))
title = _('Delete %(language)s Translation')
if self.page.is_page_type:
translation_delete_url = admin_reverse('cms_pagetype_delete_translation', args=(self.page.pk,))
else:
translation_delete_url = admin_reverse('cms_page_delete_translation', args=(self.page.pk,))
remove_plugins_menu = language_menu.get_or_create_menu('{0}-del'.format(LANGUAGE_MENU_IDENTIFIER), _('Delete Translation'))
disabled = len(remove) == 1
for code, name in remove:
url = add_url_parameters(translation_delete_url, language=code)
language_menu.add_modal_item(title % {'language': name}, url=url, disabled=disabled)
remove_plugins_menu.add_modal_item(name, url=url, disabled=disabled)
if copy:
language_menu.add_break(COPY_PAGE_LANGUAGE_BREAK)
page_copy_url = admin_reverse('cms_page_copy_language', args=(self.page.pk,))
title = _('Copy all plugins from %s')
question = _('Are you sure you want copy all plugins from %s?')
copy_plugins_menu = language_menu.get_or_create_menu('{0}-copy'.format(LANGUAGE_MENU_IDENTIFIER), _('Copy all plugins'))
title = _('from %s')
question = _('Are you sure you want to copy all plugins from %s?')
if self.page.is_page_type:
page_copy_url = admin_reverse('cms_pagetype_copy_language', args=(self.page.pk,))
else:
page_copy_url = admin_reverse('cms_page_copy_language', args=(self.page.pk,))
for code, name in copy:
language_menu.add_ajax_item(title % name, action=page_copy_url,
data={'source_language': code, 'target_language': self.current_lang},
question=question % name, on_success=self.toolbar.REFRESH_PAGE)
copy_plugins_menu.add_ajax_item(
title % name, action=page_copy_url,
data={'source_language': code, 'target_language': self.current_lang},
question=question % name, on_success=self.toolbar.REFRESH_PAGE
)
def change_admin_menu(self):
if not self._changed_admin_menu and self.has_page_change_permission():
can_change_page = self.has_page_change_permission()
if not can_change_page:
# Check if the user has permissions to change at least one page
can_change_page = page_permissions.user_can_change_at_least_one_page(
user=self.request.user,
site=self.current_site,
)
if not self._changed_admin_menu and can_change_page:
admin_menu = self.toolbar.get_or_create_menu(ADMIN_MENU_IDENTIFIER)
url = admin_reverse('cms_page_changelist') # cms page admin
params = {'language': self.toolbar.language}
params = {'language': self.toolbar.request_language}
if self.page:
params['page_id'] = self.page.pk
url = add_url_parameters(url, params)
@@ -461,26 +538,80 @@ class PageToolbar(CMSToolbar):
self._changed_admin_menu = True
def add_page_menu(self):
if self.page and self.has_page_change_permission():
edit_mode = self.toolbar.edit_mode
if self.page:
edit_mode = self.toolbar.edit_mode_active
refresh = self.toolbar.REFRESH_PAGE
# menu for current page
current_page_menu = self.toolbar.get_or_create_menu(PAGE_MENU_IDENTIFIER, _('Page'), position=1)
# page operations menu
add_page_menu = current_page_menu.get_or_create_menu(PAGE_MENU_ADD_IDENTIFIER, _('Add Page'))
app_page_url = admin_reverse('cms_page_add')
add_page_menu_modal_items = (
(_('New Page'), {'edit': 1, 'position': 'last-child', 'target': self.page.parent_id or ''}),
(_('New Sub Page'), {'edit': 1, 'position': 'last-child', 'target': self.page.pk}),
(_('Duplicate this Page'), {'copy_target': self.page.pk})
can_change = user_can_change_page(
user=self.request.user,
page=self.page,
site=self.current_site,
)
for title, params in add_page_menu_modal_items:
params.update(language=self.toolbar.language)
add_page_menu.add_modal_item(title, url=add_url_parameters(app_page_url, params))
# menu for current page
# NOTE: disabled if the current path is "deeper" into the
# application's url patterns than its root. This is because
# when the Content Manager is at the root of the app-hook,
# some of the page options still make sense.
current_page_menu = self.toolbar.get_or_create_menu(
PAGE_MENU_IDENTIFIER, _('Page'), position=1, disabled=self.in_apphook() and not self.in_apphook_root())
new_page_params = {'edit': 1}
new_sub_page_params = {'edit': 1, 'parent_node': self.page.node_id}
if self.page.is_page_type:
add_page_url = admin_reverse('cms_pagetype_add')
advanced_url = admin_reverse('cms_pagetype_advanced', args=(self.page.pk,))
page_settings_url = admin_reverse('cms_pagetype_change', args=(self.page.pk,))
duplicate_page_url = admin_reverse('cms_pagetype_duplicate', args=[self.page.pk])
else:
add_page_url = admin_reverse('cms_page_add')
advanced_url = admin_reverse('cms_page_advanced', args=(self.page.pk,))
page_settings_url = admin_reverse('cms_page_change', args=(self.page.pk,))
duplicate_page_url = admin_reverse('cms_page_duplicate', args=[self.page.pk])
can_add_root_page = page_permissions.user_can_add_page(
user=self.request.user,
site=self.current_site,
)
if self.page.parent_page:
new_page_params['parent_node'] = self.page.parent_page.node_id
can_add_sibling_page = page_permissions.user_can_add_subpage(
user=self.request.user,
target=self.page.parent_page,
)
else:
can_add_sibling_page = can_add_root_page
can_add_sub_page = page_permissions.user_can_add_subpage(
user=self.request.user,
target=self.page,
)
# page operations menu
add_page_menu = current_page_menu.get_or_create_menu(
PAGE_MENU_ADD_IDENTIFIER,
_('Create Page'),
)
add_page_menu_modal_items = (
(_('New Page'), new_page_params, can_add_sibling_page),
(_('New Sub Page'), new_sub_page_params, can_add_sub_page),
)
for title, params, has_perm in add_page_menu_modal_items:
params.update(language=self.toolbar.request_language)
add_page_menu.add_modal_item(
title,
url=add_url_parameters(add_page_url, params),
disabled=not has_perm,
)
add_page_menu.add_modal_item(
_('Duplicate this Page'),
url=add_url_parameters(duplicate_page_url, {'language': self.toolbar.request_language}),
disabled=not can_add_sibling_page,
)
# first break
current_page_menu.add_break(PAGE_MENU_FIRST_BREAK)
@@ -490,106 +621,129 @@ class PageToolbar(CMSToolbar):
current_page_menu.add_link_item(_('Edit this Page'), disabled=edit_mode, url=page_edit_url)
# page settings
page_settings_url = admin_reverse('cms_page_change', args=(self.page.pk,))
page_settings_url = add_url_parameters(page_settings_url, language=self.toolbar.language)
current_page_menu.add_modal_item(_('Page settings'), url=page_settings_url, disabled=not edit_mode,
page_settings_url = add_url_parameters(page_settings_url, language=self.toolbar.request_language)
settings_disabled = not edit_mode or not can_change
current_page_menu.add_modal_item(_('Page settings'), url=page_settings_url, disabled=settings_disabled,
on_close=refresh)
# templates menu
if self.toolbar.build_mode or edit_mode:
templates_menu = current_page_menu.get_or_create_menu('templates', _('Templates'))
action = admin_reverse('cms_page_change_template', args=(self.page.pk,))
for path, name in get_cms_setting('TEMPLATES'):
active = self.page.template == path
if path == TEMPLATE_INHERITANCE_MAGIC:
templates_menu.add_break(TEMPLATE_MENU_BREAK)
templates_menu.add_ajax_item(name, action=action, data={'template': path}, active=active,
on_success=refresh)
# second break
current_page_menu.add_break(PAGE_MENU_SECOND_BREAK)
# advanced settings
advanced_url = admin_reverse('cms_page_advanced', args=(self.page.pk,))
advanced_url = add_url_parameters(advanced_url, language=self.toolbar.language)
advanced_disabled = not self.page.has_advanced_settings_permission(self.request) or not edit_mode
advanced_url = add_url_parameters(advanced_url, language=self.toolbar.request_language)
can_change_advanced = self.page.has_advanced_settings_permission(self.request.user)
advanced_disabled = not edit_mode or not can_change_advanced
current_page_menu.add_modal_item(_('Advanced settings'), url=advanced_url, disabled=advanced_disabled)
# templates menu
if edit_mode:
if self.page.is_page_type:
action = admin_reverse('cms_pagetype_change_template', args=(self.page.pk,))
else:
action = admin_reverse('cms_page_change_template', args=(self.page.pk,))
if can_change_advanced:
templates_menu = current_page_menu.get_or_create_menu(
'templates',
_('Templates'),
disabled=not can_change,
)
for path, name in get_cms_setting('TEMPLATES'):
active = self.page.template == path
if path == TEMPLATE_INHERITANCE_MAGIC:
templates_menu.add_break(TEMPLATE_MENU_BREAK)
templates_menu.add_ajax_item(name, action=action, data={'template': path}, active=active,
on_success=refresh)
# page type
if not self.page.is_page_type:
page_type_url = admin_reverse('cms_pagetype_add')
page_type_url = add_url_parameters(page_type_url, source=self.page.pk, language=self.toolbar.request_language)
page_type_disabled = not edit_mode or not can_add_root_page
current_page_menu.add_modal_item(_('Save as Page Type'), page_type_url, disabled=page_type_disabled)
# second break
current_page_menu.add_break(PAGE_MENU_SECOND_BREAK)
# permissions
if self.permissions_activated:
permissions_url = admin_reverse('cms_page_permissions', args=(self.page.pk,))
permission_disabled = not edit_mode or not self.page.has_change_permissions_permission(self.request)
permission_disabled = not edit_mode
if not permission_disabled:
permission_disabled = not page_permissions.user_can_change_page_permissions(
user=self.request.user,
page=self.page,
)
current_page_menu.add_modal_item(_('Permissions'), url=permissions_url, disabled=permission_disabled)
# dates settings
dates_url = admin_reverse('cms_page_dates', args=(self.page.pk,))
current_page_menu.add_modal_item(_('Publishing dates'), url=dates_url, disabled=not edit_mode)
if not self.page.is_page_type:
# dates settings
dates_url = admin_reverse('cms_page_dates', args=(self.page.pk,))
current_page_menu.add_modal_item(
_('Publishing dates'),
url=dates_url,
disabled=(not edit_mode or not can_change),
)
# third break
current_page_menu.add_break(PAGE_MENU_THIRD_BREAK)
# third break
current_page_menu.add_break(PAGE_MENU_THIRD_BREAK)
# navigation toggle
nav_title = _('Hide in navigation') if self.page.in_navigation else _('Display in navigation')
nav_action = admin_reverse('cms_page_change_innavigation', args=(self.page.pk,))
current_page_menu.add_ajax_item(nav_title, action=nav_action, disabled=not edit_mode, on_success=refresh)
# navigation toggle
nav_title = _('Hide in navigation') if self.page.in_navigation else _('Display in navigation')
nav_action = admin_reverse('cms_page_change_innavigation', args=(self.page.pk,))
current_page_menu.add_ajax_item(
nav_title,
action=nav_action,
disabled=(not edit_mode or not can_change),
on_success=refresh,
)
# publisher
if self.title:
if self.title and not self.page.is_page_type:
if self.title.published:
publish_title = _('Unpublish page')
publish_url = admin_reverse('cms_page_unpublish', args=(self.page.pk, self.current_lang))
else:
publish_title = _('Publish page')
publish_url = admin_reverse('cms_page_publish_page', args=(self.page.pk, self.current_lang))
current_page_menu.add_ajax_item(publish_title, action=publish_url, disabled=not edit_mode,
on_success=refresh)
# fourth break
current_page_menu.add_break(PAGE_MENU_FOURTH_BREAK)
user_can_publish = user_can_publish_page(self.request.user, page=self.page)
current_page_menu.add_ajax_item(
publish_title,
action=publish_url,
disabled=not edit_mode or not user_can_publish,
on_success=refresh,
)
if self.current_lang and not self.page.is_page_type:
# revert to live
current_page_menu.add_break(PAGE_MENU_FOURTH_BREAK)
revert_action = admin_reverse('cms_page_revert_to_live', args=(self.page.pk, self.current_lang))
revert_question = _('Are you sure you want to revert to live?')
# Only show this action if the page has pending changes and a public version
is_enabled = (
edit_mode
and can_change
and self.page.is_dirty(self.current_lang)
and self.page.publisher_public
)
current_page_menu.add_ajax_item(
_('Revert to live'),
action=revert_action,
question=revert_question,
disabled=not is_enabled,
on_success=refresh,
extra_classes=('cms-toolbar-revert',),
)
# last break
current_page_menu.add_break(PAGE_MENU_LAST_BREAK)
# delete
delete_url = admin_reverse('cms_page_delete', args=(self.page.pk,))
if self.page.is_page_type:
delete_url = admin_reverse('cms_pagetype_delete', args=(self.page.pk,))
else:
delete_url = admin_reverse('cms_page_delete', args=(self.page.pk,))
delete_disabled = not edit_mode or not user_can_delete_page(self.request.user, page=self.page)
on_delete_redirect_url = self.get_on_delete_redirect_url()
current_page_menu.add_modal_item(_('Delete page'), url=delete_url, on_close=on_delete_redirect_url,
disabled=not edit_mode)
# last break
current_page_menu.add_break(PAGE_MENU_LAST_BREAK)
# page type
page_type_url = admin_reverse('cms_page_add_page_type')
page_type_url = add_url_parameters(page_type_url, copy_target=self.page.pk, language=self.toolbar.language)
current_page_menu.add_modal_item(_('Save as Page Type'), page_type_url, disabled=not edit_mode)
def add_history_menu(self):
if self.toolbar.edit_mode and self.page:
refresh = self.toolbar.REFRESH_PAGE
history_menu = self.toolbar.get_or_create_menu(HISTORY_MENU_IDENTIFIER, _('History'), position=2)
if is_installed('reversion'):
from cms.utils.reversion_hacks import reversion, Revision
versions = reversion.get_for_object(self.page)
if self.page.revision_id:
current_revision = Revision.objects.get(pk=self.page.revision_id)
has_undo = versions.filter(revision__pk__lt=current_revision.pk).exists()
has_redo = versions.filter(revision__pk__gt=current_revision.pk).exists()
else:
has_redo = False
has_undo = versions.count() > 1
undo_action = admin_reverse('cms_page_undo', args=(self.page.pk,))
redo_action = admin_reverse('cms_page_redo', args=(self.page.pk,))
history_menu.add_ajax_item(_('Undo'), action=undo_action, disabled=not has_undo, on_success=refresh)
history_menu.add_ajax_item(_('Redo'), action=redo_action, disabled=not has_redo, on_success=refresh)
history_menu.add_break(HISTORY_MENU_BREAK)
revert_action = admin_reverse('cms_page_revert_page', args=(self.page.pk, self.current_lang))
revert_question = _('Are you sure you want to revert to live?')
is_enabled = self.page.is_dirty(self.current_lang) and self.page.publisher_public
history_menu.add_ajax_item(_('Revert to live'), action=revert_action, question=revert_question,
disabled=not is_enabled,
on_success=refresh, extra_classes=('cms-toolbar-revert',))
history_menu.add_modal_item(_('View history'), url=admin_reverse('cms_page_history', args=(self.page.pk,)))
disabled=delete_disabled)
+14 -15
View File
@@ -1,10 +1,8 @@
# -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.contrib.sites.models import Site
from cms.models import Page
from cms.utils import permissions
from cms.utils.page_permissions import user_can_add_page, user_can_add_subpage
from .wizards.wizard_pool import wizard_pool
from .wizards.wizard_base import Wizard
@@ -15,27 +13,28 @@ from .forms.wizards import CreateCMSPageForm, CreateCMSSubPageForm
class CMSPageWizard(Wizard):
def user_has_add_permission(self, user, page=None, **kwargs):
if not page or not page.site_id:
site = Site.objects.get_current()
if page:
parent_page = page.get_parent_page()
else:
site = Site.objects.get(pk=page.site_id)
return permissions.has_page_add_permission(
user, page, position="right", site=site)
parent_page = None
if page and page.get_parent_page():
# User is adding a page which will be a right
# sibling to the current page.
has_perm = user_can_add_subpage(user, target=parent_page)
else:
has_perm = user_can_add_page(user)
return has_perm
class CMSSubPageWizard(Wizard):
def user_has_add_permission(self, user, page=None, **kwargs):
if not page or page.application_urls:
# We can't really add a sub-page to a non-existant page. Or to an
# We can't really add a sub-page to a non-existent page. Or to an
# app-hooked page.
return False
if not page.site_id:
site = Site.objects.get_current()
else:
site = Site.objects.get(pk=page.site_id)
return permissions.has_page_add_permission(
user, page, position="last-child", site=site)
return user_can_add_subpage(user, target=page)
cms_page_wizard = CMSPageWizard(
+26 -5
View File
@@ -1,27 +1,48 @@
# -*- coding: utf-8 -*-
TEMPLATE_INHERITANCE_MAGIC = 'INHERIT'
REFRESH_PAGE = 'REFRESH_PAGE'
FOLLOW_REDIRECT = 'FOLLOW_REDIRECT'
URL_CHANGE = 'URL_CHANGE'
RIGHT = object() # this is a trick so "foo is RIGHT" will only ever work for this, same goes for LEFT.
LEFT = object()
# Plugin actions
PLUGIN_MOVE_ACTION = 'move'
PLUGIN_COPY_ACTION = 'copy'
PUBLISHER_STATE_DEFAULT = 0
PUBLISHER_STATE_DIRTY = 1
# Page was marked published, but some of page parents are not.
PUBLISHER_STATE_PENDING = 4
PAGE_TYPES_ID = "page_types"
PAGE_TREE_POSITIONS = ('last-child', 'first-child', 'left', 'right')
VISIBILITY_ALL = None
VISIBILITY_USERS = 1
VISIBILITY_ANONYMOUS = 2
X_FRAME_OPTIONS_INHERIT = 0
X_FRAME_OPTIONS_DENY = 1
X_FRAME_OPTIONS_SAMEORIGIN = 2
X_FRAME_OPTIONS_ALLOW = 3
PAGE_USERNAME_MAX_LENGTH = 255
SLUG_REGEXP = '[0-9A-Za-z-_.//]+'
EXPIRE_NOW = 0
# HTTP Specification says max caching should only be up to one year.
MAX_EXPIRATION_TTL = 365 * 24 * 3600
PLUGIN_TOOLBAR_JS = "CMS._plugins.push([\"cms-plugin-%(pk)s\", %(config)s]);\n"
PLACEHOLDER_TOOLBAR_JS = "CMS._plugins.push([\"cms-placeholder-%(pk)s\", %(config)s]);"
# In the permissions system we use user levels to determine
# the depth in which the user has permissions.
# This constant represents a user that can see pages at all depths.
ROOT_USER_LEVEL = -1
GRANT_ALL_PERMISSIONS = 'All'
PUBLISH_COMMENT = "Publish"
SCRIPT_USERNAME = 'script'
+19 -2
View File
@@ -1,14 +1,31 @@
# -*- coding: utf-8 -*-
from django.utils import lru_cache
from django.utils.functional import lazy
from cms.utils.conf import get_cms_setting
from cms.utils import get_template_from_request
from cms.utils.page import get_page_template_from_request
def cms_settings(request):
"""
Adds cms-related variables to the context.
"""
from menus.menu_pool import MenuRenderer
@lru_cache.lru_cache(maxsize=None)
def _get_menu_renderer():
# We use lru_cache to avoid getting the manager
# every time this function is called.
from menus.menu_pool import menu_pool
return menu_pool.get_renderer(request)
# Now use lazy() to avoid getting the menu renderer
# up until the point is needed.
# lazy() does not memoize results, is why lru_cache is needed.
_get_menu_renderer = lazy(_get_menu_renderer, MenuRenderer)
return {
'cms_menu_renderer': _get_menu_renderer(),
'CMS_MEDIA_URL': get_cms_setting('MEDIA_URL'),
'CMS_TEMPLATE': lambda: get_template_from_request(request),
'CMS_TEMPLATE': lambda: get_page_template_from_request(request),
}
+9 -5
View File
@@ -1,9 +1,11 @@
from cms.models import Page, Title
from cms.utils.page_permissions import user_can_change_page
from django.contrib import admin
from django.contrib.admin.options import csrf_protect_m
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.urls import reverse
class ExtensionAdmin(admin.ModelAdmin):
@@ -19,12 +21,12 @@ class PageExtensionAdmin(ExtensionAdmin):
page = Page.objects.get(pk=request.GET['extended_object'])
else:
page = obj.extended_object
if not page.has_change_permission(request):
if not user_can_change_page(request.user, page):
raise PermissionDenied()
super(PageExtensionAdmin, self).save_model(request, obj, form, change)
def delete_model(self, request, obj):
if not obj.extended_object.has_change_permission(request):
if not obj.extended_object.has_change_permission(request.user):
raise PermissionDenied()
obj.delete()
@@ -66,12 +68,14 @@ class TitleExtensionAdmin(ExtensionAdmin):
title = Title.objects.get(pk=request.GET['extended_object'])
else:
title = obj.extended_object
if not title.page.has_change_permission(request):
if not user_can_change_page(request.user, page=title.page):
raise PermissionDenied()
super(TitleExtensionAdmin, self).save_model(request, obj, form, change)
def delete_model(self, request, obj):
if not obj.extended_object.page.has_change_permission(request):
page = obj.extended_object.page
if not user_can_change_page(request.user, page):
raise PermissionDenied()
obj.delete()
+15
View File
@@ -12,6 +12,20 @@ class ExtensionPool(object):
def register(self, extension):
"""
Registers the given extension.
Example::
class MyExtension(PageExtension):
pass
extension_pool.register(MyExtension)
or as decorator::
@extension_pool.register
class MyExtension(PageExtension):
pass
"""
if issubclass(extension, PageExtension):
@@ -23,6 +37,7 @@ class ExtensionPool(object):
'Extension has to subclass either %r or %r. %r does not!' % (PageExtension, TitleExtension, extension)
)
self._activate_signaling()
return extension
def unregister(self, extension):
"""
+32 -13
View File
@@ -4,11 +4,16 @@ from cms.constants import PUBLISHER_STATE_DIRTY
from django.db import models
from cms.models import Page, Title
from cms.utils.compat import DJANGO_1_7
class BaseExtension(models.Model):
public_extension = models.OneToOneField('self', null=True, editable=False, related_name='draft_extension')
public_extension = models.OneToOneField(
'self',
on_delete=models.CASCADE,
null=True,
editable=False,
related_name='draft_extension',
)
extended_object = None
class Meta:
@@ -28,15 +33,12 @@ class BaseExtension(models.Model):
@classmethod
def _get_related_objects(cls):
if DJANGO_1_7:
return list(cls._meta.get_all_related_objects())
else:
fields = cls._meta._get_fields(
forward=False, reverse=True,
include_parents=True,
include_hidden=False,
)
return list(obj for obj in fields if not isinstance(obj.field, ManyToManyField))
fields = cls._meta._get_fields(
forward=False, reverse=True,
include_parents=True,
include_hidden=False,
)
return list(obj for obj in fields if not isinstance(obj.field, ManyToManyField))
def copy(self, target, language):
"""
@@ -48,6 +50,12 @@ class BaseExtension(models.Model):
clone.pk = None
clone.public_extension = None
clone.extended_object = target # set the new public object
# Nullify all concrete parent primary keys. See issue #5494
for parent, field in clone._meta.parents.items():
if field:
setattr(clone, parent._meta.pk.attname, None)
clone.save(mark_page=False)
# If the target we're copying already has a publisher counterpart, then
@@ -79,8 +87,19 @@ class BaseExtension(models.Model):
if public_extension:
this.pk = public_extension.pk # overwrite current public extension
this.public_extension = None # remove public extension or it will point to itself and raise duplicate entry
# Set public_extension concrete parents PKs. See issue #5494
for parent, field in this._meta.parents.items():
if field:
setattr(this, parent._meta.pk.attname, getattr(public_extension, parent._meta.pk.attname))
else:
this.pk = None # create new public extension
# Nullify all concrete parent primary keys. See issue #5494
for parent, field in this._meta.parents.items():
if field:
setattr(this, parent._meta.pk.attname, None)
this.save(mark_page=False)
self.public_extension = this
self.save(mark_page=False)
@@ -92,7 +111,7 @@ class BaseExtension(models.Model):
class PageExtension(BaseExtension):
extended_object = models.OneToOneField(Page, editable=False)
extended_object = models.OneToOneField(Page, on_delete=models.CASCADE, editable=False)
class Meta:
abstract = True
@@ -112,7 +131,7 @@ class PageExtension(BaseExtension):
class TitleExtension(BaseExtension):
extended_object = models.OneToOneField(Title, editable=False)
extended_object = models.OneToOneField(Title, on_delete=models.CASCADE, editable=False)
class Meta:
abstract = True
+9 -57
View File
@@ -2,49 +2,13 @@
from cms.utils.urlutils import admin_reverse
from cms.api import get_page_draft
from cms.toolbar_base import CMSToolbar
from cms.utils import get_cms_setting, get_language_list
from cms.utils.permissions import has_page_change_permission
from django.core.urlresolvers import NoReverseMatch
from cms.utils import get_language_list
from cms.utils.page_permissions import user_can_change_page
from django.urls import NoReverseMatch
class ExtensionToolbar(CMSToolbar):
"""
ExtensionToolbar provides utility functions to handle much of the boilerplate involved in creating a toolbar for
PageExtension and TitleExtension.
The basic implementation of an extension toolbar using this class is::
@toolbar_pool.register
class SampleExtension(ExtensionToolbar):
model = ExtModel # The PageExtension / TitleExtension you are working with
def populate(self):
current_page_menu = self._setup_extension_toolbar()
if current_page_menu:
position = 0
page_extension, url = self.get_page_extension_admin()
if url:
current_page_menu.add_modal_item('Item label', url=url,
disabled=not self.toolbar.edit_mode,
position=position)
For TitleExtension use ``get_title_extension_admin`` and cycle on the resulting title extensions and urls
@toolbar_pool.register
class SampleExtension(ExtensionToolbar):
model = ExtModel # The PageExtension / TitleExtension you are working with
def populate(self):
current_page_menu = self._setup_extension_toolbar()
if current_page_menu:
position = 0
urls = self.get_title_extension_admin()
for title_extension, url in urls:
current_page_menu.add_modal_item('Item label', url=url,
disabled=not self.toolbar.edit_mode,
position=position)
"""
model = None
page = None
@@ -58,22 +22,10 @@ class ExtensionToolbar(CMSToolbar):
It returns the page menu or None if the above conditions are not met
"""
page = self._get_page()
if not page:
# Nothing to do
return
# check global permissions if CMS_PERMISSION is active
if get_cms_setting('PERMISSION'):
has_global_current_page_change_permission = has_page_change_permission(self.request)
else:
has_global_current_page_change_permission = True
# check if user has page edit permission
can_change = (self.request.current_page and
self.request.current_page.has_change_permission(self.request))
current_page_menu = self.toolbar.get_or_create_menu('page')
if can_change and has_global_current_page_change_permission:
return current_page_menu
else:
return
if page and user_can_change_page(self.request.user, page=page):
return self.toolbar.get_or_create_menu('page')
return
def _get_page(self):
"""
@@ -126,7 +78,7 @@ class ExtensionToolbar(CMSToolbar):
if language:
titles = page.get_title_obj(language),
else:
titles = page.title_set.filter(language__in=get_language_list(page.site_id))
titles = page.title_set.filter(language__in=get_language_list(page.node.site_id))
# Titles
for title in titles:
try:
+9 -6
View File
@@ -5,9 +5,9 @@ from django.forms.fields import EMPTY_VALUES
from django.utils.translation import ugettext_lazy as _
from cms.forms.utils import get_site_choices, get_page_choices
from cms.forms.validators import validate_url
from cms.forms.widgets import PageSelectWidget, PageSmartLinkWidget
from cms.models.pagemodel import Page
from cms.utils.compat import DJANGO_1_7
class SuperLazyIterator(object):
@@ -71,25 +71,28 @@ class PageSelectFormField(forms.MultiValueField):
# this will cause django to always return True because of the '1'
# so we simply follow django's default behavior when initial is None and data is "empty"
data = ['' for x in range(0, len(data))]
if DJANGO_1_7:
return super(PageSelectFormField, self)._has_changed(initial, data)
else:
return super(PageSelectFormField, self).has_changed(initial, data)
return super(PageSelectFormField, self).has_changed(initial, data)
def _has_changed(self, initial, data):
return self.has_changed(initial, data)
class PageSmartLinkField(forms.CharField):
widget = PageSmartLinkWidget
default_validators = [validate_url]
def __init__(self, max_length=None, min_length=None, placeholder_text=None,
ajax_view=None, *args, **kwargs):
self.placeholder_text = placeholder_text
widget = self.widget(ajax_view=ajax_view)
super(PageSmartLinkField, self).__init__(max_length, min_length,
super(PageSmartLinkField, self).__init__(max_length=max_length, min_length=min_length,
widget=widget, *args, **kwargs)
def widget_attrs(self, widget):
attrs = super(PageSmartLinkField, self).widget_attrs(widget)
attrs.update({'placeholder_text': self.placeholder_text})
return attrs
def clean(self, value):
value = self.to_python(value).strip()
return super(PageSmartLinkField, self).clean(value)
+13
View File
@@ -0,0 +1,13 @@
from django import forms
from django.contrib.auth.forms import AuthenticationForm
class CMSToolbarLoginForm(AuthenticationForm):
def __init__(self, *args, **kwargs):
super(CMSToolbarLoginForm, self).__init__(*args, **kwargs)
kwargs['prefix'] = kwargs.get('prefix', 'cms')
self.fields['username'].widget = forms.TextInput(
attrs = { 'required': 'required' })
self.fields['password'].widget = forms.PasswordInput(
attrs = { 'required': 'required' })
+64 -49
View File
@@ -1,67 +1,82 @@
# -*- coding: utf-8 -*-
from collections import defaultdict
try:
from collections import OrderedDict
except ImportError:
from django.utils.datastructures import SortedDict as OrderedDict
from __future__ import unicode_literals
from django.db.models import Prefetch
from django.contrib.sites.models import Site
from django.db.models.signals import post_save, post_delete
from django.utils.html import escape
from django.utils.safestring import mark_safe
from cms.cache.choices import (clean_site_choices_cache, clean_page_choices_cache,
_site_cache_key, _page_cache_key)
from cms.exceptions import LanguageError
from cms.cache.choices import (
clean_site_choices_cache, clean_page_choices_cache,
_site_cache_key, _page_cache_key)
from cms.models import Page, Title
from cms.utils import i18n
def update_site_and_page_choices(lang=None):
lang = lang or i18n.get_current_language()
SITE_CHOICES_KEY = _site_cache_key(lang)
PAGE_CHOICES_KEY = _page_cache_key(lang)
title_queryset = (Title.objects.drafts()
.select_related('page', 'page__site')
.order_by('page__path'))
pages = defaultdict(OrderedDict)
sites = {}
for title in title_queryset:
page = pages[title.page.site.pk].get(title.page.pk, {})
page[title.language] = title
pages[title.page.site.pk][title.page.pk] = page
sites[title.page.site.pk] = title.page.site.name
def get_sites():
sites = (
Site
.objects
.filter(djangocms_nodes__isnull=False)
.order_by('name')
.distinct()
)
return sites
def get_page_choices_for_site(site, language):
fallbacks = i18n.get_fallback_languages(language, site_id=site.pk)
languages = [language] + fallbacks
translation_lookup = Prefetch(
'title_set',
to_attr='filtered_translations',
queryset=Title.objects.filter(language__in=languages).only('pk', 'page', 'language', 'title')
)
pages = (
Page
.objects
.drafts()
.on_site(site)
.select_related('node')
.prefetch_related(translation_lookup)
.order_by('node__path')
.only('pk', 'node')
)
for page in pages:
translations = page.filtered_translations
titles_by_language = {trans.language: trans.title for trans in translations}
for language in languages:
# EmptyTitle is used to prevent the cms from trying
# to find a translation in the database
if language in titles_by_language:
title = titles_by_language[language]
indent = "&nbsp;&nbsp;" * (page.node.depth - 1)
label = mark_safe("%s%s" % (indent, escape(title)))
yield (page.pk, label)
break
def update_site_and_page_choices(language=None):
if language is None:
language = i18n.get_current_language()
site_choices = []
page_choices = [('', '----')]
site_choices_key = _site_cache_key(language)
page_choices_key = _page_cache_key(language)
try:
fallbacks = i18n.get_fallback_languages(lang)
except LanguageError:
fallbacks = []
language_order = [lang] + fallbacks
for site in get_sites():
_page_choices = list(get_page_choices_for_site(site, language))
site_choices.append((site.pk, site.name))
page_choices.append((site.name, _page_choices))
for sitepk, sitename in sites.items():
site_choices.append((sitepk, sitename))
site_page_choices = []
for titles in pages[sitepk].values():
title = None
for language in language_order:
title = titles.get(language)
if title:
break
if not title:
continue
indent = u"&nbsp;&nbsp;" * (title.page.depth - 1)
page_title = mark_safe(u"%s%s" % (indent, title.title))
site_page_choices.append((title.page.pk, page_title))
page_choices.append((sitename, site_page_choices))
from django.core.cache import cache
# We set it to 1 day here because we actively invalidate this cache.
cache.set(SITE_CHOICES_KEY, site_choices, 86400)
cache.set(PAGE_CHOICES_KEY, page_choices, 86400)
cache.set(site_choices_key, site_choices, 86400)
cache.set(page_choices_key, page_choices, 86400)
return site_choices, page_choices
@@ -70,7 +85,7 @@ def get_site_choices(lang=None):
lang = lang or i18n.get_current_language()
site_choices = cache.get(_site_cache_key(lang))
if site_choices is None:
site_choices, page_choices = update_site_and_page_choices(lang)
site_choices = update_site_and_page_choices(lang)[0]
return site_choices
@@ -79,7 +94,7 @@ def get_page_choices(lang=None):
lang = lang or i18n.get_current_language()
page_choices = cache.get(_page_cache_key(lang))
if page_choices is None:
site_choices, page_choices = update_site_and_page_choices(lang)
page_choices = update_site_and_page_choices(lang)[1]
return page_choices
+70
View File
@@ -0,0 +1,70 @@
from __future__ import unicode_literals
from django.core.exceptions import ValidationError
from django.core.validators import RegexValidator, URLValidator
from django.utils.encoding import force_text
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext
from cms.utils.page import get_all_pages_from_path
from cms.utils.urlutils import admin_reverse, relative_url_regex
def validate_relative_url(value):
RegexValidator(regex=relative_url_regex)(value)
def validate_url(value):
try:
# Validate relative urls first
validate_relative_url(value)
except ValidationError:
# Fallback to absolute urls
URLValidator()(value)
def validate_url_uniqueness(site, path, language, exclude_page=None):
""" Checks for conflicting urls
"""
if '/' in path:
validate_url(path)
path = path.strip('/')
pages = get_all_pages_from_path(site, path, language)
pages = pages.select_related('publisher_public')
if exclude_page:
pages = pages.exclude(pk=exclude_page.pk)
if exclude_page.publisher_public_id:
pages = pages.exclude(pk=exclude_page.publisher_public_id)
try:
conflict_page = pages[0]
except IndexError:
return True
if conflict_page.publisher_is_draft:
page_id = conflict_page.pk
else:
# rare case where draft points to one url
# and live points to another which conflicts.
# Use the draft ID because public page is not editable.
page_id = conflict_page.publisher_public_id
if conflict_page.is_page_type:
change_url = admin_reverse('cms_pagetype_change', args=[page_id])
else:
change_url = admin_reverse('cms_page_change', args=[page_id])
conflict_url = '<a href="%(change_url)s" target="_blank">%(page_title)s</a>' % {
'change_url': change_url,
'page_title': force_text(conflict_page),
}
if exclude_page:
message = ugettext('Page %(conflict_page)s has the same url \'%(url)s\' as current page "%(instance)s".')
else:
message = ugettext('Page %(conflict_page)s has the same url \'%(url)s\' as current page.')
message = message % {'conflict_page': conflict_url, 'url': path, 'instance': exclude_page}
raise ValidationError(mark_safe(message))
+85 -105
View File
@@ -1,17 +1,13 @@
# -*- coding: utf-8 -*-
from itertools import chain
from django.contrib.admin.templatetags.admin_static import static
from django.contrib.auth import get_permission_codename
from django.contrib.sites.models import Site
from django.core.urlresolvers import NoReverseMatch, reverse_lazy
from django.forms.widgets import Select, MultiWidget, TextInput
from django.forms.widgets import MultiWidget, Select, TextInput
from django.urls import NoReverseMatch, reverse_lazy
from django.utils.encoding import force_text
from django.utils.html import escape, escapejs
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from cms.utils.urlutils import admin_reverse
from cms.utils.urlutils import admin_reverse, static_with_version
from cms.forms.utils import get_site_choices, get_page_choices
from cms.models import Page, PageUser
@@ -20,13 +16,11 @@ class PageSelectWidget(MultiWidget):
"""A widget that allows selecting a page by first selecting a site and then
a page on that site in a two step process.
"""
template_name = 'cms/widgets/pageselectwidget.html'
class Media:
js = (
'cms/js/modules/jquery.noconflict.pre.js',
'cms/js/dist/bundle.admin.base.min.js',
'cms/js/widgets/forms.pageselectwidget.js',
'cms/js/modules/jquery.noconflict.post.js'
static_with_version('cms/js/dist/bundle.forms.pageselectwidget.min.js'),
)
def __init__(self, site_choices=None, page_choices=None, attrs=None):
@@ -43,9 +37,8 @@ class PageSelectWidget(MultiWidget):
of that page or the current site_id and None if no page_id is given.
"""
if value:
page = Page.objects.get(pk=value)
site = page.site
return [site.pk, page.pk, page.pk]
page = Page.objects.select_related('node').get(pk=value)
return [page.node.site_id, page.pk, page.pk]
site = Site.objects.get_current()
return [site.pk,None,None]
@@ -71,13 +64,7 @@ class PageSelectWidget(MultiWidget):
return True
return False
def render(self, name, value, attrs=None):
# THIS IS A COPY OF django.forms.widgets.MultiWidget.render()
# (except for the last line)
# value is a list of values, each corresponding to a widget
# in self.widgets.
def _build_widgets(self):
site_choices = get_site_choices()
page_choices = get_page_choices()
self.site_choices = site_choices
@@ -87,35 +74,31 @@ class PageSelectWidget(MultiWidget):
Select(choices=self.choices, attrs={'style': "display:none;"} ),
)
if not isinstance(value, list):
value = self.decompress(value)
output = []
final_attrs = self.build_attrs(attrs)
id_ = final_attrs.get('id', None)
for i, widget in enumerate(self.widgets):
try:
widget_value = value[i]
except IndexError:
widget_value = None
if id_:
final_attrs = dict(final_attrs, id='%s_%s' % (id_, i))
output.append(widget.render(name + '_%s' % i, widget_value, final_attrs))
output.append(r'''<script type="text/javascript">
CMS.$(function () {
new CMS.PageSelectWidget({
def _build_script(self, name, value, attrs={}):
return r"""<script type="text/javascript">
var CMS = window.CMS || {};
CMS.Widgets = CMS.Widgets || {};
CMS.Widgets._pageSelectWidgets = CMS.Widgets._pageSelectWidgets || [];
CMS.Widgets._pageSelectWidgets.push({
name: '%(name)s'
});
});
</script>''' % {
'name': name
})
return mark_safe(self.format_output(output))
</script>""" % {
'name': name
}
def get_context(self, name, value, attrs):
self._build_widgets()
context = super(PageSelectWidget, self).get_context(name, value, attrs)
context['widget']['script_init'] = self._build_script(name, value, context['widget']['attrs'])
return context
def format_output(self, rendered_widgets):
return u' '.join(rendered_widgets)
class PageSmartLinkWidget(TextInput):
template_name = 'cms/widgets/pagesmartlinkwidget.html'
class Media:
css = {
@@ -125,9 +108,7 @@ class PageSmartLinkWidget(TextInput):
)
}
js = (
'cms/js/dist/bundle.admin.base.min.js',
'cms/js/select2/select2.js',
'cms/js/widgets/forms.pagesmartlinkwidget.js',
static_with_version('cms/js/dist/bundle.forms.pagesmartlinkwidget.min.js'),
)
def __init__(self, attrs=None, ajax_view=None):
@@ -142,28 +123,29 @@ class PageSmartLinkWidget(TextInput):
'You should provide an ajax_view argument that can be reversed to the PageSmartLinkWidget'
)
def render(self, name=None, value=None, attrs=None):
final_attrs = self.build_attrs(attrs)
id_ = final_attrs.get('id', None)
def _build_script(self, name, value, attrs={}):
return r"""<script type="text/javascript">
var CMS = window.CMS || {};
output = [r'''<script type="text/javascript">
CMS.$(function () {
new CMS.PageSmartLinkWidget({
id: '%(element_id)s',
text: '%(placeholder_text)s',
lang: '%(language_code)s',
url: '%(ajax_url)s'
});
CMS.Widgets = CMS.Widgets || {};
CMS.Widgets._pageSmartLinkWidgets = CMS.Widgets._pageSmartLinkWidgets || [];
CMS.Widgets._pageSmartLinkWidgets.push({
id: '%(element_id)s',
text: '%(placeholder_text)s',
lang: '%(language_code)s',
url: '%(ajax_url)s'
});
</script>''' % {
'element_id': id_,
'placeholder_text': final_attrs.get('placeholder_text', ''),
</script>""" % {
'element_id': attrs.get('id', ''),
'placeholder_text': attrs.get('placeholder_text', ''),
'language_code': self.language,
'ajax_url': force_text(self.ajax_url)
}]
}
output.append(super(PageSmartLinkWidget, self).render(name, value, attrs))
return mark_safe(u''.join(output))
def get_context(self, name, value, attrs):
context = super(PageSmartLinkWidget, self).get_context(name, value, attrs)
context['widget']['script_init'] = self._build_script(name, value, context['widget']['attrs'])
return context
class UserSelectAdminWidget(Select):
@@ -174,8 +156,8 @@ class UserSelectAdminWidget(Select):
Current user should be assigned to widget in form constructor as an user
attribute.
"""
def render(self, name, value, attrs=None, choices=()):
output = [super(UserSelectAdminWidget, self).render(name, value, attrs, choices)]
def render(self, name, value, attrs=None, choices=(), renderer=None):
output = [super(UserSelectAdminWidget, self).render(name, value, attrs, renderer=renderer)]
if hasattr(self, 'user') and (self.user.is_superuser or \
self.user.has_perm(PageUser._meta.app_label + '.' + get_permission_codename('add', PageUser._meta))):
# append + icon
@@ -194,17 +176,20 @@ class AppHookSelect(Select):
class Media:
js = (
'cms/js/modules/jquery.noconflict.pre.js',
'cms/js/dist/bundle.admin.base.min.js',
'cms/js/widgets/forms.apphookselect.js',
'cms/js/modules/jquery.noconflict.post.js'
static_with_version('cms/js/dist/bundle.forms.apphookselect.min.js'),
)
def __init__(self, attrs=None, choices=(), app_namespaces={}):
self.app_namespaces = app_namespaces
super(AppHookSelect, self).__init__(attrs, choices)
def render_option(self, selected_choices, option_value, option_label):
def create_option(self, name, value, label, selected, index, subindex=None, attrs=None):
option = super(AppHookSelect, self).create_option(name, value, label, selected, index, subindex, attrs)
if value in self.app_namespaces:
option['attrs']['data-namespace'] = escape(self.app_namespaces[value])
return option
def _build_option(self, selected_choices, option_value, option_label):
if option_value is None:
option_value = ''
option_value = force_text(option_value)
@@ -217,23 +202,14 @@ class AppHookSelect(Select):
selected_html = ''
if option_value in self.app_namespaces:
data_html = mark_safe(' data-namespace="%s"' % self.app_namespaces[option_value])
data_html = mark_safe(' data-namespace="%s"' % escape(self.app_namespaces[option_value]))
else:
data_html = ''
return option_value, selected_html, data_html, force_text(option_label)
return '<option value="%s"%s%s>%s</option>' % (
option_value,
selected_html,
data_html,
force_text(option_label),
)
def render_options(self, choices, selected_choices):
selected_choices = set(force_text(v) for v in selected_choices)
output = []
for option_value, option_label in chain(self.choices, choices):
output.append(self.render_option(selected_choices, option_value, option_label))
return '\n'.join(output)
def render_option(self, selected_choices, option_value, option_label):
option_data = self._build_option(selected_choices, option_value, option_label)
return '<option value="%s"%s%s>%s</option>' % option_data
class ApplicationConfigSelect(Select):
@@ -247,36 +223,40 @@ class ApplicationConfigSelect(Select):
A stub 'add-another' link is created and filled in with the correct URL by the same
javascript.
"""
template_name = 'cms/widgets/applicationconfigselect.html'
class Media:
js = (
'cms/js/modules/jquery.noconflict.pre.js',
'cms/js/dist/bundle.admin.base.min.js',
'cms/js/widgets/forms.apphookselect.js',
'cms/js/modules/jquery.noconflict.post.js'
static_with_version('cms/js/dist/bundle.forms.apphookselect.min.js'),
)
def __init__(self, attrs=None, choices=(), app_configs={}):
self.app_configs = app_configs
super(ApplicationConfigSelect, self).__init__(attrs, choices)
def render(self, name, value, attrs=None, choices=()):
output = [super(ApplicationConfigSelect, self).render(name, value, attrs, choices)]
output.append('<script>\n')
output.append('var apphooks_configuration = {\n')
def _build_script(self, name, value, attrs={}):
configs = []
urls = []
for application, cms_app in self.app_configs.items():
output.append("'%s': [%s]," % (application, ",".join(["['%s', '%s']" % (config.pk, force_text(config)) for config in cms_app.get_configs()])))
output.append('\n};\n')
output.append('var apphooks_configuration_url = {\n')
configs.append("'%s': [%s]" % (application, ",".join(
["['%s', '%s']" % (config.pk, escapejs(escape(config))) for config in cms_app.get_configs()]))) # noqa
for application, cms_app in self.app_configs.items():
output.append("'%s': '%s'," % (application, cms_app.get_config_add_url()))
output.append('\n};\n')
output.append('var apphooks_configuration_value = \'%s\';\n' % value)
output.append('</script>')
urls.append("'%s': '%s'" % (application, cms_app.get_config_add_url()))
return r"""<script type="text/javascript">
var apphooks_configuration = {
%(apphooks_configurations)s
};
var apphooks_configuration_url = {
%(apphooks_url)s
};
var apphooks_configuration_value = '%(apphooks_value)s';
</script>""" % {
'apphooks_configurations': ','.join(configs),
'apphooks_url': ','.join(urls),
'apphooks_value': value,
}
related_url = ''
output.append('<a href="%s" class="add-another" id="add_%s" onclick="return showAddAnotherPopup(this);"> '
% (related_url, name))
output.append('<img src="%s" width="10" height="10" alt="%s"/></a>'
% (static('admin/img/icon_addlink.gif'), _('Add Another')))
return mark_safe(''.join(output))
def get_context(self, name, value, attrs):
context = super(ApplicationConfigSelect, self).get_context(name, value, attrs)
context['widget']['script_init'] = self._build_script(name, value, context['widget']['attrs'])
return context
+129 -231
View File
@@ -3,25 +3,24 @@
from __future__ import unicode_literals
from django import forms
from django.contrib.sites.models import Site
from django.core.exceptions import PermissionDenied
from django.utils.encoding import smart_text
from django.core.exceptions import ValidationError
from django.db import transaction
from django.utils.text import slugify
from django.utils.translation import (
ugettext,
ugettext_lazy as _,
get_language,
)
from cms.api import generate_valid_slug
from cms.constants import PAGE_TYPES_ID
from cms.exceptions import NoPermissionsException
from cms.models import Page, Title
from cms.models.titlemodels import EmptyTitle
from cms.admin.forms import AddPageForm
from cms.plugin_pool import plugin_pool
from cms.utils import permissions
from cms.utils.compat.dj import is_installed
from cms.utils.urlutils import static_with_version
from cms.utils import get_current_site, permissions
from cms.utils.page import get_available_slug
from cms.utils.page_permissions import (
user_can_add_page,
user_can_add_subpage,
)
from cms.utils.conf import get_cms_setting
from cms.utils.urlutils import static_with_version
try:
# djangocms_text_ckeditor is not guaranteed to be available
@@ -31,142 +30,66 @@ except ImportError:
text_widget = forms.Textarea
def user_has_view_permission(user, page=None):
class SlugWidget(forms.widgets.TextInput):
"""
This code largely duplicates Page.has_view_permission(). We do this because
the source method requires a request object, which isn't appropriate in
this case. Fortunately, the source method (and its dependencies) use the
request object only to get the user object, when it isn't explicitly
provided and for caching permissions. We don't require caching here and we
can explicitly provide the user object.
"""
if not user:
return False
class FakeRequest(object):
pass
fake_request = FakeRequest()
can_see_unrestricted = get_cms_setting('PUBLIC_FOR') == 'all' or (
get_cms_setting('PUBLIC_FOR') == 'staff' and user.is_staff)
# Inherited and direct view permissions
is_restricted = bool(
permissions.get_any_page_view_permissions(fake_request, page))
if not is_restricted and can_see_unrestricted:
return True
elif not user.is_authenticated():
return False
if not is_restricted:
# a global permission was given to the request's user
if permissions.has_global_page_permission(
fake_request, page.site_id, user=user, can_view=True):
return True
else:
# a specific permission was granted to the request's user
if page.get_draft_object().has_generic_permission(
fake_request, "view", user=user):
return True
# The user has a normal django permission to view pages globally
opts = page._meta
codename = '%s.view_%s' % (opts.app_label, opts.object_name.lower())
return user.has_perm(codename)
class PageTypeSelect(forms.widgets.Select):
"""
Special widget for the page_type choice-field. This simply adds some JS for
hiding/showing the content field based on the selection of this select.
Special widget for the slug field that requires Title field to be there.
Adds the js for the slugifying.
"""
class Media:
js = (
'cms/js/modules/jquery.noconflict.pre.js',
'cms/js/dist/bundle.admin.base.min.js',
'cms/js/modules/cms.base.js',
'cms/js/widgets/wizard.pagetypeselect.js',
'cms/js/modules/jquery.noconflict.post.js',
'admin/js/urlify.js',
static_with_version('cms/js/dist/bundle.forms.slugwidget.min.js'),
)
js = tuple(map(static_with_version, js))
class CreateCMSPageForm(AddPageForm):
page = None
sub_page_form = False
# Field overrides
menu_title = None
page_title = None
meta_description = None
class BaseCMSPageForm(forms.Form):
title = forms.CharField(
label=_(u'Title'), max_length=255,
help_text=_(u"Provide a title for the new page."))
slug = forms.SlugField(
label=_(u'Slug'), max_length=255, required=False,
help_text=_(u"Leave empty for automatic slug, or override as required.")
)
page_type = forms.ChoiceField(
label=_(u'Page type'), required=False, widget=PageTypeSelect())
content = forms.CharField(
label=_(u'Content'), widget=text_widget, required=False,
help_text=_(u"Optional. If supplied, will be automatically added "
u"within a new text plugin."))
u"within a new text plugin.")
)
def __init__(self, instance=None, *args, **kwargs):
# Expect instance argument here, as we have to accept some of the
# ModelForm __init__() arguments here for the ModelFormMixin cbv
self.instance = instance
super(BaseCMSPageForm, self).__init__(*args, **kwargs)
class Media:
js = (
# This simply adds some JS for
# hiding/showing the content field based on the selection of this select.
'cms/js/widgets/wizard.pagetypeselect.js',
)
if self.page:
site = self.page.site_id
else:
site = Site.objects.get_current()
# Either populate, or remove the page_type field
if 'page_type' in self.fields:
root = Page.objects.filter(publisher_is_draft=True,
reverse_id=PAGE_TYPES_ID,
site=site).first()
if root:
page_types = root.get_descendants()
else:
page_types = Page.objects.none()
if root and page_types:
# Set the choicefield's choices to the various page_types
language = get_language()
type_ids = page_types.values_list('pk', flat=True)
titles = Title.objects.filter(page__in=type_ids,
language=language)
choices = [('', '---------')]
for title in titles:
choices.append((title.page_id, title.title))
self.fields['page_type'].choices = choices
else:
# There are no page_types, so don't bother the user with an
# empty choice field.
del self.fields['page_type']
class CreateCMSPageForm(BaseCMSPageForm):
def __init__(self, *args, **kwargs):
self._site = get_current_site()
self._user = self.user
self._language = self.language_code
super(CreateCMSPageForm, self).__init__(*args, **kwargs)
self.fields['title'].help_text = _(u"Provide a title for the new page.")
self.fields['slug'].required = False
self.fields['slug'].widget = SlugWidget()
self.fields['slug'].help_text = _(u"Leave empty for automatic slug, or override as required.")
@staticmethod
def create_page_titles(page, title, languages):
# Import here due to potential circular dependency issues
from cms.api import create_title
for language in languages:
title_obj = page.get_title_obj(language=language, fallback=False)
if isinstance(title_obj, EmptyTitle):
create_title(language, title, page)
@staticmethod
def get_first_placeholder(page):
def get_placeholder(page, slot=None):
"""
Returns the first editable, non-static placeholder or None.
Returns the named placeholder or, if no «slot» provided, the first
editable, non-static placeholder or None.
"""
for placeholder in page.get_placeholders():
if not placeholder.is_static and placeholder.is_editable:
return placeholder
else:
return None
placeholders = page.get_placeholders()
if slot:
placeholders = placeholders.filter(slot=slot)
for ph in placeholders:
if not ph.is_static and ph.is_editable:
return ph
return None
def clean(self):
"""
@@ -174,129 +97,104 @@ class CreateCMSPageForm(BaseCMSPageForm):
`title` produces a valid slug.
:return:
"""
cleaned_data = super(CreateCMSPageForm, self).clean()
data = self.cleaned_data
slug = cleaned_data.get("slug")
sub_page = cleaned_data.get("sub_page")
title = cleaned_data.get("title")
if self._errors:
return data
if self.page:
if sub_page:
parent = self.page
else:
parent = self.page.parent
slug = data.get('slug') or slugify(data['title'])
parent_node = data.get('parent_node')
if parent_node:
base = parent_node.item.get_path(self._language)
path = u'%s/%s' % (base, slug) if base else slug
else:
parent = None
base = ''
path = slug
if slug:
starting_point = slug
elif title:
starting_point = title
else:
starting_point = _("page")
slug = generate_valid_slug(starting_point, parent, self.language_code)
if not slug:
data['slug'] = get_available_slug(self._site, path, self._language, suffix=None)
data['path'] = '%s/%s' % (base, data['slug']) if base else data['slug']
if not data['slug']:
raise forms.ValidationError("Please provide a valid slug.")
cleaned_data["slug"] = slug
return cleaned_data
def save(self, **kwargs):
from cms.api import create_page, add_plugin
from cms.utils.permissions import has_page_add_permission
return data
def clean_parent_node(self):
# Check to see if this user has permissions to make this page. We've
# already checked this when producing a list of wizard entries, but this
# is to prevent people from possible form-hacking.
if 'sub_page' in self.cleaned_data:
sub_page = self.cleaned_data['sub_page']
if self.page and self.sub_page_form:
# User is adding a page which will be a direct
# child of the current page.
parent_page = self.page
elif self.page and self.page.parent_page:
# User is adding a page which will be a right
# sibling to the current page.
parent_page = self.page.parent_page
else:
sub_page = False
parent_page = None
if self.page:
if sub_page:
parent = self.page
position = "last-child"
else:
parent = self.page.parent
position = "right"
if parent_page:
has_perm = user_can_add_subpage(self.user, target=parent_page)
else:
parent = None
position = "last-child"
has_perm = user_can_add_page(self.user)
# Before we do this, verify this user has perms to do so.
if not (self.user.is_superuser or
has_page_add_permission(self.user, self.page,
position=position,
site=self.page.site)):
raise NoPermissionsException(
_(u"User does not have permission to add page."))
if not has_perm:
message = ugettext('You don\'t have the permissions required to add a page.')
raise ValidationError(message)
return parent_page.node if parent_page else None
page = create_page(
title=self.cleaned_data['title'],
slug=self.cleaned_data['slug'],
template=get_cms_setting('WIZARD_DEFAULT_TEMPLATE'),
language=self.language_code,
created_by=smart_text(self.user),
parent=parent,
in_navigation=True,
published=False
)
def clean_slug(self):
# Don't let the PageAddForm validate this
# on the wizard it is not a required field
return self.cleaned_data['slug']
page_type = self.cleaned_data.get("page_type")
if page_type:
copy_target = Page.objects.filter(pk=page_type).first()
else:
copy_target = None
def get_template(self):
return get_cms_setting('PAGE_WIZARD_DEFAULT_TEMPLATE')
if copy_target:
# If the user selected a page type, copy that.
if not user_has_view_permission(self.user, copy_target):
raise PermissionDenied()
@transaction.atomic
def save(self, **kwargs):
from cms.api import add_plugin
# Copy page attributes
copy_target._copy_attributes(page, clean=True)
page.save()
new_page = super(CreateCMSPageForm, self).save(**kwargs)
# Copy contents (for each language)
for lang in copy_target.get_languages():
copy_target._copy_contents(page, lang)
if self.cleaned_data.get("page_type"):
return new_page
# Copy extensions
from cms.extensions import extension_pool
extension_pool.copy_extensions(copy_target, page)
parent_node = self.cleaned_data.get('parent_node')
else:
# If the user provided content, then use that instead.
content = self.cleaned_data.get('content')
plugin_type = get_cms_setting('WIZARD_CONTENT_PLUGIN')
plugin_body = get_cms_setting('WIZARD_CONTENT_PLUGIN_BODY')
if plugin_type in plugin_pool.plugins and plugin_body:
if content and permissions.has_plugin_permission(
self.user, plugin_type, "add"):
placeholder = self.get_first_placeholder(page)
if placeholder:
add_plugin(**{
'placeholder': placeholder,
'plugin_type': plugin_type,
'language': self.language_code,
plugin_body: content,
})
if parent_node and new_page.parent_page.is_page_type:
# the new page was created under a page-type page
# set the new page as a page-type too
new_page.update(
draft_only=True,
is_page_type=True,
in_navigation=False,
)
if is_installed('reversion'):
from cms.utils.helpers import make_revision_with_plugins
from cms.admin.pageadmin import INITIAL_COMMENT
from cms.utils.reversion_hacks import create_revision
# If the user provided content, then use that instead.
content = self.cleaned_data.get('content')
plugin_type = get_cms_setting('PAGE_WIZARD_CONTENT_PLUGIN')
plugin_body = get_cms_setting('PAGE_WIZARD_CONTENT_PLUGIN_BODY')
slot = get_cms_setting('PAGE_WIZARD_CONTENT_PLACEHOLDER')
with create_revision():
make_revision_with_plugins(
obj=page,
user=self.user,
message=ugettext(INITIAL_COMMENT),
)
return page
if plugin_type in plugin_pool.plugins and plugin_body:
if content and permissions.has_plugin_permission(
self.user, plugin_type, "add"):
new_page.rescan_placeholders()
placeholder = self.get_placeholder(new_page, slot=slot)
if placeholder:
opts = {
'placeholder': placeholder,
'plugin_type': plugin_type,
'language': self.language_code,
plugin_body: content,
}
add_plugin(**opts)
return new_page
class CreateCMSSubPageForm(CreateCMSPageForm):
sub_page = forms.BooleanField(initial=True, widget=forms.HiddenInput)
sub_page_form = True
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
-23
View File
@@ -1,23 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-05 10:16-0500\n"
"PO-Revision-Date: 2015-10-31 12:28+0000\n"
"Last-Translator: yakky <i.spalletti@nephila.it>\n"
"Language-Team: Afrikaans (http://www.transifex.com/divio/django-cms/language/af/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: af\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: static/cms/js/dist/bundle.admin.changeform.min.js:1
#: static/cms/js/modules/cms.changeform.js:75
msgid "Are you sure you want to change tabs without saving the page first?"
msgstr ""
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
+8 -7
View File
@@ -3,15 +3,18 @@
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Translators:
# Abdelkader Maarouf <dep2g2@gmail.com>, 2015
# Ahmed H <info@draco-003.com>, 2013
# Bashar Al-Abdulhadi, 2017
# Bashar Ghadanfar <10.tens@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
"Project-Id-Version: django CMS\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-05 10:16-0500\n"
"PO-Revision-Date: 2015-10-31 12:28+0000\n"
"Last-Translator: yakky <i.spalletti@nephila.it>\n"
"POT-Creation-Date: 2019-01-29 08:34+0100\n"
"PO-Revision-Date: 2018-01-11 16:38+0000\n"
"Last-Translator: Paulo Alvarado <paulo.alvarado@divio.ch>\n"
"Language-Team: Arabic (http://www.transifex.com/divio/django-cms/language/ar/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,7 +22,5 @@ msgstr ""
"Language: ar\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
#: static/cms/js/dist/bundle.admin.changeform.min.js:1
#: static/cms/js/modules/cms.changeform.js:75
msgid "Are you sure you want to change tabs without saving the page first?"
msgstr "هل أنت متأكد من الإنتقال الى jfويب أخر دون حفظ الصفحة أولاً؟"
msgstr "هل أنت متأكد من الإنتقال الى تبويب أخر دون حفظ الصفحة أولاً؟"
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
-23
View File
@@ -1,23 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-05 10:16-0500\n"
"PO-Revision-Date: 2015-10-31 12:28+0000\n"
"Last-Translator: yakky <i.spalletti@nephila.it>\n"
"Language-Team: Belarusian (http://www.transifex.com/divio/django-cms/language/be/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: be\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
#: static/cms/js/dist/bundle.admin.changeform.min.js:1
#: static/cms/js/modules/cms.changeform.js:75
msgid "Are you sure you want to change tabs without saving the page first?"
msgstr ""
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
+5 -6
View File
@@ -3,16 +3,17 @@
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Translators:
# Boris Chervenkov <office@sentido.bg>, 2012
# Boyko Amarov <boyko.amarov@gmail.com>, 2013
# suleyman <posta@suleymans.com>, 2011
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
"Project-Id-Version: django CMS\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-05 10:16-0500\n"
"PO-Revision-Date: 2015-10-31 12:28+0000\n"
"Last-Translator: yakky <i.spalletti@nephila.it>\n"
"POT-Creation-Date: 2019-01-29 08:34+0100\n"
"PO-Revision-Date: 2018-01-11 16:38+0000\n"
"Last-Translator: Paulo Alvarado <paulo.alvarado@divio.ch>\n"
"Language-Team: Bulgarian (http://www.transifex.com/divio/django-cms/language/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -20,7 +21,5 @@ msgstr ""
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: static/cms/js/dist/bundle.admin.changeform.min.js:1
#: static/cms/js/modules/cms.changeform.js:75
msgid "Are you sure you want to change tabs without saving the page first?"
msgstr "Наистина ли искате да промените раздели без първо да запазите страницата?"
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
+5 -6
View File
@@ -3,14 +3,15 @@
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Translators:
# Aniruddha Adhikary <aniruddha@adhikary.net>, 2013
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
"Project-Id-Version: django CMS\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-05 10:16-0500\n"
"PO-Revision-Date: 2015-10-31 12:28+0000\n"
"Last-Translator: yakky <i.spalletti@nephila.it>\n"
"POT-Creation-Date: 2019-01-29 08:34+0100\n"
"PO-Revision-Date: 2018-01-11 16:38+0000\n"
"Last-Translator: Paulo Alvarado <paulo.alvarado@divio.ch>\n"
"Language-Team: Bengali (http://www.transifex.com/divio/django-cms/language/bn/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -18,7 +19,5 @@ msgstr ""
"Language: bn\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: static/cms/js/dist/bundle.admin.changeform.min.js:1
#: static/cms/js/modules/cms.changeform.js:75
msgid "Are you sure you want to change tabs without saving the page first?"
msgstr "আপনি কি নিশ্চিত যে, আপনি পৃষ্ঠাটি সংরক্ষণ না করেই ট্যাব পরিবর্তন করতে চান?"
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
+5 -6
View File
@@ -3,14 +3,15 @@
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Translators:
# Roger Pons <rogerpons@gmail.com>, 2012,2015
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
"Project-Id-Version: django CMS\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-05 10:16-0500\n"
"PO-Revision-Date: 2015-10-31 12:28+0000\n"
"Last-Translator: yakky <i.spalletti@nephila.it>\n"
"POT-Creation-Date: 2019-01-29 08:34+0100\n"
"PO-Revision-Date: 2018-01-11 16:38+0000\n"
"Last-Translator: Paulo Alvarado <paulo.alvarado@divio.ch>\n"
"Language-Team: Catalan (http://www.transifex.com/divio/django-cms/language/ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -18,7 +19,5 @@ msgstr ""
"Language: ca\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: static/cms/js/dist/bundle.admin.changeform.min.js:1
#: static/cms/js/modules/cms.changeform.js:75
msgid "Are you sure you want to change tabs without saving the page first?"
msgstr "Esteu segur que voleu canviar de secció sense guardar la primera pàgina?"
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
-23
View File
@@ -1,23 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-05 10:16-0500\n"
"PO-Revision-Date: 2016-01-19 20:20+0000\n"
"Last-Translator: Martin Koistinen <mkoistinen@gmail.com>\n"
"Language-Team: Chinese (Mandarin) (http://www.transifex.com/divio/django-cms/language/cmn/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cmn\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: static/cms/js/dist/bundle.admin.changeform.min.js:1
#: static/cms/js/modules/cms.changeform.js:75
msgid "Are you sure you want to change tabs without saving the page first?"
msgstr ""
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
+7 -8
View File
@@ -3,24 +3,23 @@
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Jakub Dorňák <jdornak@redhat.com>, 2013
# Translators:
# Jakub Dorňák <jakub.dornak@misli.cz>, 2013
# xlu <xlu@seznam.cz>, 2013
# xlu <xlu@seznam.cz>, 2013
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
"Project-Id-Version: django CMS\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-05 10:16-0500\n"
"PO-Revision-Date: 2015-10-31 12:28+0000\n"
"Last-Translator: yakky <i.spalletti@nephila.it>\n"
"POT-Creation-Date: 2019-01-29 08:34+0100\n"
"PO-Revision-Date: 2018-01-11 16:38+0000\n"
"Last-Translator: Paulo Alvarado <paulo.alvarado@divio.ch>\n"
"Language-Team: Czech (http://www.transifex.com/divio/django-cms/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
#: static/cms/js/dist/bundle.admin.changeform.min.js:1
#: static/cms/js/modules/cms.changeform.js:75
msgid "Are you sure you want to change tabs without saving the page first?"
msgstr "Určitě chcete změnit záložku bez uložení změn?"
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
-23
View File
@@ -1,23 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-05 10:16-0500\n"
"PO-Revision-Date: 2015-10-31 12:28+0000\n"
"Last-Translator: yakky <i.spalletti@nephila.it>\n"
"Language-Team: Welsh (http://www.transifex.com/divio/django-cms/language/cy/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cy\n"
"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3;\n"
#: static/cms/js/dist/bundle.admin.changeform.min.js:1
#: static/cms/js/modules/cms.changeform.js:75
msgid "Are you sure you want to change tabs without saving the page first?"
msgstr ""
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
+5 -6
View File
@@ -3,16 +3,17 @@
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Translators:
# Kristian Øllegaard <kristian@oellegaard.com>, 2011
# Kristian Øllegaard <kristian@oellegaard.com>, 2011
# Kristian Øllegaard <kristian@oellegaard.com>, 2011
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
"Project-Id-Version: django CMS\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-05 10:16-0500\n"
"PO-Revision-Date: 2015-10-31 12:28+0000\n"
"Last-Translator: yakky <i.spalletti@nephila.it>\n"
"POT-Creation-Date: 2019-01-29 08:34+0100\n"
"PO-Revision-Date: 2018-01-11 16:38+0000\n"
"Last-Translator: Paulo Alvarado <paulo.alvarado@divio.ch>\n"
"Language-Team: Danish (http://www.transifex.com/divio/django-cms/language/da/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -20,7 +21,5 @@ msgstr ""
"Language: da\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: static/cms/js/dist/bundle.admin.changeform.min.js:1
#: static/cms/js/modules/cms.changeform.js:75
msgid "Are you sure you want to change tabs without saving the page first?"
msgstr "Er du sikker på du vil ændre tabs uden at gemme siden først?"
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
+5 -6
View File
@@ -3,16 +3,17 @@
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Translators:
# Jonas Obrist <me@ojii.ch>, 2011
# Michael P. Jung <michael.jung@terreon.de>, 2013
# Stefan T. Oertel <me@schneck.cc>, 2015
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
"Project-Id-Version: django CMS\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-05 10:16-0500\n"
"PO-Revision-Date: 2015-10-31 12:28+0000\n"
"Last-Translator: yakky <i.spalletti@nephila.it>\n"
"POT-Creation-Date: 2019-01-29 08:34+0100\n"
"PO-Revision-Date: 2018-01-11 16:38+0000\n"
"Last-Translator: Paulo Alvarado <paulo.alvarado@divio.ch>\n"
"Language-Team: German (http://www.transifex.com/divio/django-cms/language/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -20,7 +21,5 @@ msgstr ""
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: static/cms/js/dist/bundle.admin.changeform.min.js:1
#: static/cms/js/modules/cms.changeform.js:75
msgid "Are you sure you want to change tabs without saving the page first?"
msgstr "Sind Sie sicher Sie wollen die Sprache ändern ohne vorher zu speichern?"
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More