You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README-Finder.md
+67-11Lines changed: 67 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,8 +22,10 @@ The "Finder" branch of django-filer has less third-party dependencies. It does n
22
22
23
23
For large datasets [django-cte](https://github.com/dimagi/django-cte) is reccomended, in order to improve the speed when searching.
24
24
25
-
The client part of the new admin user interface has no runtime dependencies. It is compiled into a
26
-
single JavaScript file, which is included by the corresponding admin views.
25
+
The client part of the new admin user interface has no runtime dependencies. It is compiled into two
26
+
JavaScript files, which are included by the corresponding admin views. One of them is used for the
27
+
django-admin interface, the other one for the frontend. The frontend part is also used for the new
28
+
file selection widget.
27
29
28
30
29
31
## Extensibility
@@ -99,6 +101,9 @@ The new user interface is based on the [React](https://reactjs.org/) framework w
99
101
100
102
## Installation
101
103
104
+
The new version of **django-filer** requires Django-5.2 or later. Since this currently is not
105
+
released, you have to install the current development version of Django from GitHub.
106
+
102
107
In `settings.py` of your project, add these extra dependencies or those one you really need:
103
108
104
109
```python
@@ -115,7 +120,7 @@ In `settings.py` of your project, add these extra dependencies or those one you
115
120
]
116
121
```
117
122
118
-
If you use `finder.contrib.audio`, assure that `pydub` is installed.
123
+
If you use `finder.contrib.audio`, assure that `ffmpeg-python` is installed.
119
124
If you use `finder.contrib.image.pil`, assure that `Pillow` is installed.
120
125
If you use `finder.contrib.image.svg`, assure that `reportlab` and `svglib` are installed.
121
126
If you use `finder.contrib.video`, assure that `ffmpeg-python` is installed.
@@ -128,8 +133,8 @@ python manage.py migrate finder
128
133
```
129
134
130
135
If you already have **django-filer** installed and that database is filled, you can migrate the
131
-
meta-data of those files and folders into the new database tables. The pysical files on disk are not
132
-
affected by this migration.
136
+
meta-data of those files and folders into the new database tables. The physical files on disk are
137
+
not affected by this migration.
133
138
134
139
```shell
135
140
python manage.py filer_to_finder
@@ -159,10 +164,61 @@ http://localhost:8000/admin/finder/foldermodel/ . Clicking on that link will red
159
164
root folder of the current site.
160
165
161
166
162
-
## Limitations
167
+
## Admin Backend
168
+
169
+
The admin backend is implemented as a web interface mimicking the features of the Finder app of your
170
+
operating system's graphical user interface. It is possible to …
171
+
172
+
* Download, upload files and to view them as thumbnailed images.
173
+
* Navigate through the folder tree by double-clicking on a folder.
174
+
* Move files and folders by drag and drop.
175
+
* Select multiple files and folders by a rectangular selection with the mouse.
176
+
* Cut or copy files and folders to a clipboard and paste them into another folder.
177
+
* Delete files and folders, which are moved to a trash folder.
178
+
* Restore files and folders from the trash folder or to delete them permanently.
179
+
* Create new folders and to upload files.
180
+
* Rename files and folders by slowly double-clicking on their name.
181
+
* Create multiple tabs for favourite folders quick access. They also can be used to drag files from
182
+
the current view into one of the tabs.
183
+
* Search for files and folders.
184
+
* Tag files and filter them by their tags.
185
+
186
+
187
+
## Interface to external Django projects
188
+
189
+
**django-filer** (Finder branch) ships with a new file selection field. This field can be used in
190
+
any Django model. It allows to select a file from the files stored inside **django-filer**. It also
191
+
allows to upload a local file and use it immediatly.
192
+
193
+
Example:
194
+
195
+
```python
196
+
from django.db import models
197
+
from finder.models.fields import FinderFileField
198
+
199
+
classMyModel(models.Model):
200
+
my_file = FinderFileField(
201
+
null=True,
202
+
blank=True,
203
+
)
204
+
```
205
+
206
+
Forms generated from this model will have a file selection widget for the `my_file` field. When
207
+
rendered as HTML, this widget is the webcomponent `<finder-file-select …></finder-file-select>`
208
+
with a few additional attributes. The JavaScript part of the widget must be included using the
209
+
script tag `<script src="{% static 'finder/js/finder-select.js' %}"></script>`.
210
+
211
+
## Extendibility
212
+
213
+
**django-filer** Finder branch can be extended by adding new models inheriting from either
214
+
``finder.models.file.AbstractFileModel`` or from ``finder.models.folder.FileModel``. If you inherit
215
+
from the latter, then create a proxy model sharing the same database table across different file
216
+
types.
217
+
218
+
. This allows to create specialized models for different``
219
+
220
+
file types. This is done by creating a
163
221
164
-
Currently only the admin backend is implemented. I am currently working on a file selection widget
165
-
which can be used in any frontend or backend application.
166
222
167
223
168
224
## Further Steps
@@ -171,9 +227,9 @@ The focal point of the `ImageModel` will take the resolution of the corresponsdi
171
227
consideration. This will allow to create different versions of the same canonical image, depending
172
228
on the width of the device the image is displayed.
173
229
174
-
The permission system will also be implemented using a different model. This probaly will orient
175
-
itself on the Access Control Lists (ACLs) of [NTFS](https://learn.microsoft.com/en-us/windows/win32/secauthz/access-control-lists).
176
-
This will allow to grant permissions to users and groups for each folder (but not file) individually.
230
+
The permission system will be implemented using a model based on the idea of Access Control Lists
231
+
(ACLs) of [NTFS](https://learn.microsoft.com/en-us/windows/win32/secauthz/access-control-lists). This will allow to grant permissions to users and groups for each folder
232
+
(but not file) individually.
177
233
178
234
A quota system will be implemented, which allows to limit the amount of disk space a user can use.
0 commit comments