开发者

Django 1.2 crash course needed

I know Python but I've never used Django.

What 开发者_运维知识库do I need to know about Django 1.2 to port my typical PHP CRUD web application in one weekend? (Yes I've read Joel Spolsky's Netscape article :-))

I'm reading this tutorial right now and it's excellent. I'm already playing around with inspectdb to generate my models from the existing schema.

I'm planning to use the following this weekend:

  • Fragment caching
  • Static asset versioning (for far future expires)
  • Schema migrations (or whatever they're called in Django)
  • Auto-admin (and customize it later)
  • The test framework
  • Skins
  • ...other stuff I probably don't know about yet

I'm familiar with all these concepts in other languages/frameworks, except for the ORM which I've never used. I know SQL pretty well though.

Any links, sage bits of advice, gotchas, stuff not mentioned in the (excellent) tutorial/docs, or stuff that is mentioned but warrants repeating == very welcome. Thanks!


The django docs is very good and you should find the answers to most of your questions http://docs.djangoproject.com/en/1.2/

You can google it easily but make sure that you are on the doc pages of django 1.2.

For schema migration, I recommed to look at south http://south.aeracode.org/

In my opinion south is a must-have feature for a website. It is quite easy and fast to get started. The tutorial on their website should help you. I think that it will be a big help if you plan to make some schema migration in the week-end. If not you can wait a little. I've never used south on a db generated by inspectdb but I guess that it should work ok :)

Have a nice week-end :)


My best piece of advice: learn Python.

Django is wonderful, but at it's root it's just Python. You'll be able to get a long way just following the documentation and tutorials you find around the web, but you won't really benefit as much as possible if you try and use your PHP idioms instead of Pythonic ones.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