Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

230
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda