Skip to content

Update and fix roomlinks #88

Merged
merged 15 commits into from
Aug 17, 2020
Merged

Update and fix roomlinks #88

merged 15 commits into from
Aug 17, 2020

Conversation

donald
Copy link
Member

@donald donald commented Aug 13, 2020

  • Update Django and Wagtail and other libraries to current version
  • Allow more characters for room numbers
  • If a room field contains multiple room numbers, convert them into individual room links
  • Create usable links for seminar rooms specified like "SR 1"

Update python requirements with

    (cd requirements; rm *.txt; make)

This updates Django from version 2.2.9 to version 3.1.
This updates Wagtail from version 2.7.1 to version 2.10.

The virtual environment can be update to the specified versions with

    pip-sync requirements/dev.txt
Update our library patches to the package versions installed by the
previous commit.

The patches should be applied from the virtual environment directory with

    for f in ../patches/*; do patch -p1 < $f; done
Wagtails permission_required has been moved from wagtail.admin.utils to
wagtail.admin.auth [1]. Use new package name.

[1] https://docs.wagtail.io/en/stable/releases/2.7.html.
Create migrations with

    ./manage.py makemigrations
The SiteMiddlware is obsoleted [1]. Use wagtail_site tag instead.

[1] https://docs.wagtail.io/en/stable/releases/2.9.html
Increase the width of the room field in the Contact model. This was
requested by user.
Create migration with

    ./manage.py makemigrations
Add a filter which greps room patterns in a string and converts them to
a link to our twiki room map.
Replace usage of the room_links tag with the new add_room_links filter.
Remove the now unused tag room_link and the function get_room_link which
is only used by this tag.
For "events", room specifications like "SR 1" are often used. However,
this is not a valid room numer as expected by the twiki map.

Translate "SR [1234]" to correct room numbers for the link target.
Remove invalid setting for the SMTP server.

Note: These lines have already been commented out on our production
server.
@donald donald force-pushed the update-and-fix-roomlinks branch 2 times, most recently from a430ed5 to f17efb5 Compare August 14, 2020 21:21
Wagtail is changing its search API [1]. There is a documentation PR pending at [2].

Our automplete hack - patch to make Wagtail Snippet Chooser use
.autocomplete() instead of .search() - stopped working after the Wagtail
update for the Contact snippet. Use wagtail.search.index.AutocompleteField
in Contact model to specify, which fields should be indexed for autocompletion.

[1] https://github.com/wagtail/wagtail/issues/4937
[2] https://github.com/wagtail/wagtail/issues/4938
@donald donald merged commit 4018fc7 into master Aug 17, 2020
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant