简体   繁体   English

即使更改了django_site域和名称,Django域仍使用example.com

[英]Django domain is using example.com even after changing django_site domain and name

I'm using the registration/password_reset.html template which has 我正在使用registration / password_reset.html模板,该模板具有

{{ domain }}

This always returns "example.com". 这总是返回“ example.com”。 I've changed my db django_site domain and name to something like "test.com". 我已将db django_site域和名称更改为“ test.com”之类的名称。 On local testing it works, but in a live environment it doesn't. 在本地测试中,它可以工作,但在实际环境中却不能。

I'm really confused by this, I assume I'm missing something obvious - any suggestions? 我对此感到非常困惑,我想我缺少明显的东西-有什么建议吗?

my problem was this : each user could be assigned to different accounts, so i had to create an instance inside Sites for each account with the correct web address 我的问题是:每个用户都可以分配到不同的帐户,所以我必须在Sites中为每个具有正确网址的帐户创建一个实例

hope this makes sense 希望这有意义

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Django Admin的“网站视图”指向example.com而不是我的域名 - Django Admin's “view on site” points to example.com instead of my domain Django - Site.objects.get_current().domain 返回 example.com - Django - Site.objects.get_current().domain returns example.com 使用django子域,它说localhost不属于域example.com - Using django subdomain and it says localhost does not belong to the domain example.com {{ domain }} 在本地电脑上变成 example.com - {{ domain }} becomes example.com on local pc dreamhost + django:无法使用网站框架获取域名 - dreamhost+django: cannot get domain name using site framework 什么是django中的Site.objects.get_current()类型? 它返回 <SIte: example.com> 。 我需要序列化它 - What is type is Site.objects.get_current() in django ; it returns <SIte: example.com>. I need to serialize it 一台服务器,相同的域,不同的应用程序(example.com/&example.com/tickets)? - one server, same domain, different apps (example.com/ & example.com/tickets )? Django:关系“django_site”不存在 - Django: relation "django_site" does not exist ProgrammingError:关系“django_site”不存在 - ProgrammingError: relation “django_site” does not exist 迁移时不存在“django_site” - “django_site” does not exist on migration
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM