Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 160281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:00:25+00:00 2026-05-11T11:00:25+00:00

I am exploring file/images uploads in Django. I have a model with Photo class

  • 0

I am exploring file/images uploads in Django. I have a model with Photo class which has thumb ImageField. I uploaded thumb with admin panel and I made template which just gives <img src='{{photo.thumb.url}}' />. Unfortunately I don’t get any images and when I try to get direct link it says ‘page not found’. It seems that django either does not move them to media_url or maybe it has no permission to access it? I wonder what can I do to fix it.

Thanks a lot beforehand.

PS: Running django on dev server with sqlite db.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T11:00:26+00:00Added an answer on May 11, 2026 at 11:00 am

    The development server by default doesn’t serve static files (see the documentation). You’ll need to add the following code to the bottom of your urls.py to enable static file serving:

    from django.conf import settings  if settings.DEBUG:     urlpatterns += patterns('',         (r'%s(?P<path>.*)' % settings.MEDIA_URL[1:], 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),     ) 

    That should sort you out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Exploring around S3's UI, it seems they only enjoy file uploads from my local
I have some large files (images and video) which I need to store in
I have seen a powerpoint presentation (ppt) somewhere online which was a .ppt file
Actually I am studying this algorithm and I have been exploring his code (which
I have a very large xml file which I have stored in a longtext
I have an existing class Image which is used extensively throughout my application. I
I'm exporting my php as jsonp and then calling a js file which loads
I've been exploring methods for full-width background images combined with type. I found this
I have been exploring patterns in various MV* frameworks out there and today noticed
I have just started exploring TWILL . Twill is an amazing scripting language for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.