You are viewing a read-only archive of the Blogs.Harvard network. Learn more.

She’s Geeky: Django

January 29th, 2011

Led by Vicky Tuite  @Vixter55

Django is to Python what Rails is to Ruby.  Models correspond to models in rails.  And templates are like views.  The View File is your Controller.  A Form is like a Helper.

MVT => Models Views Templates

urls.py is your routes file and settings.py maps to enviornment.rb

Objects is a “manager” which allows you the ability to call methods on the model.  This is where you do your work because you can’t do calculations in the template (rails view).

User clicks on a url

url file directs you to view

the view displays the template

the form is optional and helps you display data in the template

Django makes it easy to share objects(models, templates, etc) across various projects.

Admin comes for free when you set up a Django app.  These screens show you model data for free.  Kinda like scaffold.

Entry Filed under: Professional,She's Geeky

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>