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
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
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.
The answer doesn't explain the reasoning as to why. One of the nice things about Django is that it doesn't expose the back-end via the url.
Example:
/formmail.pl/search.php
But when it comes to the static files, I guess that doesn't matter. Very disappointing...
Have a look at note number 2 on this page. There they explain why.
© 2022 - 2024 — McMap. All rights reserved.