Archive for the 'Django' Category

Inspiration for a RentaCoder listing

Saturday, November 17th, 2007

An interesting (well, to me anyway) tangent to my recent post about GetAFreelancer. While looking through my Google Analytics report, I just found a number of referrals from rentacoder.com. Looking further, I find that someone had been looking for a developer for build a solution for “Video Blogging using Django and Flash(tm) Video (FLV)”.
If this sounds vaguely familiar, it’s because it’s the title of one of my earlier blog posts. That’s right! My blog posting was cited as a reference on a rentacoder.com posting: “The initial scope of this project is to establish a Django-based video blogging site to accomodate YouTube-like functionality, as described by the DRM blog at http://blog.go4teams.com/?p=56. The blog includes the essential code snippets.
I’m actually a bit flattered. Of course, it’s hard to ignore the obvious question: “Why the %&§§%§! did you not contact me?”.
Unfortunately, the offer was not bid on, was later canceled and nothing seems to have come of it. Pity! Might have been an interesting project to follow up on. Maybe there are some takers in the Django community? I’d be willing to participate by sharing some of my trogger.de source code, if that would be of any use.

Technorati Tags: , ,

Django book completed. Congrats to Adrian and Jacob!

Wednesday, November 14th, 2007

Jacob Kaplan-Moss posted to his blog yesterday that the Django book (Pro Django. Web Development Done Right) is completed and is now going off to the printers. He writes: “It should start shipping to bookstores around the second week of December.”
This is great news! It’s great news for the Django platform — it’s a true sign of the maturity of the platform that Apress is publishing a book about it. It’s a strange effect, but in some way having one or more (good) books available gives a technology a certain degree of “manager-cred”, which could make more widespread adoption of Django in “enterprisey” settings easier. Also great news for novices to Django (especially if, like me, they prefer having an actual book which you can read in bed at night, etc.).
As a side note, I must admit that I had become so fed up with the regular “shipping delay” emails I got from Amazon about my preorder of the book (originally scheduled for March) that I canceled my preorder a couple of weeks ago. Once the book is actually available, though, I’ll be sure to order it. I really couldn’t have built the trogger.de platform in the short time it took my without the great framework that Django is and without the good documentation that was on the project’s Web site already.
I’m also pleased for Adrian and Jacob, as the initiators (instigators?) of the Django framework and project, as it appears they managed to get their book out of the door before other authors’ books on Django come out.
So, congratulations to Adrian and Jacob on finally completing the book. It’ll definitely be on my Christmas wish list and I’m looking forward to reading it.

Cited in Bangalore - How cool is that?

Sunday, December 3rd, 2006

As Pradeep just pointed out in my Blog comments, he used parts of my posting on video blogging with Django (which is funnily enough always referenced as “Create your own YouTube site” - a claim I wouldn’t have dared make myself :-) ) as basis/inspiration for a presentation at Bar Camp Bangalore. BarCamp describes itself as “an open, welcoming event for geeks to hang out with or without wifi and smash their brains together.” Sounds like the kind of place I’d enjoy.
Check out his slides, cleverly titled “YourTube” — they’re available online.
Pradeep left out the Django-related stuff and focused on the bare-bones process, with some HTML and some info on the tools - hopefully making everybody think “Hey! I can do that!”.

Anyway - how cool is that? Quoted at BarCamp in Bangalore. Thanks, Pradeep! You made my day.

English version of trogger travel portal launched!

Sunday, August 27th, 2006

I just launched the English language version of my Django-powered travel portal, trogger.de. The newly-launched English version is at trogger.info.

trogger.info banner

For those who haven’t yet checked out trogger, trogger is a travel-oriented Web community site, where users can maintain travel blogs, post travel reports, share holiday insider tips and publish photo albums. The most recent extension to the trogger platform has been the addition of video blogging support, allowing users to upload and attach video files to their blog entries.
Both portals, the .de and the .info one, are powered by the same application. For the English version I translated the HTML templates and other literal strings using Django’s built-in internationalization (i18n) support.
In fact, the whole translation process has been pretty straightforward and hassle-free (even though it was a lot of mind-numbing work). Django provides a tool to extract string literals, or translation IDs, from the application’s source code as well as from the HTML templates. The extracted strings are stored in “.po” files which can be translated and later compiled into resource files which are used when rendering the page content. The “.po” format is actually not a Django invention. It’s used throughout the Linux world, courtesy of the gettext package. To me, that’s a sure sign of a mature framework: Don’t reinvent the wheel, if what’s there is already the best tool for the job.
Luckily, this standard support for internationalization means that I had a good tool on my Linux box already which I could use to translate the Strings: KBabel. KBabel frees you from the hassle of fiddling with the .po file text format. Going through the translation file is just a matter of repetitive “Ctrl-Shift-PageDn” to get to the next untranslated string and then translating that. Piece of cake!
Currently, the two portals, trogger.de and trogger.info share the same hosted server. I opted to make them two almost completely separate installations, though, to give me the freedom of moving one of them to its own server later on, if bandwidth or disk usage requires it. So, I use Apache’s Virtual Host support to separate the two Django applications. Actually, both installations share the same implementation code. I’m just using the Virtual Host configuration to distinguish between two different settings files, with different database names, different language settings and media directories. This way I only need to maintain the one installation and can keep that up-to-date in a single go, while I keep full flexibility. The Django documentation is really helpful in getting this all set up and running.
So — please check out trogger.info. Participate in the discussions, post your holiday experiences, videos and holiday snaps.

