简体   繁体   English

如何为django-oauth-toolkit实现html视图?

[英]How can I implement html views for django-oauth-toolkit?

I am following the basic tutorial in Django OAuth Toolkit . 我正在遵循Django OAuth Toolkit中的基本教程。 Do I have to create the html files for the views (eg login.html, loggout.html)? 我是否必须为视图创建html文件(例如,login.html,loggout.html)? My thought is that there is a default "out of the box implementation" for these files. 我的想法是这些文件有一个默认的“开箱即用的实现”。

I get the following error when I try to access oauth2 urls: 尝试访问oauth2网址时出现以下错误:

django.template.loaders.app_directories.Loader: ...\lib\site-packages\django\contrib\admin\templates\registration\login.html (Source does not exist)
django.template.loaders.app_directories.Loader: ...\lib\site-packages\django\contrib\auth\templates\registration\login.html (Source does not exist)
django.template.loaders.app_directories.Loader: ...\lib\site-packages\rest_framework\templates\registration\login.html (Source does not exist)
django.template.loaders.app_directories.Loader: ...\lib\site-packages\oauth2_provider\templates\registration\login.html (Source does not exist)

it turns out that the documentation on the site is deprecated. 事实证明该站点文档已被弃用。 The updated documents have not been published to digital ocean. 更新的文档尚未发布到数字海洋。 But you can navigate them from github directly - view on github 但是您可以直接从github导航它们- 在github上查看

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM