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?

15 Responses to “Django powered chicha planet with feedjack”

  1. Adrian Holovaty Says:

    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?

  2. Antonio Ognio Says:

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

  3. Anonymous Says:

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

  4. Beatriz Neumann Says:

    Hi Tabo:

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

  5. Amr Says:

    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 ??

  6. tabo Says:

    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.

  7. Eso es ~normal! - Jj’s Blog » Chichaplanet is down Says:

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

  8. Edgars Says:

    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

  9. FeedJack: Un Planet con esteroides at MilMazz Says:

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

  10. favoyang Says:

    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

  11. michau Says:

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

  12. Release: Feedjack - A Django+Python Powered Feed Aggregator Says:

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

  13. Antibush Says:

    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.

  14. powerleveln Says:

    good blog. come on doing that.

  15. muhabbet Says:

    thank

Leave a Reply