django_slideshare: add presentations to your django site

I’ve released the code for django_slideshare, a Django app that makes it easy to embed Slideshare presentations into your Django project.

Enter a Slideshare URL, and customize the embed template on your site.

In the Admin panel you create an instance of the Slideshare model…the only required attribute is the URL of a Slideshare presentation.  You may also set the presentation width and height, title, abstract, and posting date.

This is my first Django app.  It is functional, but I hope that people take a look at it, find it useful, and even suggest ways to improve it.  Here’s how it works:

  • Uses the pre_save signal to pull meta information about the presentation from the Slideshare URL you entered.  It’ll grab the presentation title,  default width and height.  You can, of course, override those by entering them in the Admin panel.  The presentation embed url and  thumbnail url are stored in the Advanced Settings.
  • Embed the presentation into your site with a custom tag, {% slideshare_embed %}, which is implemented via an inclusion tag.  This means that you can either use the supplied embed template, or modify it to suit your needs.

I’m not sure how useful this is to anyone but me.  I was building a site where I wanted to embed a few Slideshare presentations into my template, and I wanted to customize the Slideshare embed code.  Also, I wanted an excuse to do more Django development.  I’ve been playing with various web frameworks.  Django is emerging as my favorite, but I have a lot of python experience so I might be biased.

One challenge I’m having with Django is the naming conventions.  What most frameworks call controllers, Django calls views.  What most frameworks call views, Django calls templates.  What most frameworks call hooks, Django calls signals.  It’s caused me a few stumbling blocks here and there…I occasionally see the file views.py and look for the HTML/template code; it took me awhile to find the signals because I was looking for the wrong word.  I’m not sure what the departure from convention buys you here.  But like they say in the FAQ, it’s their framework, it’s what make sense to them, and it helps you get your sites done faster.  So it doesn’t really matter.

Advertisements

One thought on “django_slideshare: add presentations to your django site

Comments are closed.