libjpeg PIL photologue django

Tags: , , , , , , , ,
Posted in dotnet, vb, vb.net | No Comments »

So I have been looking up and down for a good solution to display images, audio, media in general with django:

From what I found there is the following solutions:

1. Photologue:

Cant seem to make it work.
It needs PIL and libjepg.

I tried to install both, but ran into different build problems.

Someone on stackoverflow recommended me this link:

http://appelfreelance.com/2010/06/libjpeg-pil-snow-leopard-python2-6-_jpeg_resync_to_restart/

Which is a great tutorial and also deals with removing PIL and reinstalling (which I have to do, I guess).
But somewhere along this tutorial I have to do this:

sudo rm -Rf build

And I dont feel confident enough to run a sudo rm command.

Also I thought there must be an easier way to achieve this, since EVERY Blog needs to display media.

2. Django itself says:

Let Apache do the display and use this:

(r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': '/pathtomedia/', 'show_indexes': True}),

for development BUT not for production.

So what does everybody use for production?

3. Other:

I managed to display images via os.listdir , urllist and a template:

allimg= os.listdir("/pathtomyimages/")
 urllist = ['/site_media/Imagedir/%s' % url for url in allimg]
 return render_to_response('picture_display.html',
       {'allimg': allimg})

But this also seems not very promising, since I want to display images, audio, media from one directory on multiple sites.

I hear paginator could be the solution.

So now my question:

What is the best, easiest and robust solution to display media in django in development and in production?

What are you using?

Please help me out!

Thanks for the time.

Similar:

  1. Programattically populate sample data for Django Image/File fields? I need to populate sample data for Django Image/File fields in automated python code. I want to initialize Django ImageFields and FileFields with some sample...
  2. Django not recognizing django admin urls I just registered my models my models with django admin. I navigate to the django admin at /admin. I log in sucessfully and I can...
  3. how to code a batch file to automate django web server start Hi, How do i automate starting Django development webserver “python manage.py runserver” in a .bat file in windows . I have python26 and django 1.1.1...
  4. Using FFmpeg to encode audio once uploaded, using Django, VPS (Linux) and Amazon S3 My project will require users to upload uncompressed WAV audio files and once they do, the server will need to encode it in MP3 to...
  5. XULRunner , Python and Django : How to ?! Hello , How to add Python and Django with XULRunner !? Found this tutorial useful , but somehow i was not able to add django...

Tags: , , , , , , , ,

Leave a Reply