Skip to content

Commit 66b3f0c

Browse files
committed
Merge branch 'release/6.1.0'
2 parents bced219 + 431303b commit 66b3f0c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+444
-239
lines changed

.github/workflows/main.yml

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,48 @@ jobs:
99
matrix:
1010
python-version: ["3.7", "3.8", "3.9", "3.10"]
1111
wagtail-version:
12-
- 2.11.8
13-
- 2.13.5
14-
- 2.14.2
15-
- 2.15.1
12+
#- 2.14.2 (not supported due to issues with migrations)
13+
- 2.15.4
14+
- 2.16.1
15+
services:
16+
postgres:
17+
image: postgis/postgis:12-2.5
18+
env:
19+
POSTGRES_PASSWORD: postgres
20+
POSTGRES_USER: postgres
21+
POSTGRES_DB: postgres
22+
ports:
23+
- 5432:5432
24+
options: >-
25+
--health-cmd pg_isready
26+
--health-interval 10s
27+
--health-timeout 5s
28+
--health-retries 5
1629
steps:
17-
- uses: actions/checkout@v2
18-
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v2
20-
with:
21-
python-version: ${{ matrix.python-version }}
22-
- name: Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
pip install -r requirements/tests.txt
26-
pip install -q wagtail==${{ matrix.wagtail-version }}
27-
- name: Run tests
28-
run: |
29-
python runtests.py
30+
- uses: actions/checkout@v2
31+
- name: Set up Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v2
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
- name: Install dependencies
36+
run: |
37+
set -xe
38+
sudo apt-get install gdal-bin libgdal-dev
39+
python -m pip install --upgrade pip
40+
pip install .[test]
41+
pip install psycopg2-binary>=2.9.3
42+
- name: Install wagtail ${{ matrix.wagtail-version }}
43+
run: pip install wagtail==${{ matrix.wagtail-version }}
44+
- name: Run tests
45+
run: |
46+
pytest
47+
env:
48+
DATABASE_NAME: postgres
49+
DATABASE_USER: postgres
50+
DATABASE_PASSWORD: postgres
51+
DATABASE_HOST: localhost
52+
DATABASE_PORT: 5432
53+
GOOGLE_MAPS_V3_APIKEY: X
3054

3155
lint-black:
3256
runs-on: ubuntu-latest

.gitignore

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ venv*
4949
# Editor
5050
.idea
5151

