tags:

views:

188

answers:

2

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!

+1  A: 

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 :)

luc
Hi luc thanks for the answer. Can you speak more about South? I see it's version 0.7. Are there gotchas? Is it worth looking at it this weekend or is it easy enough to add it later (and manually migrate schema in the meantime) ?
delusionalweekendwarrior
@delusionalweekendwarrior : I've edited the post with more info about south. I hope it will help. I would be interested to get your feedback on django after the week-end.
luc
+3  A: 

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.

Daniel Roseman
I appreciate the advice but I think you skipped the first three words of my post? :-)
delusionalweekendwarrior
Sorry, I focused on the fact that you said you were translating a PHP app...
Daniel Roseman