Neel Dutta
Neel Dutta

Reputation: 149

Can I set multiple Static Roots in django?

My problem:

I already have a static folder for .css .js and images. But I have another directory in my server that stores recorded video, which keeps populating on a daily basis. I want django to be able to access files from that directory, where the videos keep populating. What can be the solution to this? Is it possible to make multiple static roots?

Upvotes: 2

Views: 1469

Answers (1)

hassanzadeh.sd
hassanzadeh.sd

Reputation: 3481

with STATICFILES_DIRS you can take multiple paths:

STATICFILES_DIRS = (
    os.path.join(BASE_DIR, "static"),
    '/var/www/static/',
)

django doc

Upvotes: 2

Related Questions