52-
example/wagtailgeowidget
53-
example/wagtail
54-
example/wagtail-2.0b1
52+
# Docker
53+
web.env
54+
55+
# Static
56+
tests/static/*
57+
tests/media/*
58+
!tests/static/.gitkeep
59+
!tests/media/.gitkeep

CHANGELOG.md

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,70 @@
11
# Changelog
22

3-
## 6.0.0 (2022.02.06)
3+
## [6.1.0] - 2022.02.20
44

5+
### Added
6+
- Add geocoding support for Mapbox (Martin Sandström)
7+
- Add Wagtail 2.16 support
8+
9+
### Fixed
10+
- Fix: Replace ugettext with gettext (@mariusboe)
11+
- Fix: Add documentation on leaflet settings (Martin Sandström)
12+
- Fix: Replace test runniner with pytest
13+
- Fix: Drop duplicated tests from wagtailgeowidget/tests
14+
15+
16+
## [6.0.0] - 2022.02.06
17+
18+
### Added
519
- Add support for Leaflet with LeafletPanel/LeafletBlock (Martin Sandström)
620
- Add standalone block and panel for GoogleMaps (Martin Sandström)
7-
- Deprecate GeoPanel, GeoBlock and GeoWidget in favour of GoogleMapsPanel, GoogleMapsBlock and GoogleMapsWidget (Martin Sandström)
821
- Add panel for address field (Martin Sandström)
922
- Add geocoding support for Nominatim (Martin Sandström)
1023
- Add telepath to widgets (Martin Sandström)
11-
- Drop support for Wagtail < 2.14 (Martin Sandström)
24+
25+
### Changed
26+
- Deprecate GeoPanel, GeoBlock and GeoWidget in favour of GoogleMapsPanel, GoogleMapsBlock and GoogleMapsWidget (Martin Sandström)
1227
- Add Swedish translations (Martin Sandströms)
28+
29+
### Fixed
1330
- Fix: Disable form submit on latlang field enter (Martin Sandström)
1431
- Fix: Apply prettier formatting to all js (Martin Sandström)
1532

16-
**Note: Upgrading from 5 to 6**
33+
### Removed
34+
- Drop support for Wagtail < 2.14 (Martin Sandström)
35+
36+
### Note: Upgrading from 5 to 6
1737

1838
- Replace `GeoPanel` with `GoogleMapsPanel`
1939
- Replace `GeoBlock` with `GoogleMapsBlock`
2040
- Replace `FieldPanel('address')` with `GeoAddressPanel("address", geocoder=geocoders.GOOGLE_MAPS)`
2141

2242

23-
## 5.3.0 (2022.01.05)
43+
## [5.3.0] - 2022.01.05
2444

45+
### Added
2546
- Add persistant and user editable zoom for map widget (Martin Sandström)
2647
- Enable loading Google Maps API key dynamically (Martin Sandström)
2748
- Make it possible to hide latlng field for GeoBlock (@vladox)
49+
50+
### Fixed
2851
- Fix: Solve issue with address not working streamfield in Wagtail 1.13+ (@vladox)
2952
- Fix: Drop six dependency (Martin Sandström)
3053

3154

32-
## 5.2.0 (2022.01.04)
55+
## [5.2.0] - 2022.01.04
3356

57+
### Removed
3458
- Drop support for Python 3.6
3559
- Drop support for EOL Wagtail
3660

3761

38-
## 5.1.0 (2020.11.21)
62+
## [5.1.0] - 2020.11.21
3963

64+
### Added
4065
- Implement setting for leaving location field empty (Andreas Bernacca)
66+
67+
### Fixed
4168
- Update docs for services that needs to be activated (Timothy Allen)
4269
- Fix: Move CI from Travis to Github Actions (Martin Sandström)
4370

example/Dockerfile renamed to Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ RUN apt-get update \
1818
&& rm -rf /var/lib/apt/lists/*
1919

2020
RUN pip install --upgrade pip \
21-
&& pip install -r $REQUIREMENTS --no-cache-dir \
21+
&& pip install -e .[test] --no-cache-dir \
22+
&& pip install psycopg2-binary==2.9.3 \
2223
&& pip install ipython \
2324
&& pip install pywatchman
2425

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
include README.md LICENSE requirements/install.txt requirements/tests.txt
22
recursive-include wagtailgeowidget/static *
33
recursive-include wagtailgeowidget/locale *
4-
prune example*
4+
prune tests* manage.py

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
init:
2+
cp web.example.env web.env
3+
docker-compose up

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ Wagtail-Geo-Widget is the complete map solution for your Wagtail site.
99

1010
## Features
1111

12-
- Supports Google Maps or any title provider supported by Leaflet (such as Open Street Map or Mapbox)
12+
- Supports Google Maps or any tile provider supported by Leaflet (such as Open Street Map or Mapbox)
1313
- Real spatial support (with GeoDjango and PointField)
1414
- Storing coordinates as strings (for no-GeoDjango setups)
1515
- StreamField integration
16-
- Searching with geoencoding
16+
- Searching with geocoding (supports Google Geocoding, Nominatim and Mapbox)
1717
- Inline panel support
1818
- Optional address search field
1919
- Language support

docs/adding-to-a-page.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ The address field are optional and needs to be added separately, the panel accep
8686

8787
```python
8888
from django.db import models
89-
from django.utils.translation import ugettext as _
89+
from django.utils.translation import gettext as _
9090
from wagtail.admin.edit_handlers import FieldPanel, MultiFieldPanel
9191
from wagtailgeowidget import geocoders
9292
from wagtailgeowidget.edit_handlers import GeoAddressPanel, GoogleMapsPanel
@@ -112,7 +112,7 @@ The zoom field works in a similar way as the address field and needs to be added
112112

113113
```python
114114
from django.db import models
115-
from django.utils.translation import ugettext as _
115+
from django.utils.translation import gettext as _
116116
from wagtail.admin.edit_handlers import FieldPanel, MultiFieldPanel
117117
from wagtailgeowidget.edit_handlers import GoogleMapsPanel
118118

0 commit comments

Comments
 (0)