-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
295 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,67 @@ | ||
# Changelog | ||
|
||
## 0.3.0 | ||
## [Unreleased] | ||
### Added | ||
### Changed | ||
### Fixed | ||
### Removed | ||
|
||
## [1.0.0] - 2023-03-23 | ||
### Added | ||
- Add delete_stray_pages command for clearing stray pages in trash can (@marteinn) | ||
- Add support for moving deleted pages to trash can when using bulk actions (@rinti) | ||
|
||
### Fixed | ||
- Add Wagtail 4.1 and 4.2 support (@marteinn) | ||
- Add python 3.11 support (@marteinn) | ||
- Remove wagtailadmin.W003 warning in development (@marteinn) | ||
- Fix incorrect test alias in docker-entrypoint.sh (@marteinn) | ||
- Fix bug where pages deleted from trashcan was not properly deleted (@marteinn) | ||
- Fix bug where two pages with the same slug couldn't be in the trash can at the same time (@rinti) | ||
|
||
### Removed | ||
- Drop Wagtail 2 support | ||
- Drop Wagtail 3 support | ||
|
||
## Upgrade considerations | ||
- Due to a bug in delete pages are not properly removed, this was fixed in 1.0.0. Run `python manage.py delete_stray_pages` to fix this | ||
|
||
## [0.3.0] - 2022-07-29 | ||
### Added | ||
- Add Wagtail 3.0 compatibility (Thanks @polesello!) | ||
- Add code and tests verifying urls gets preserved when moving pages (Andreas Bernacca) | ||
|
||
## 0.2.1 | ||
### Fixed | ||
- Add code and tests verifying urls gets preserved when moving pages (Andreas Bernacca) | ||
|
||
## [0.2.1] - 2022-02-13 | ||
### Added | ||
- Add Wagtail 2.16 compability (Andreas Bernacca) | ||
- Fix: Make datetime time zone aware (Martin Sandström) | ||
- Fix: Add custom text for when trash can is empty | ||
|
||
### Fixed | ||
- Make datetime time zone aware (Martin Sandström) | ||
- Add custom text for when trash can is empty | ||
|
||
## 0.2.0 | ||
|
||
## [0.2.0] - 2022-02-12 | ||
### Added | ||
- Add changelog (Andreas Bernacca) | ||
- Add translations (Alexandre Marinho) | ||
- Add spanish translations (Yamil Jaskolowsk) | ||
- Add swedish translations (Martin Sandström) | ||
- Drop Wagtail <2.14 support | ||
- Drop Python 3.5 and 3.6 support | ||
- Fix: Add CI/CD deployment (Martin Sandström) | ||
- Fix: Add Django 4.0 compability | ||
|
||
### Fixed | ||
- Add CI/CD deployment (Martin Sandström) | ||
- Add Django 4.0 compability | ||
|
||
## 0.1.1 | ||
### Removed | ||
- Drop Wagtail <2.14 support | ||
- Drop Python 3.5 and 3.6 support | ||
|
||
## [0.1.1] - 2021-06-09 | ||
### Fixed | ||
- Rename template directory from the legacy name `wagtail_recycle_bin` to `wagtail_trash`. (cspollar) | ||
|
||
|
||
## 0.1.0 | ||
## [0.1.0] | ||
|
||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
author="Andreas Bernacca", | ||
author_email="[email protected]", | ||
install_requires=[ | ||
"wagtail>=2.14", | ||
"wagtail>=4.1", | ||
], | ||
extras_require={ | ||
"testing": testing_extras, | ||
|
@@ -40,13 +40,13 @@ | |
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Framework :: Django", | ||
"Framework :: Django :: 2.2", | ||
"Framework :: Django :: 3.2", | ||
"Framework :: Django :: 4.0", | ||
"Framework :: Wagtail", | ||
"Framework :: Wagtail :: 2", | ||
"Framework :: Wagtail :: 3", | ||
"Framework :: Wagtail :: 4", | ||
"License :: OSI Approved :: MIT License", | ||
], | ||
project_urls={ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import wagtail.admin.urls | ||
import wagtail.core.urls | ||
from django.conf import settings | ||
from django.conf.urls.static import static | ||
from django.urls import include, re_path | ||
from wagtail import urls as wagtail_urls | ||
|
||
urlpatterns = [ | ||
re_path(r"^admin/", include(wagtail.admin.urls)), | ||
re_path(r"", include(wagtail.core.urls)), | ||
re_path(r"", include(wagtail_urls)), | ||
] | ||
|
||
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from django.core.management.base import BaseCommand | ||
|
||
from wagtail_trash.models import TrashCan, TrashCanPage | ||
|
||
|
||
class Command(BaseCommand): | ||
""" | ||
Delete stray pages from recycle bin(s) | ||
Example: | ||
./manage.py delete_stray_pages | ||
""" | ||
|
||
def handle(self, *args, **options): | ||
trash_can_pages = TrashCanPage.objects.all() | ||
num_deleted_pages = 0 | ||
for page in trash_can_pages: | ||
for child_page in page.get_children(): | ||
if TrashCan.objects.filter(page=child_page).exists(): | ||
continue | ||
|
||
child_page.delete() | ||
num_deleted_pages += 1 | ||
|
||
self.stdout.write("Deleted {} stray pages".format(num_deleted_pages)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.