FileField/ImageField and the sites framework

2 views
Skip to first unread message

smcoll

unread,
Jul 2, 2009, 2:19:56 PM7/2/09
to Django users
i have a project running multiple sites. One of the apps in the
project has a model with a FileField and an M2M to `Site`. Since each
site has its own MEDIA_ROOT, a model instance saved from SiteA
(publishing on both SiteA and SiteB) can only display the file from
SiteA, because the file only exists within its MEDIA_ROOT.

How is this typically dealt with? Is there any way aside from sharing
a common MEDIA_ROOT?

Andrew Fong

unread,
Jul 2, 2009, 3:26:30 PM7/2/09
to Django users
Need more data here. This ventures from strictly Django into
deployment setups. Why exactly can't you just use a common MEDIA_ROOT?
Are your sites on different boxes?

-- Andrew

shannon

unread,
Jul 2, 2009, 3:51:11 PM7/2/09
to Django users
Sites are on the same box. Really, i'm just trying to make a proof of
concept: each site is just a settings file, media directory, and
templates directory. They all share a database. i could use a common
MEDIA_ROOT, but just didn't want to. Is there a way to have a
secondary media location and point a FileField to it, rather than the
standard "append to MEDIA_ROOT" behavior?
Reply all
Reply to author
Forward
0 new messages