Git Product home page Git Product logo

Comments (7)

limodou avatar limodou commented on August 30, 2024

应该在templates下定义目录 IdentityView 即可。方法名为模板文件名。

from uliweb.

greatghoul avatar greatghoul commented on August 30, 2024

应该在templates下定义目录 IdentityView 即可

其实我的意思是能不能不默认使用View类名,比如给类加个 templatedir 变量什么的,因为可能会有一些以前的页面迁移进来,再批量改页面中链接什么的,比较麻烦,想自己指定 View 的模板子目录 。

虽然把 IdentityView 改成 identity 也能达到我的要求,但这样的类名咋看都不舒服。

from uliweb.

limodou avatar limodou commented on August 30, 2024

但是链接和模板没有关系啊?

如果自已管理模板子目录,就有可能造成不统一,虽然很灵活,但是别人在看代码时感觉还是不方便。比如已经约定了使用类名,结果有些就不是。当然这是一个设计问题和使用习惯问题。不过我还是不太理解这个需求的产生的原因。只是因为多了一个View不好吗?

from uliweb.

limodou avatar limodou commented on August 30, 2024

其实我个人感觉到不是能不能实现的问题,主要是实现获得的好处和代价有多大,如果一个功能使用很少,同时也只是一个习惯问题,我个人是不太想添加的。因为没有特别的提升,但同时増加了复杂性,理解上也有一点问题。

from uliweb.

greatghoul avatar greatghoul commented on August 30, 2024

因为没有特别的提升,但同时増加了复杂性

嗯,可以接受,那就这样用吧,慢慢就习惯了,我这里的修改量也不大。

from uliweb.

limodou avatar limodou commented on August 30, 2024

那就好。

from uliweb.

darth30joker avatar darth30joker commented on August 30, 2024

@greatghoul 你丫怎么都是如果呢...是如何啊!

from uliweb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.