Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango, boto, S3 and easy_thumbnails not working in production environment
    primarykey
    data
    text
    <p>I'm using Django, django-storages with S3 (boto) in combination with easy-thumbnails. On my local machine, everything works as expected: if the thumbnail doesn't exists, it gets created and upload to S3 and saves in the easy-thumbnails database tables. But the problem is, when I push the code to my production server, it doesn't work, easy-thumbnails output an empty image SRC.</p> <p>What I already noticed is that when I create the thumbnails on my local machine, the easy-thumbnail path uses backward slashes and my Linux server needs forwards slashes. If I change the slashes in the database, the thumbnails are showed on my Linux machine, but it is still not able to generate thumbnails on the Linux (production) machine.</p> <p>The simple django-storages test fails:</p> <pre><code>&gt;&gt;&gt; import django &gt;&gt;&gt; from django.core.files.storage import default_storage &gt;&gt;&gt; file = default_storage.open('storage_test', 'w') </code></pre> <p>Output: django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_FILE_STORAGE, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.</p> <p>If I do:</p> <pre><code>&gt;&gt;&gt; from base.settings import staging &gt;&gt;&gt; from django.conf import settings &gt;&gt;&gt; settings.configure(staging) </code></pre> <p>This works (I have a <code>settings</code> directory with 4 settings files: base.py, staging.py, development.py and production.py)</p> <p>It seems that on my production server, the config file isn't loaded properly (however the rest of the website works fine). If I add <code>THUMBNAIL_DEBUG = True</code> to my settings file, but easy-thumbnails' debugging still doesn't work (it does work on my local machine).</p> <p>What can be te problem? I've been debugging for 10+ hours already.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload