Skip to content

Commit 44efd86

Browse files
committed
rename testapp -> demoapp
1 parent 619cd51 commit 44efd86

File tree

14 files changed

+29
-44
lines changed

14 files changed

+29
-44
lines changed

README-Finder.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Django-Filer ("Finder" branch)
22

33
The "Finder" branch of django-filer is a complete rewrite of the original **django-filer** project.
4-
It is 'work in progress' and is not yet ready for production use. However, the code is in a state
4+
It is 'work in progress' and not yet ready for production use. However, the code is in a state
55
where it can be used for testing and development purposes.
66

77
A rewrite was necessary because the original codebase was not maintainable anymore. Please read this
@@ -136,7 +136,7 @@ In `settings.py` of your project, add these extra dependencies or those you real
136136
'finder',
137137
'finder.contrib.archive', # supports zip, tar, tar.gz, tar.bz2, tar.xz
138138
'finder.contrib.audio', # supports mp3, ogg, flac, wav
139-
'finder.contrib.common', # supports pdf, spreadsheets
139+
'finder.contrib.common', # supports PDF, spreadsheets
140140
'finder.contrib.image.pil', # supports bmp, gif, jpeg, png, tiff
141141
'finder.contrib.image.svg', # supports svg
142142
'finder.contrib.video', # supports mp4, webm, ogv
@@ -145,10 +145,9 @@ In `settings.py` of your project, add these extra dependencies or those you real
145145
```
146146

147147
If you use:
148-
* `finder.contrib.audio`, assure that `ffmpeg-python` is installed.
148+
* `finder.contrib.audio` or `finder.contrib.video`, assure that `ffmpeg-python` is installed.
149149
* `finder.contrib.image.pil`, assure that `Pillow` is installed.
150150
* `finder.contrib.image.svg`, assure that `reportlab` and `svglib` are installed.
151-
* `finder.contrib.video`, assure that `ffmpeg-python` is installed.
152151
* Postgres as database, install `psycopg2` or `psycopg2-binary` if available for your platform.
153152

154153
Run the migrations for app `finder`:
@@ -233,9 +232,9 @@ rendered as HTML, this widget becomes the webcomponent `<finder-file-select …>
233232
with a few additional attributes. The JavaScript part of the widget must be included using the
234233
script tag `<script src="{% static 'finder/js/finder-select.js' %}"></script>`.
235234

236-
The testapp provides an example how this field can be used in a form. Just vist the URL
237-
http://localhost:8000/admin/finder/foldermodel/ and click on the blank area to either select an
238-
existing file or upload a new one.
235+
The demonstration app provides an example how this field can be used in a form. Just vist the URL
236+
http://localhost:8000/demoapp/ and click on the blank area to either select an existing file or
237+
upload a new one.
239238

240239

241240
## Permission System (Proposal)
@@ -261,7 +260,7 @@ Each `AccessControlEntry` has a these fields:
261260
a file, it allows the currently loggedin user to view and use that file.
262261
* A generic foreign key pointing onto the `InodeModel`. This creates a one-to-many relation between
263262
different file types and folders on one side and the access control list on the other.
264-
* A foreign key onto the folder model to set a permission template. Read below for details.
263+
* A foreign key onto the folder model to set a permission template. Read below for details.
265264
* The `execute` flag as seen in Unix file systems and other ACL implementations does not make sense
266265
in this context and is not implemented.
267266

File renamed without changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
from finder.models.folder import FolderModel
55

66

7-
class TestappAdminSite(admin.AdminSite):
7+
class DempappAdminSite(admin.AdminSite):
88
pass
99

1010

11-
admin_site = TestappAdminSite(name="testapp_admin")
11+
admin_site = DempappAdminSite(name="demoapp_admin")
1212
admin_site.register(FolderModel, FolderAdmin)
File renamed without changes.
File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Generated by Django 4.2.15 on 2024-10-26 08:46
1+
# Generated by Django 5.2.dev20241203005448 on 2025-01-03 08:36
22

3-
from django.db import migrations, models
43
import finder.models.fields
4+
from django.db import migrations, models
55

66

77
class Migration(migrations.Migration):
@@ -13,7 +13,7 @@ class Migration(migrations.Migration):
1313

1414
operations = [
1515
migrations.CreateModel(
16-
name='TestAppModel',
16+
name='DemoAppModel',
1717
fields=[
1818
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
1919
('file', finder.models.fields.FinderFileField(blank=True, null=True, verbose_name='Demo File')),
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from finder.models.fields import FinderFileField
44

55

6-
class TestAppModel(models.Model):
6+
class DemoAppModel(models.Model):
77
file = FinderFileField(
88
verbose_name="Demo File",
99
null=True,
Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,18 @@
4343
'finder.contrib.image.pil',
4444
'finder.contrib.image.svg',
4545
'finder.contrib.video',
46-
'testapp',
46+
'demoapp',
4747
]
4848

4949
MIDDLEWARE = [
50-
'django.middleware.security.SecurityMiddleware',
51-
'django.contrib.sessions.middleware.SessionMiddleware',
5250
'django.middleware.common.CommonMiddleware',
53-
'django.middleware.csrf.CsrfViewMiddleware',
54-
'django.contrib.auth.middleware.AuthenticationMiddleware',
51+
'django.contrib.sessions.middleware.SessionMiddleware',
52+
'demoapp.middleware.AutoLoginMiddleware',
5553
'django.contrib.messages.middleware.MessageMiddleware',
56-
'django.middleware.clickjacking.XFrameOptionsMiddleware',
54+
'django.middleware.csrf.CsrfViewMiddleware',
5755
]
5856

59-
ROOT_URLCONF = 'testapp.urls'
57+
ROOT_URLCONF = 'demoapp.urls'
6058

6159
TEMPLATES = [
6260
{
@@ -103,20 +101,10 @@
103101

104102
TIME_ZONE = 'UTC'
105103

106-
MIDDLEWARE = [
107-
'django.middleware.common.CommonMiddleware',
108-
'django.contrib.sessions.middleware.SessionMiddleware',
109-
'testapp.middleware.AutoLoginMiddleware',
110-
'django.contrib.messages.middleware.MessageMiddleware',
111-
'django.middleware.csrf.CsrfViewMiddleware',
112-
]
113-
114104
SILENCED_SYSTEM_CHECKS = ['admin.E408'] # required for AutoLoginMiddleware
115105

116106
USE_I18N = True
117107

118-
ROOT_URLCONF = 'testapp.urls'
119-
120108
STATICFILES_DIRS = [
121109
('node_modules', BASE_DIR / 'node_modules'),
122110
]
@@ -127,8 +115,6 @@
127115

128116
MEDIA_URL = '/media/'
129117

130-
WSGI_APPLICATION = 'wsgi.application'
131-
132118
LOGGING = {
133119
'version': 1,
134120
'disable_existing_loggers': True,

0 commit comments

Comments
 (0)