Django powered chicha planet with feedjack

Update: Feedjack has been released!

Some nights ago I wrote a little Planet replacement in Django called FeedJack. There is still no source code available but I’ll release it as open source as soon as I polish it a little and write docs (if a software has no docs, it doesn’t exist).

You can see it in action in ChichaPlanet, probably one of the first “planets” after Planet Gnome and Planet Debian. It has some features in common with PlanetPlanet:

  • It downloads feeds and aggregate their contents in a single site
  • The new aggregated site has a feed of its own
  • It uses Mark Pilgrim’s excelent FeedParser

But FeedJack also has some advantages:

  • It handles historical data, you can read old posts
  • It parses a lot more info than PlanetPlanet, including post categories
  • It generates pages with posts of a certain category
  • A cloud tag/folksonomy (hype 2.0 compliant)
  • It uses Django templates

Something to note is that, as I posted some days ago, I am very busy with “real” Django projects (real as in we get paid for them), so I wrote this planet thing in 2 nights, and most of the time was spent with the feedparser script that runs in cron than in the django app itself, since it provides generic views, syndication and paginators for free.

But I found something very strange. Note that this is my first attemp to write a “releasable” django app, everything I have done in Django is web applications that will be deployed in one server (note that I said web applications, for you people that think that django is only good for CMSs), so I never had to worry about making anything easy to install to end users. What I wanted to do with FeedJack was to tar the apps/feedjack/ directory so the user just untars the distribution file in apps/ and configure his settings and urls files and that was all.

But I couldn’t do that.

The obvious thing to do was to put the apps/feedjack/ directory in the pythonpath, so I could do “import feedjack.views” in the code, instead of “import my_project.apps.feedjack.views”. The first import works from a python interpreter, it also works when called from another app, but when I try to import it from a running django instance, it fails. I really don’t know if there is some magic in there, Hugo told me on IRC that there isn’t, so I am puzzled. I really don’t want to distribute an app that forces the user to have a “my_project” project, that’s ugly, and sadly that’s what is suggested in Django’s Do’s and Dont’s for Application Writers:

Separate generic apps that you are intending to distribute into a different project from other projects which might happen to use that app. To avoid clashes, use a name for the project which is unique to you, the author, such as one based on a domain name that you own.

This will enable your urls.py module to be fully portable.

There has to be a better way.
(And note that I am not alone).

Any suggestions?

Comments (12)

  1. I suppose one way we could solve this problem would be to tell people to put third-party apps in a “django/thirdparty” directory, and Django could either automatically add “django/thirdparty” to sys.path, or the app would have to import everything “from django.thirdparty.appname”. Thoughts?

    Tuesday, December 13, 2005 at 9:57 am #
  2. Antonio Ognio wrote::

    This is a pretty kewl development that i’m trying to watch closely. Kudos for a great piece of (initial) work.

    Wednesday, December 14, 2005 at 1:42 am #
  3. Anonymous wrote::

    Its actually named “Planet”, not “PlanetPlanet” (thats just the name of the website).

    Monday, December 19, 2005 at 1:32 am #
  4. Hi Tabo:

    Que pases una linda Navidad y que todos tus sueños se cumplan para el año nuevo…

    Saturday, December 24, 2005 at 6:53 pm #
  5. Amr wrote::

    OT question: Is this site powered by django? I’m always cofused by the “I wish this site were…”.. Are you using django for this site? if so, why do you still have the “i wish..” badge ??

    Sunday, December 25, 2005 at 10:12 am #
  6. tabo wrote::

    Anonymous:
    You are right, I corrected that. Thanks.

    Beatriz:
    Thank you very much :-)

    Amr:
    This site is still being powered by wordpress, that is why I use that badge.

    Saturday, December 31, 2005 at 9:01 pm #
  7. Edgars wrote::

    Hey, still didn’t have time for documentation and source code release?

    I’m looking to create a Latvian FLOSS planet and I’m into django development

    Sunday, February 19, 2006 at 4:50 am #
  8. favoyang wrote::

    hello Tabo,
    I think the feedjack could be a real Opensource Project.
    Let’s launch it. people’re still waiting for sharing.
    send a email to me, we can do more communication

    Monday, March 6, 2006 at 3:28 am #
  9. michau wrote::

    Hey, this is an excellent site.
    thanks for this article.

    Monday, May 15, 2006 at 11:24 am #
  10. Antibush wrote::

    Bush is forever saying that democracies do not invade other countries and start wars. Well, he did just that. He invaded Iraq, started a war, and killed people. What do you think? Is killing thousands of innocent civilians okay when you are doing a little government makeover?
    Are we safer today than we were before?
    The more people that the government puts in jails, the safer we are told to think we are. The real terrorists are wherever they are, but they aren’t living in a country with bars on the windows. We are.

    Monday, February 12, 2007 at 9:20 am #
  11. powerleveln wrote::

    good blog. come on doing that.

    Thursday, December 20, 2007 at 9:28 am #
  12. summ wrote::

    I LOVE YOU

    Wednesday, September 3, 2008 at 9:23 pm #

Trackbacks/Pingbacks (3)

  1. Eso es ~normal! - Jj’s Blog » Chichaplanet is down on Saturday, January 28, 2006 at 1:17 am

    [...] Esperemos que Tabo arregle este feature en Feedjack pronto /django|feedjack|planet|python/ [...]

  2. FeedJack: Un Planet con esteroides at MilMazz on Thursday, February 23, 2006 at 12:56 pm

    [...] Mayor información y detalle en la entrada Django powered chicha planet with feedjack, de Gustavo Picon. [...]

  3. Release: Feedjack - A Django+Python Powered Feed Aggregator on Saturday, May 27, 2006 at 10:18 pm

    [...] Some months ago I wrote about Feedjack, a Django powered Feed agregator. Finally I have decent templates to release it. [...]