开发者

How do I change the django-registration e-mail template "site" name?

开发者 https://www.devze.com 2023-04-06 09:57 出处:网络
The current setup ends up substituting example.com into the below code from the template. I want it to point to localhost:8000

The current setup ends up substituting example.com into the below code from the template. I want it to point to localhost:8000

Without hard coding this, where and how can I change the template so that the site is linked to my localhost?

Thank you for registering an account at {{ site.domain }}. To activate your registration, please visit the following page:

http://{{ site.domain }}{% url registration_activate activation_key %}

This page will expire in {{ expiration_days }} day{{ expiration_days|pluralize }}.


If you didn't register this account you can simply delete this email and we won't bothe开发者_Go百科r you again.


The site object in the template comes from the Django Site model. When you do a syncdb, it defaults automatically to example.com

If you login to Django's admin interface, you will find "Sites". Inside it, you will be able to change example.com to whatever you like.

How do I change the django-registration e-mail template "site" name?

0

精彩评论

暂无评论...
验证码 换一张
取 消