Django是否有足够的脚手架?(点点Ruby on Rails) [英] Is there any adequate scaffolding for Django? (à la Ruby on Rails)

查看:59
本文介绍了Django是否有足够的脚手架?(点点Ruby on Rails)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于Django,是否有足够的脚手架?

Is there any adequate scaffolding for Django?

它可能在新发布的1.3版本中,但是我还没有找到它.

It may be in the newly released 1.3 version, but I haven't found it yet.

推荐答案

我已经找到并没有找到与Django类似Rails Generate命令的东西.Django有一些不同的哲学.它为您提供了使工作变得轻松的工具,但实际上并没有为您做到(管理界面除外).在宏伟的计划中,我认为这是可以的.当我使用Rails的脚手架时,我不能经常保留很多自动生成的东西.当我这样做时,django管理界面也可能会起作用,并为我提供更多功能.

I've looked and not yet found something for Django quite like the Rails Generate command. Django has a bit of a different philosophy. It gives you tools to make doing things easily but doesn't actually do it for you (except the admin interface). In the grand scheme of things, I think this is OK. When I use rails' scaffolding I'm not able to often keep much of the auto-generated stuff. When I do, the django admin interface would probably also have worked and given me more functionality.

相反,我建议您阅读 Django教程第4步,其中介绍了通用视图,然后 Django书的第7章介绍了表单.您必须对第7章有耐心,因为作者认为您想在他们教您简单方法之前先了解艰辛的细节.(尝试在页面上搜索短语django.forms)

Instead, what I suggest is reading through the Django tutorial step 4, which introduces generic views, and then chapter 7 of the Django book which introduces forms. You have to be patient on chapter 7 because the authors think you want to know the minute details of the hard-way before they teach you the easy way. (try searching the page for the phrase django.forms)

最后,在rails和django之间要做的工作量是相等的,而对于Django来说可能要少一些.但是,您没有一个命令可以自动为您提供样板代码以用作基础.

In the end the amount of work you have to do between rails and django is equivalent, and maybe slightly less with Django. However you don't have one command to automatically give you boilerplate code to use as a foundation.

这篇关于Django是否有足够的脚手架?(点点Ruby on Rails)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