Monday, October 13, 2008

Django From the Ground Up: Episode 12

with host Eric Florenzano

Bookmark and Share

In this episode, we first enable development media serving, and then we use jQuery and some of Django's built-in constructs to easily add AJAX-like capabilities to our site.

Time for my Soap Box

I strongly believe that a website should not depend on any client side scripting language for its basic functionality. Sure, it should provide a better experience if Javascript is enabled, but it should function completely if it's not available as well.

That's why I like the way that the jQuery Form Plugin works--you write your forms using your server-side library, and the plugin lets you hijack the request to do whatever you would like with it. This is not a new concept at all, but it's one that I think a lot of people still miss. What do you think? Should we care about whether a site works without Javascript?

  • Running Time: 15:31

Comments - 7 people have already said something. Join the discussion.

  • Björn said

    No comments yet?

    I'll have to complain then: first, the frame rate was a bit too low. You'd say something like "Like I did *here*" but before we can see where 'here' is you've already switched to another window. And there was no visible Ajax effect, as it had faded out and in again faster than the frame updated. As it were.

    Anyway, your screencasts remain fantastically enlightening. First the message stack that I didn't know about before, and now easy Ajax. This is sooooo much better than what I've been doing so far.

  • Milan Andric said

    I'm sure you guys are already on top of it, but just seconding Bjorn's comment. Frame rate is too slow in flv and there actually was no ajax effect in the video. Doh. According to mplayer the flv framerate is 5.000 fps. Might want to up that.

    Also if you can add a time field to the comment entries that would be nice. Because I don't know when Bjorn made his comment which would give me some sense on how annoying I'm being. ;)

    Great work. This is fabulous.

  • Hardtop said

    Thank you, thank you so much! Screencasts so useful for newbies as i am. And don't worry about blink effect have been missed - anyone can imagine, how it works.

  • Paul said

    Guy, nice site but horrible navigation. How do I find the screencast other than the last shown on the Screencasts page? I've managed to figure out all till the 3rd (just manually manipulation the URL), but can't find the 1st two.

  • Antonius said

    @Guy, yeah its a little tricky.... try searching for 'episode' in the search box... that seems to give a complete list

    Also, I've got tangental question.... Back in my earlier PHP days I used to use DB Designer to get a Visual Design view of MySql. Django, of course, had made the process of designing models much more literal, I suppose, however I would love to have a visual tool ~ good for communicating with other non-tech folk.

    Might the TWiD fellows know of something that is out there, i.e. could make a 'visual' representation of Django models?

  • Eric Florenzano said

    Antonius: Check out django-extensions http://code.google.com/p/django-command-extensions/ There's a command called graph_models that does *exactly* what you're looking for :)

    Re: Navigation. I've talked to Brian and Michael and they agree that there is work that needs to be done. I didn't code any of this site nor do I have access to the codebase, so it's really up to them to update the navigation.

    Re: the framerate. This was a problem on my end. I was experimenting with some settings when I exported this and ended up keeping the wrong file. Unfortunately a misplaced rm got rid of the good file since then, and this is all I have left :(

  • Spider84 said

    Can I get source code for this tutorial? I have some problem with including CSS to my Django project.