Comments (7)
应该在templates下定义目录 IdentityView 即可。方法名为模板文件名。
from uliweb.
应该在templates下定义目录 IdentityView 即可
其实我的意思是能不能不默认使用View类名,比如给类加个 templatedir 变量什么的,因为可能会有一些以前的页面迁移进来,再批量改页面中链接什么的,比较麻烦,想自己指定 View 的模板子目录 。
虽然把 IdentityView
改成 identity
也能达到我的要求,但这样的类名咋看都不舒服。
from uliweb.
但是链接和模板没有关系啊?
如果自已管理模板子目录,就有可能造成不统一,虽然很灵活,但是别人在看代码时感觉还是不方便。比如已经约定了使用类名,结果有些就不是。当然这是一个设计问题和使用习惯问题。不过我还是不太理解这个需求的产生的原因。只是因为多了一个View不好吗?
from uliweb.
其实我个人感觉到不是能不能实现的问题,主要是实现获得的好处和代价有多大,如果一个功能使用很少,同时也只是一个习惯问题,我个人是不太想添加的。因为没有特别的提升,但同时増加了复杂性,理解上也有一点问题。
from uliweb.
因为没有特别的提升,但同时増加了复杂性
嗯,可以接受,那就这样用吧,慢慢就习惯了,我这里的修改量也不大。
from uliweb.
那就好。
from uliweb.
@greatghoul 你丫怎么都是如果呢...是如何啊!
from uliweb.
Related Issues (20)
- Refact makecmd command
- bad runserver -h option HOT 1
- AttributeError: 'instancemethod' object has no attribute '__rule_skip__' HOT 2
- uliweb load raise UnboundLocalError
- gevent 下的 race condition HOT 31
- 多数据库 engine = get_connection(engine_name='default') 有问题 HOT 1
- orm autocreat bug HOT 3
- 开发时运行uliweb runserver错误 HOT 2
- JSON类型的字段里不能存放中文 HOT 1
- application.template and get SyntaxError exception HOT 3
- support Posgresql JSONB column?
- Cannot set Form.errors['_']
- Javascript string issue because of string strip operation of uliweb template
- wrong directory name of setup.py generated by "uliweb makemodule" HOT 1
- _generate_etag will get exception with unicode filename which cannot encode by ascii
- try to use multiple database but get exception HOT 1
- Uliweb doesn't support oracle VARCHAR2
- request.POST.copy() 非安全線程?
- 执行uliweb syncdb报错 HOT 1
- Proposing a PR to fix a few small typos
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uliweb.