Video Blogging using Django and Flash(tm) Video (FLV)

Sunday, July 23rd, 2006

I just added Flash-based (FLV) video blogging support to my Django-powered travel portal site, trogger.de. The whole process is surprisingly simple and straightforward and can be done entirely with free (FLOSS) tools.

The video publishing workflow consists of the following parts:

  • A Django model to store our video and associated information
  • An upload form where the user can upload a video
  • Converting the video into a format usable on the Web
  • Extracting additional details
  • Playing the video in the Web browser
  • Making the player a bit friendlier
  • Advanced features

Following this simple workflow, trogger.de allows users to write and submit a blog post. Once that’s submitted, the user can add one (!) video file to it. When later viewing the blog entry, the attached video is shown in the browser.
(more…)

New travel portal opened: trogger.de

Monday, June 5th, 2006

Well — it’s finally happened. My new travel portal is almost as good as I’m going to get it by fiddling around with it by myself. In the hope of getting feedback for improving the application, and of course also in the hope of having built something that people will actually want to use, I’ve installed and started the site: www.trogger.de!

trogger banner

What is trogger? It’s a German-language community portal for all things to do with travel. Going on a trip? Keep a travel blog on trogger.de and stay in touch with your friends. Been on a trip? Post a trip report and insider tips on trogger.de, along with your photo albums. Read a good travel book lately? Write a book review on trogger.de and tell everybody about it. Planning a trip? Then come to trogger.de, read the info and tips available here and discuss with other travellers.

Of course, trogger.de is sprinkled with a selection of “Web2.0ish” goodness — blogs, tags, interactivity, RSS. More and exciting features are planned for the future and will be prioritised and implemented depending on visitor feedback.

Tags: ; ; ;

New Django installation

Saturday, March 25th, 2006

I just got a new machine, with x64 processor (Pentium D Dual Core — nice machine!) and naturally it’s already running Linux. SUSE 10, to be specific.
Now I wanted to move my Django project over from the old machine and the Django installation kept failing. The setup.py told me:

Installed /home/tietze/temp/Django-0.91
Because this distribution was installed --multi-version or --install-dir,
before you can import modules from this package in an application, you
will need to 'import pkg_resources' and then use a 'require()' call
similar to one of these examples, in order to select the desired version:
    pkg_resources.require("Django")  # latest installed version
    pkg_resources.require("Django==0.91")  # this exact version
    pkg_resources.require("Django>=0.91")  # this version or higher

But calling django-admin.py always resulted in

No module named pkg_resources

– no mater how often I ran ez_setup.py or whatever. This was rather frustrating, since the Django installations on my previous machine were such a breeze.

It appears that the Python packaging tool is confused by the fact that 64 bit SUSE puts Python stuff under /usr/lib64 instead of /usr/lib and then assumes that it was installed to a non-standard location which isn’t on any Python path.

I finally found the solution here:
http://www.mail-archive.com/distutils-sig@python.org/msg01667.html

Specifically this recommendation:

“They need to add:

[easy_install]
site_dirs = /usr/lib64/python2.4/site-packages

to /usr/lib64/python2.4/distutils/distutils.cfg. This file probably
doesn’t exist; just create it.”

That did it. Created file, re-ran python ez_setup.py -U setuptools and then python setup.py install and now my new Django installation seems to be working. After a couple of minutes of frustration, that was actually quite easy.

Amazed at Django

Sunday, March 12th, 2006

I spent this weekend working on a new portal site for which I had the idea a couple of days ago (yeah, I know — weekends are for something else; but it was absolutely freezing cold here in Germany, so I succumbed to my inner geek). I’m building the site using the Python Web framework Django and I am absolutely amazed at how productive that feels.

I’ve completed most of the data model and built several pilot pieces of functionality, such as logging in and out, registering as a new user, maintaining a personal user profile, uploading pictures, a personal homepage and personalized albums with all the images a specific user has uploaded to the site — along with dynamic thumbnails in any given size. I know that there’s still a lot of ground to cover. Especially in the area of fool-proofing and tightening the whole thing; testing for and catching all kinds of bad errors. But then the net result is really astounding for roughly one-and-a-half days of work. Bear in mind, I’m learning Python and Django while I go along. I’m usually a Java guy.

Hats off to the Django guys!