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

Remove hardcoded URLs from (mail/bot) templates #97

Open
stefan2904 opened this issue Aug 24, 2016 · 4 comments
Open

Remove hardcoded URLs from (mail/bot) templates #97

stefan2904 opened this issue Aug 24, 2016 · 4 comments

Comments

@stefan2904
Copy link
Member

At the moment, there are many hardcoded "weilsumwasgeht.at URLs in the mailtemplates (in templates/emails).

Consider replacing all hardcoded URLs by calls to Django's url tag (or a own tag). In addition, set global SITE_URL in settings.py and use to build urls in templates.
Also, remove hardcoded value from utils.make_absolute_url().

Quickfix: replace all hardcoded URLs by new hardcoded URLs ...

@stefan2904
Copy link
Member Author

(This is necessary since we probably move the app from weilsumwasgeht.at to mitmachen.vdb.at. Furthermore, it should be able to redeploy it to other hosts without changing all the templates.)

@benfreu
Copy link
Contributor

benfreu commented Aug 25, 2016

Please be careful with utils.make_absolute_url()

It's called from email templates that get generated outside a request context so it can't use Django's own url generation function. make_absolute_url needs a hard coded value, but it should indeed be moved to the settings, true.

@stefan2904
Copy link
Member Author

@benfreu jep, deswegen wollen wir die Funktion auch verwenden und nicht ändern. (Bis aufs verschieben von der Konstante).

@stefan2904
Copy link
Member Author

stefan2904 commented Aug 25, 2016

🚩 🔝🔜
This issue is now even more important, since we deployed on the new domain today which broke all URLs in mails ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants