My very own mini-sprint

Perhaps in anticipation of next week’s sprint, or maybe due to just plain luck of the draw, I made major progress on three separate projects today. I feel tired, but exhilarated at the same time. If this is what a sprint feels like, I want to take part. Badly.

First, my dbsettings project just gained a comprehensive test suite, which means it’s finally in a complete condition. Unless somebody has major features or bugs, it’s done.

Second, I finally published my first crack at a patch for pluggable FileField backends. There’s no documentation yet, but if you’re interested in looking at some code, feel free. I also have backends in the works for S3, MogileFS, WebDAV and even SVN!

Lastly, in the completely-out-of-nowhere department, I’d like to announce the first release of django-modular, a framework for creating content modules for a site, similar to the customizable homepages at Google or Yahoo. Creating modules a very simple process, simply declaring a single class and a template. All the rest is handled by the framework. The only think not implemented so far is rearranging modules. I don’t have documentation written yet, but the following sample should give you a very basic idea of how simple the declaration is:

import modular

class HelloModule(modular.Module):
    title = 'Example module'
    template = 'myapp/hello_module.html'

    name = modular.CharField(max_length=100)

Then, just define a simple template to actually display the module:

{% extends 'modular/module.html' %}

{% block content %}Hello, {{ module.name }}!{% endblock %}

That’s a bit oversimplified, but that’s the basic idea. Users can customize any of the fields provided on the module, and the user’s values are made available to the template. I’ll explain in more detail later, when I get proper documtation written up.

Comments

  1. At 8:41 a.m. on Sep 9, 2007, Amirouche said ...

    I don't get it... could you give another example ? Is it like iGoogle, netvibes ?

  2. At 11:33 a.m. on Sep 9, 2007, Marty Alchin said ...

    The Google example I gave was indeed iGoogle, and netvibes looks similar to what I'm describing as well.

    However, the main difference is that there won't be a massive amount of modules available, just the ones you define for your own site. I'm in the process of writing some proper documentation for it, and I'll write up another blog post to describe it in more detail.

  3. At 8:57 p.m. on Sep 9, 2007, Amirouche said ...

    actually the real question was how does this relate to the Universal Widget API.

  4. At 9:22 p.m. on Sep 9, 2007, Marty Alchin said ...

    Well, I haven't read up on that API, but I don't expect it to have anything whatsoever to do with that. This project isn't for making things for distribution, it's just for building modules for your own site, based on your site's data.

    There might be some value in making it easy to implemented that API, but that's not the goal of django-modular.

Speak up!


This particular article was posted on Friday, September 7, 2007, and has received 4 comments.

It was preceeded by Django and the Linux Desktop and followed by Django Projects.

It contains the following links:

Archive

Categories

Powered by Django.