-- app
-- manage.py
-- mysite
-- settings
-- __init__.py
-- base.py
-- production.py
-- static
-- media
-- product
-- images
--
-- static_dirs
-- static_root
from .base import *
try:
from .local import *
live = False
except:
live = True
if live:
from .production import *
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'static', 'media')
STATIC_ROOT = os.path.join(BASE_DIR, 'static', 'static_root')
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static', 'static_dirs'),
)
TEMPLATE_DIRS = (
os.path.join(BASE_DIR, 'templates'),
)
# Static asset configuration
# import os
# BASE_DIR = os.path.dirname(os.path.abspath(__file__))
# STATIC_ROOT = 'staticfiles'
# STATIC_URL = '/static/'
# STATICFILES_DIRS = (
# os.path.join(BASE_DIR, 'static'),
# )
<img class="img-responsive" src="/media/products/images/aws.png">
But when I see my /static/media/products/images/ folder, there were images created on development statge only, not the images I just created on production site. (aws.png)
As still beginner for django development, It is a tough to find answer even after few hour's googling.
Thanks always.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2f1eb33e-c1c0-417f-8665-b8f239540f4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.