Closed raagin closed 3 years ago
I'm not shure that is the correct way and place where to set it, but problem is exists.
Just (very briefly) checked the code and fileobject.version_generate
is using fileobject.versions_basedir
which again refers to site.directory
. Besides, there are tests (see tests_base
) checking the method.
Do you want to add a test case which shows what you're trying to achieve (resp. shows the bug with the current tests)?
Checked this again and the templatetags use fileobject.version_generate
. Therefore, the result cannot be different. Besides, your proposed change breaks almost all test cases. I'm closing this for now. Please add some test cases if you think this is an issue (I currently think it is not).
Hi! I suggest this, because if you use
version
tag in template it is generate version path withsite.directory
but if you use fileobject.version_generate(version_suffix) in views for example, generated path will be another one (without site.directory). And also, if directory of the custom site have the same name with folder created inside default site in_versions
directory, it will be the same folder. It is ok, if only one site is exists, but for many sites it can produce mistakes. Thank you.