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 bother 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.