Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

228
Vistas
Django Apache configuration static files

I've a little issue concerning the configuration of Django and Apache on AWS Lightsail.

I followed this guide: https://aws.amazon.com/it/getting-started/hands-on/deploy-python-application/ point 5) Host the application using Apache I configured all the files just like the guide states (obviously using the name of my prj instead of "template").

Everything is working except the static files: ie. I see my website without any css/img/js files.

Must I add something in urls.py? in settings.py? I feel I've tried everything...

How can I correctly configure Apache? For me it's the first time dealing with Django and Apache, and I cannot find a guide that works for my situation.

This is my tree of the prj: tree-prj-img

Thank you, Manuel

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Ok, I found the solution.. I just spent all night for just few lines of code ahah I add the following lines to my file urls.py:

if settings.DEBUG:
   urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
   urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda