Another Software Engineer Another Technology Blog

  • Blog A
  • Linkblog
  • Photoblog
  • Trading
  • Candy
  • Gambling
  • DSO
  • HO
  • Technology
Blog Name
  • Home
  • Contact
  • Log in

Template Inheritance in Django (aka The Django equivalent of a Rails layout)

by David Orkin on Oct.06, 2009,under Python, Django, Ruby on Rails

Whew, I was worried there for a second. Coming for the rails world, Im very familar with layouts and partial templates, something that I thought was completely missing from Django but I am so happy to be proven wrong. Thankfully there is a rather simple way to do this using Template Inheritance which allows for a template to extend another template, and then, using their block syntax, overwrite portions of the template that its extending. Another classic example of why the term RTFM was coined in the first place. Ok, now I get back to work on launching that Django application I've been working on!

 

« Using Django to Serve Static Files in Development
Just Another Software Developer »
  • July 2010
    Sun Mon Tue Wed Thu Fri Sat
     << <   > >>
            1 2 3
    4 5 6 7 8 9 10
    11 12 13 14 15 16 17
    18 19 20 21 22 23 24
    25 26 27 28 29 30 31
  • Another Software Engineer Another Technology Blog

    • Recently
    • Archives
    • Categories
    • Latest comments
  • Search

  • Categories

    • All
    • Operating Systems
      • Ubuntu
        • 9.10 Karmic Koala
    • Programming Languages
      • Python
      • Ruby
    • Rants
    • Technology
      • PDF
    • Tutorials
    • Uncategorized
    • Web Application Frameworks
      • Django
      • Ruby on Rails
        • Capistrano
  • XML Feeds

    • Atom: Posts
    • RSS 2.0: Posts
    More on RSS
powered by b2evolution

A b2evolution port by JC John Sese Cuneta.

Theme: pixel and Sweet Icons by famfamfam.

Contact • Powered by b2evolution

Credits: skin makers • evoCore • vps hosting • François