Files
2012-02-21 01:15:00 -05:00

1 line
7.5 KiB
JSON

[{"user_id": 25337, "stars": [], "topic_id": 16013, "date_created": 1301398420.765377, "message": "MEDIA_URL is used to point to the base URL for user-generated content - uploaded images, files, that sort of thing.", "group_id": 81, "id": 468786}, {"user_id": 18665, "stars": [{"date_created": 1301711166.033596, "user_id": 1296}], "topic_id": 16013, "date_created": 1301398361.140321, "message": "Confused as to what MEDIA_URL does now? Particularly after I got \"django.core.exceptions.ImproperlyConfigured: The MEDIA_URL and STATIC_URL settings must have different values\". I'd appreciate Django explaining why this is.", "group_id": 81, "id": 468779}, {"user_id": 25337, "stars": [], "topic_id": 16013, "date_created": 1301398430.3714099, "message": "STATIC_URL is used as the prefix for JavaScript, CSS, etc.", "group_id": 81, "id": 468789}, {"user_id": 18665, "stars": [], "topic_id": 16013, "date_created": 1301399392.3031931, "message": "I think it's very naive of Django to presume that user generated content would by default go to a publicly accessible location. For incredibly basic apps, yes, but lots of apps/projects would want tight control over what user generated content gets served and how.", "group_id": 81, "id": 468874}, {"user_id": 18665, "stars": [], "topic_id": 16013, "date_created": 1301399522.1426711, "message": "I've just always used MEDIA_URL everywhere in my templates and it seems now, this should be replaced by STATIC_URL. Is that correct? If MEDIA_ROOT is primarily used as the default location for user uploaded/generated content, then perhaps MEDIA_ROOT should be renamed to UPLOADS_ROOT or something similar. I think having both MEDIA_ROOT/URL and STATIC_ROOT/URL will confuse newbies in particular. Have I got this whole thing wrong?", "group_id": 81, "id": 468884}, {"user_id": 213, "stars": [], "topic_id": 16013, "date_created": 1301400859.0880251, "message": "@ryan_blunden your confusing is understandable, the problem is that the ambiguity of \"MEDIA_ROOT\" didn't leave us with a lot of alternatives to introducing a new setting if we wanted to solve this once and for all. \"static\" better refers to what the files your site consists out of are, since they aren't dynamically (read: through user interaction) created or modified.", "group_id": 81, "id": 468987}, {"user_id": 209, "stars": [{"date_created": 1301574757.6791539, "user_id": 14653}, {"date_created": 1301711232.9285009, "user_id": 1296}, {"date_created": 1301920547.925787, "user_id": 18347}], "topic_id": 16013, "date_created": 1301406171.799612, "message": "Here is my setup (well...Pinax's...) \nPROJECT_ROOT = /path/to/project \nMEDIA_ROOT = PROJECT_ROOT/site_media/media\nSTATIC_ROOT = PROJECT_ROOT/site_media/static \nSTATIC_URL = /site_media/static/\nMEDIA_URL = /site_media/media/", "group_id": 81, "id": 469392}, {"user_id": 18665, "stars": [], "topic_id": 16013, "date_created": 1301429877.085283, "message": "Thanks @jezdez, so do you see MEDIA_URL being phased out in favour of STATIC_URL? Thanks @issackelly, I'll use the same setup.", "group_id": 81, "id": 472095}, {"user_id": 25337, "stars": [], "topic_id": 16013, "date_created": 1301431954.9480441, "message": "@ryan_blunden, I think I'd be surprised to see one phased out; they're for two distinct purposes. I think it was simply unfortunate that early on, MEDIA_URL got used for two different things.", "group_id": 81, "id": 472337}, {"user_id": 1736, "stars": [], "topic_id": 16013, "date_created": 1301433027.3639209, "message": "@danfairs The problem now is that MEDIA_* is poorly named, so a phased renaming to something like UPLOADS_* would probably help. Not sure if that will be worth the compat break though.", "group_id": 81, "id": 472479}, {"user_id": 1822, "stars": [], "topic_id": 16013, "date_created": 1301434806.9268401, "message": "are folks just using rsync in the case when you want to serve all media (static and user-upload) from a different box, but have regularly uploaded content?", "group_id": 81, "id": 472778}, {"user_id": 1822, "stars": [], "topic_id": 16013, "date_created": 1301437801.4329031, "message": "@coderanger actually, the answer seems to be in the docs ;-)\nhttp://docs.djangoproject.com/en/dev/howto/static-files/#serving-static-files-from-a-dedicated-server", "group_id": 81, "id": 473199}, {"user_id": 1736, "stars": [], "topic_id": 16013, "date_created": 1301438015.2830379, "message": "@ptone Ahh, I see what you were asking. You could also make a storage backend for uploads that sends to your other server automatically.", "group_id": 81, "id": 473239}, {"user_id": 1736, "stars": [], "topic_id": 16013, "date_created": 1301437618.0028729, "message": "@ptone You mean in <=1.2? I would hope all sane people were already using django-staticfiles (or one of the similar projects, appmedia, etc)", "group_id": 81, "id": 473164}, {"user_id": 1822, "stars": [], "topic_id": 16013, "date_created": 1301437907.678488, "message": "just use the same flow for user uploaded media", "group_id": 81, "id": 473217}, {"user_id": 18417, "stars": [], "topic_id": 16013, "date_created": 1301463471.4274189, "message": "Anyone seen a working implementation of an S3 backend for static files yet?", "group_id": 81, "id": 478217}, {"user_id": 1736, "stars": [], "topic_id": 16013, "date_created": 1301465212.1189539, "message": "@dryan https://github.com/seanbrant/django-queued-storage", "group_id": 81, "id": 478632}, {"user_id": 213, "stars": [], "topic_id": 16013, "date_created": 1301471448.922334, "message": "@ryan_blunden No, MEDIA_URL won't be phased out, it's still useful as needed for user generated content", "group_id": 81, "id": 479420}, {"user_id": 213, "stars": [], "topic_id": 16013, "date_created": 1301471485.503475, "message": "@dryan Both the boto and the old S3 backend in django-storages work for me", "group_id": 81, "id": 479424}, {"user_id": 213, "stars": [], "topic_id": 16013, "date_created": 1301471497.618726, "message": "I added the required *time hooks in the recent version", "group_id": 81, "id": 479426}, {"user_id": 24931, "stars": [], "topic_id": 16013, "date_created": 1301502297.8713939, "message": "@dryan I had to use the code for django-storages thats at bitbucket (https://bitbucket.org/david/django-storages/). The version in pip didn't work for me. I'm also using boto==2.0b4", "group_id": 81, "id": 482784}, {"user_id": 177, "stars": [], "topic_id": 16013, "date_created": 1301503842.038105, "message": "@jezdez Speaking of django-storages and pip, would you be able to cut a release? :D", "group_id": 81, "id": 483003}, {"user_id": 213, "stars": [], "topic_id": 16013, "date_created": 1301648571.892683, "message": "@bryan Nope, I can't, but done hesitate to ask @davidbgk / https://twitter.com/davidbgk", "group_id": 81, "id": 500200}, {"user_id": 26888, "stars": [], "topic_id": 16013, "date_created": 1301828830.039701, "message": "STATIC_* is supposed to point on files that your applications (not your project) bring. Say for example django.contrib.admin has a couple of images/js/css that are cross-projects. Files served under that url may come from different locations on the server filesystem. On the other hand, MEDIA_* is supposed to be project specific.", "group_id": 81, "id": 513851}, {"user_id": 18417, "stars": [{"date_created": 1301847962.0622361, "user_id": 22109}], "topic_id": 16013, "date_created": 1301843631.575767, "message": "@linovia I think your distinction is a bit off. From my reading of the release notes, MEDIA is now meant to encompass anything uploaded by users of the site, STATIC handles the design assets. I love this setup since it's easier to keep user-generated content out of version control.", "group_id": 81, "id": 515408}]