简体   繁体   English

Django上的模板

[英]Templates on Django

I'm newbie on web dev and chose Django to start, in my application I need sign up and sign in freatures, searching i've found about django-registration: 我是web dev的新手,并选择Django开始,在我的应用程序中,我需要注册并登录freatures,搜索我发现django-registration:

Link to repo 回购回购

The setting file and url are already configured, but I have to make the templates for login - I got some templates for test - but I have no idea where to put it, if I have to create a new app ("... startnewapp registration") or just create a directory for templates somewhere. 设置文件和网址已经配置好了,但我必须为登录制作模板 - 我有一些模板供测试 - 但是我不知道在哪里放置它,如果我必须创建一个新的应用程序(“... startnewapp注册“)或只是在某处创建模板目录。 Can you help me? 你能帮助我吗?

you dont really need an external app for just a registration. 你真的不需要一个外部应用程序只需注册。 it is simply one urlconf and one view. 它只是一个urlconf和一个视图。

but the most important thing for you now is to go through the tutorial , because tutorial tells you what to put where exactly.. and this cannot be explained here in 3 lines of text 但对你来说最重要的事情就是完成教程 ,因为教程会告诉你究竟要放在哪里......这里不能用3行文字来解释

Especially at the beginning it is very helpful to see an example where to put the things together. 特别是在开始时,查看将事物放在一起的示例非常有用。 I developed a django-skeleton, which basically bootstraps a Django installation and boosts starting a new project. 我开发了一个django-skeleton,它基本上引导了一个Django安装,并促进了一个新项目的启动。 I also created views to use the builtin authentication module of Django for registration and to login: https://github.com/n2o/django-skeleton/ 我还创建了一些视图来使用Django的内置身份验证模块进行注册和登录: https//github.com/n2o/django-skeleton/

In this case I created a separate login app to modify the views and create my own templates. 在这种情况下,我创建了一个单独的登录应用程序来修改视图并创建自己的模板。

This is not the easiest way to modify existing templates, but it fulfills all of my requirements. 这不是修改现有模板的最简单方法,但它满足了我的所有要求。

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

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