2

Basically, let's say I have an image in /home/arnav/Documents/covers. My django project directory is /home/arnav/project. Is it possible for django to somehow access image files in covers and use them as part of a template? Or do images need to be stored within the project to be accessed? Thanks.

1
  • You can make your web server and filesystem do anything you like. Commented Aug 31, 2014 at 0:47

1 Answer 1

1

In your settings file define STATICFILES_DIRS to also include the /home/arnav/Documents/covers path:

STATICFILES_DIRS = (
     '/home/arnav/project/static',
     '/home/arnav/Documents/covers',
)

This will tell django to first look in the project static directory, but also look in covers for static files.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.