Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integrate tenca code into myHPI #621

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

integrate tenca code into myHPI #621

wants to merge 3 commits into from

Conversation

jeriox
Copy link
Contributor

@jeriox jeriox commented Sep 10, 2024

Because of better maintainability and expandability, we wanted to integrate the tenca code into myHPI.

ToDo:

  • create view that serves templates
  • move tests
  • do actual testing with mailman

@jeriox jeriox added [T] refactor mailing lists Concerning tenca / mailing list management labels Sep 10, 2024
@frcroth
Copy link
Contributor

frcroth commented Sep 11, 2024

Would an alternative be to move/fork tenca to the FSR org? Keeping this project small was one of the design goals at the beginning IIRC

@lukasrad02
Copy link
Contributor

The rationale behind this decision was that it is cumbersome to apply changes in two repos that depend on each other if there is no need to separate the code. tenca is a very specialized library and most likely nobody but us is using it. So there is no actual benefit from publishing it as a separate library.

Adding a new feature to our mailing lists (for example #582 that I did recently) currently requires you to set up an editable installation of tenca in you venv, apply your changes to the tenca and myHPI source, then have your changes at tenca reviewed, wait for a new tenca version to be released, until you can finally submit a ready-to-merge PR to myHPI with the new tenca version in the dependencies. Including tenca in the myHPI source tree makes this much easier.

@jeriox jeriox marked this pull request as ready for review September 13, 2024 10:05
invite_link=self.build_invite_link(),
web_ui=urllib.parse.urljoin(settings.GET_SITE_URL(), reverse("tenca_dashboard"))
)
self.list.set_template(mailman_template_name, urllib.parse.urljoin(settings.SITE_URL, reverse("tenca_django:mailman_template", kwargs={'template_name': tenca_template_name})))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lukasrad02 this probably needs the template_args joined in, but I don't understand what the resulting URL has to look like

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, the template_args are query parameters. However, mailman does not care about the URL format, so using a path-structure (e. g. …/<fqdn-listname>/<action-link>/…) or anything else would be okay, too. Old template links will break anyways and we have to change them all (as they point to localhost:8080 and we're moving the templateserver to myhpi.de), so changing the URL format would not cause any additional effort.

Instead of inserting fqdn_listname into the domain on our own, we could also use the mailman placeholder $listname (https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/templates.html#url-placeholders).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mailing lists Concerning tenca / mailing list management [T] refactor
Development

Successfully merging this pull request may close these issues.

4 participants