S
S
sandrain2014-03-25 18:30:47
Django
sandrain, 2014-03-25 18:30:47

Heroku Django MEDIA 404 - how to set up media files?

Hello.
Question for those who have used heroku. How did you set up the MEDIA files?
Here are my settings:

# settings.py
MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media')
MEDIA_URL = '/media/'
# urls.py
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True, }),

I went through bash, checked the folder structure, there is no media folder there, and when uploading a file through the admin panel, everything goes without errors, but the folder still does not appear, even if created, the files inside do not appear either.
P.S. works locally.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2014-03-26
@sandrain

In the free version, you can't upload anything to Heroku.
For media and static use external services like s3

S
Salavat Sharapov, 2014-03-25
@desperadik

brbrbr .... and where is it poured from the admin panel? 0-o

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question