libjpeg PIL photologue django -


So I'm looking up and down for a good solution to display images, audio, media with the demo :

I have the following solutions from what I found:

1 Photologue:

The khichdi language starts to work.

I tried to install both, but participated in various build problems.

Someone suggested to me this link on the Stakeoverflow:

Which is a great tutorial and also works to remove and reinstall PIL (Which I have to do, I think). But with this tutorial, I have to do this:

sudo rm-rf build

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

In addition to this, I thought that there should be an easy way to achieve this, because every blog needs to display the media.

2 Djangogo itself says:

Perform Apache and use it:

  ( R '^ site_media / (? P & lt; path & gt ;. *) $ for development, but not for production.', 'Django.views.static.serve', {'document_root': '/ pathtomedia / ',' Show_indexes': true}),  

/ P>

So what do all people use for production?

3 others:

I have been able to display images through os.listdir, urllist and a template:

 

But it also does not seem very promising because I want to display images, audio, media from a directory on many sites.

I have heard that the pagnator may be the solution

So now my question:

The best way to display the media in the development and production of the Django, What is a simple and robust solution?

What are you using

please help me!

Thanks for the time.

django-photologue is an app for managing images and image collections for your project, but directly Static is not related to media service

Since "best", "easy", and "strong" are all subjective issues based on your specific requirements, I recommend you first to understand that Why is not it common thing to serve your media files Django? The short, general answer is that Django should be loaded in every web server process that handles a request and it will use a non-trivial amount of memory when you serve a media file (usually) Returns a file from the disk because no application logic is necessary, so you are taking an unnecessary overhead from the necessary memory to run Django in one process and additional Od processing which will be to map the return request path to a view of Django, file loading, and it dump response. Web server (Apache, NGNX, etc.) are already very good at returning files from the disk. This is the reason that it is recommended that your web server handles static media files to submit requests to WSGI middleware or Django is not needed.

Many options are available but there are some that are likely to be common solutions. For example, if you have fixed your web server on Apache, you will need to configure it so that your media path requests can be handled directly by Apache and all other configurations will be handed over to Django. Apache + mod_wsgi is a fairly common choice AFAICT. Read this carefully:

To configure a different web server as a recommendation of documents, it is not strictly necessary for the same Apache example for zango and media. You can use it as if you are starting


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -