Django 1.3: MEDIA_URL vs. STATIC_URL

Zain Khan picture Zain Khan · Dec 16, 2011 · Viewed 8.9k times · Source

What does MEDIA_URL does now? I am particularly confused 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. Regards

Answer

Zain Khan picture Zain Khan · Dec 16, 2011

MEDIA_URL is used to point to the base URL for user-generated content - uploaded images, files, that sort of thing.

STATIC_URL is used as the prefix for JavaScript, CSS, etc.