R
Railway9mo ago
TripleK

Media deployment in django

I am trying to display media files (images) in railway from the backend of django rest framework. I have configured the settings file and the urls file as it comes in the template: urlpatterns += [ re_path(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT})] STATIC_URL = 'static/' STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")] STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles") MEDIA_URL = '/media/' MEDIA_ROOT = os.environ["RAILWAY_VOLUME_MOUNT_PATH"] This is the path of the media folder: DRF\media\multimedia I am not able to display the images on the site.
No description
No description
6 Replies
Percy
Percy9mo ago
Project ID: 4b66a249-0189-49b9-8839-82fa0f275919
TripleK
TripleKOP9mo ago
4b66a249-0189-49b9-8839-82fa0f275919 anyone can help me?
Brody
Brody9mo ago
this is community help, please be patient, for anyone to help it would greatly benefit if you could share your repo
TripleK
TripleKOP9mo ago
GitHub
GitHub - Pacohm00/fibbel: Software de gestión en Fisioterapia
Software de gestión en Fisioterapia. Contribute to Pacohm00/fibbel development by creating an account on GitHub.
Brody
Brody9mo ago
thats a private repo
Duchess
Duchess4mo ago
New reply sent from Help Station thread:
I have problem to. How you solve?
You're seeing this because this thread has been automatically linked to the Help Station thread.
Want results from more Discord servers?
Add your server