I have Django 1.11 project structure like this:
- project
-
- static
-
-
- img1.png
-
-
- app
-
-
- static
-
-
-
-
- img2.png
-
-
File "settings.py" contains:
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]
Images are available at:
my-site.com/static/img1.png
my-site.com/static/img2.png
But I want the images to be available in a different way:
my-site.com/app/static/img1.png
my-site.com/app/static/img2.png
I can write to a file "project/app/urls.py":
urlpatterns += static('static/', document_root=os.path.join(BASE_DIR, 'app' + STATIC_URL))
And then "img2.png" will be available, but not "img1.png". How can I make "img1.png" available?
Here, try this...