Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

223
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!