@@ -50,13 +50,16 @@ while preserving the possibility to perform queries across all tables. This allo
5050models inheriting from the ` AbstractFileModel ` without the need of ** django-polymorphic** , and thus
5151a join between two or more tables for each query.
5252
53- The Admin interface has also been completely rewritten and allows multi-tenant usage out of the box.
54- For instance, there is no more list view for the ` FolderModel ` and the ` FileModel ` (or any
55- specialized implementation). Instead, there are only details views for each of those models. This is
56- much nearer to what a user would expect from a file system. Therefore, if a user wants to access the
57- list view of a folder, he is redirected immediately to the detail view of the root folder of the
58- given tenant. From there, he can traverse the folder tree in the same manner he's used to from his
59- operating system.
53+ Each root folder is associated with a * realm* . A realm is a named area inside the file system, which
54+ can be used to separate files and folders of different tenants. Each realm has its own root folder.
55+ By using realms, it is possible to use ** django-filer** in a multi-tenant environment.
56+
57+ The Admin interface has also been completely rewritten. For instance, there is no more list view for
58+ the ` FolderModel ` and the ` FileModel ` (or any specialized implementation). Instead, there are only
59+ details views for each of those models. This is much nearer to what a user would expect from a file
60+ system. Therefore, if a user wants to access the list view of a folder, he is redirected immediately
61+ to the detail view of the root folder of the given tenant. From there, he can traverse the folder
62+ tree in the same manner he's used to from his operating system.
6063
6164
6265## New User Interface
@@ -95,8 +98,8 @@ ancestors. This allows to easily move files between those folders.
9598### Multiple Favrourite Folders
9699
97100Each user can have multiple favourite folders. This allows him to quickly access those folders from
98- the navigation bar. It also it pssoble to drag a file from the current view into one of the tabs for
99- of the favorite folders.
101+ the navigation bar. It is also possible to drag a file from the current view into one of the tabs
102+ for of the favorite folders.
100103
101104
102105### Implementation Details
@@ -142,7 +145,56 @@ If you use:
142145* ` finder.contrib.audio ` or ` finder.contrib.video ` , assure that ` ffmpeg-python ` is installed.
143146* ` finder.contrib.image.pil ` , assure that ` Pillow ` is installed.
144147* ` finder.contrib.image.svg ` , assure that ` reportlab ` and ` svglib ` are installed.
145- * Postgres as database, install ` psycopg2 ` or ` psycopg2-binary ` if available for your platform.
148+ * Postgres as a database, install ` psycopg2 ` or ` psycopg2-binary ` if available for your platform.
149+
150+ Each realm requires two storage backends. One for the public files and one for their thumbnails
151+ and/or samples. Add these storage backends to the ` STORAGES ` setting in your ` settings.py ` :
152+
153+ ``` python
154+ STORAGES = {
155+ ' default' : {
156+ ' BACKEND' : ' django.core.files.storage.FileSystemStorage' ,
157+ },
158+ ' staticfiles' : {
159+ ' BACKEND' : ' django.contrib.staticfiles.storage.StaticFilesStorage' ,
160+ },
161+ ' finder_public' : {
162+ ' BACKEND' : ' finder.storage.FinderSystemStorage' ,
163+ ' OPTIONS' : {
164+ ' location' : ' /path/to/your/media/filer_public' ,
165+ ' base_url' : ' /media/filer_public/' ,
166+ ' allow_overwrite' : True ,
167+ },
168+ },
169+ ' finder_public_samples' : {
170+ ' BACKEND' : ' finder.storage.FinderSystemStorage' ,
171+ ' OPTIONS' : {
172+ ' location' : ' /path/to/your/media/filer_public_thumbnails' ,
173+ ' base_url' : ' /media/filer_public_thumbnails/' ,
174+ ' allow_overwrite' : True ,
175+ },
176+ },
177+ }
178+ ```
179+
180+ If instead of using the local file system you want to use another storage backend, such as Amazon S3
181+ or Google Cloud Storage, configure the corresponding storage backend in the ` STORAGES ` setting as:
182+
183+ ``` python
184+ STORAGES = {
185+ ...
186+ ' finder_public' : {
187+ ' BACKEND' : ' storages.backends.s3.S3Storage' ,
188+ ' OPTIONS' : {... },
189+ },
190+ ' finder_public_samples' : {
191+ ' BACKEND' : ' storages.backends.s3.S3Storage' ,
192+ ' OPTIONS' : {... },
193+ },
194+ }
195+ ```
196+
197+ Note that multiple realms can share the same storage location or bucket.
146198
147199Run the migrations for app ` finder ` :
148200
0 commit comments