我尝试了链接上的指示,以使用特定于我的网站的模板替换默认应用程序模板。具体来说,我设置了以下文件结构:project_specific_app-templates--userena---files_with_same_names_as_userena_templates.htmlTEMPLATE_DIRS:TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths.)但是,当我尝试更改“ files_with_same_name_as_userena_templates.html”的内容并重新启动Web服务器时,网页不会更改我还忘记了什么?解决方案:在我的project / settings.py中查看TEMPLATE_DIRS并将其更改为/ absolute / path / to / project / specific / app / templates /之后,我的自定义模板起作用了。
添加回答
举报
0/150
提交
取消