Python Forum
How do I change the location of the _ versions directory?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I change the location of the _ versions directory?
#1
(Sorry for google translator)
When working together Django + TinyMCE + django-filebrowser + grappelli +... image thumbnails are created in the _versions directory at the root of the project. Is it possible (and necessary?) To change the location of this directory? I thought by defining FILEBROWSER_DIRECTORY = 'media/uploads/' and thumbnails would be there. How is this, in the future, prescribed in nginx? Separately static, separately media and more separately _ versions is something?

PS/according to one of the recommendations, I tried to determine MEDIA_URL = 'media/', thinking that miniatures would be created there, but this only led to the fact that in all links there was an extra leading media: http://192.168.100.19:8000/media/_versions...i etc.

Added later
The answer to my question was found.

Quote:We do recommend the following structure for media files:

└── media # site.storage.location (e.g. MEDIA_ROOT)
----── media/_versions # VERSIONS_BASEDIR (outside of site.directory)
----── media/uploads # site.directory

Warning

From version 3.7, defining a VERSIONS_BASEDIR outside of site.directory is mandatory.

Did I understand correctly that this catalog really should be at the root of the project? And how does it appear in nginx?
Reply
#2
Thank`s for the "large number of answers." The answer was found, the question was closed.
buran write May-10-2023, 07:37 AM:
With all due respect, I don't see the point of being sarcastic about [lack of] reply/answers. Especially 6 days after you have found the answer yourself and edited the post accordingly on May 4th. Everyone here is contributing to the extend of their ability and availability. There may be number of reasons why no one responded, incl. your question may have not been clear enough for people dealing with Django.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020