On Mon, Jun 12, 2017 at 7:25 PM, Melvyn Sopacua <[email protected]> wrote:
> > > Use os.path.realpath() in your settings file. The drawback being that > changing the target of the symlink requires a reload of Django/WSGI for it > to be picked up. This is not by definition a bad thing. > > > > A similar approach is to implement your own storage engine and call > os.path.realpath on STATIC_ROOT. Of course, this opens you up to symlink > attacks. > I'm in a shared hosting (webfaction) so my hands are tied and I can't do what I want. Fixed the MEDIA_ROOT and STATIC_ROOT. Also the urls are ok In [4]: from django.conf import settings In [5]: settings.STATIC_URL Out[5]: '/static/' In [6]: settings.STATIC_ROOT Out[6]: '/home/ myuser /webapps/kng_static/' In [7]: settings.MEDIA_URL Out[7]: '/static/media/' In [8]: settings.MEDIA_ROOT Out[8]: '/home/ myuser /webapps/kng_static/media/' If I try the mezzanine_tags: In [3]: from mezzanine.core.templatetags.mezzanine_tags import thumbnail ...: img = '/home/ myuser /webapps/kng_static/media/upload/ test_image .jpg' ...: thumbnail(img, 80, 80) ...: Out[3]: '/home/systemx/ myuser /kng_static/media/upload/.thumbnails/ test_image .jpg / test_image -80x80.jpg' The problem is still the same in the filebrowser. No thumbnail because the src of the img pointed is `www.mywebsite.com/static/media/`and if I use the filebrowser on a post, the image rendered use the src ` www.mywebsite.com/static/media/` The permissions are ok and I can see the images if I point to the specific url in the browser. I think I must implement the logging and fight my laziness... Thank you for your support Melvyn -- Karim N. Gorjux -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
