Posted by erikcw |
|
Hi,
We serve all of our media from a seperate server (media.domain.com). Are there any plans to make sphene respect the media_root settings of the rest of the site? Ideally sphene would just use the MEDIA_URL in templates wherever images, css or js is referenced. A symbolic link could then be setup from MEDIA_ROOT to point to /communitiytools/static. I hate to make direct changes to the the source of sphene, as that can make future upgrades a headache... What do you think? |
|
Posted by Herbert Poul |
|
i think you are right.. it should be using MEDIA_ROOT instead of simply /static ..
but i don't think this will require too many changes.. there are only the stylesheets and the forum category icons which are static media files.. (and the emoticons in the board, which already use MEDIA_ROOT) ... i have created an issue for this: http://code.google.com/p/sct-project/issues/detail?id=72 Hey, we have Signatures !!! Great, isn't it ? ;) |
|
Posted by eXt |
|
Hi!
I've attached a patch, for media_url issue, to this post. It works for me but is not heavily tested. The patch applies some changes to templates (replacement of "/static/" with {{ MEDIA_URL }}) and one change to templatetags (to pass context to a rendered template). After applying you should correct your MEDIA_ROOT in settings.py and your development settings for static files in urls.py. |
|
Posted by Herbert Poul |
|
hi,
cool thanks ! i have already applied it .. and it seems to work without any problems i only had to include the context processor django.core.context_processors.media and everything kept working .. so i have now committed your changes - thanks again .. please let me know if i can include your name and email address in the AUTHORS file to attribute your patch Hey, we have Signatures !!! Great, isn't it ? ;) |
|
Posted by eXt |
|
Nice to hear that :)
Oh yes. I forget to mention that.
Yes, sure. I've updated my profile. Thanks a lot! |
Please login to post a reply.