Django有足够的脚手架吗? (一个Ruby on Rails) [英] Is there any adequate scaffolding for Django? (A la Ruby on Rails)

查看:112
本文介绍了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.

推荐答案

ve看起来还没有找到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天全站免登陆