hack4vdb / anthill

2 stars 1 forks source link

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

Open stefan2904 opened 8 years ago

stefan2904 commented 8 years ago

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 commented 8 years ago

(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 commented 8 years ago

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 commented 8 years ago

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

stefan2904 commented 8 years ago

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