-
Notifications
You must be signed in to change notification settings - Fork 11
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
base: main
Are you sure you want to change the base?
Conversation
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 |
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. |
myhpi/tenca_django/templates/mailman/unsubscription_message.html
Outdated
Show resolved
Hide resolved
myhpi/tenca_django/mailinglist.py
Outdated
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}))) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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).
The mailman templates are served as text/plain
Because of better maintainability and expandability, we wanted to integrate the tenca code into myHPI.
ToDo: