Skip to content

Merge Dev #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion django_chunk_file_upload/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__title__ = "django-chunk-file-upload"
__version__ = "1.0.0"
__version__ = "1.0.2"
__author__ = "Tu Pham"
__license__ = "MIT"
__copyright__ = "Copyright 2024 Tu Pham and contributors"
2 changes: 1 addition & 1 deletion django_chunk_file_upload/app_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def from_kwargs(cls, **kwargs) -> "_LazySettings":
if image_optimizer and isinstance(image_optimizer, dict):
kwargs["image_optimizer"] = _ImageSettings.from_kwargs(**image_optimizer)

permission_classes = kwargs.pop("permission_classes")
permission_classes = kwargs.pop("permission_classes", None)
if permission_classes and isinstance(
permission_classes, (tuple, list, set, str)
):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated by Django 5.0.7 on 2024-08-28 02:33

from django.db import migrations
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):
Expand All @@ -15,4 +16,15 @@ class Migration(migrations.Migration):
new_name="filemanager_checksum_idx",
old_name="file_manager_checksum_idx",
),
migrations.AlterField(
model_name="filemanager",
name="user",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=models.deletion.SET_NULL,
related_name="%(class)s_files",
to=settings.AUTH_USER_MODEL,
),
),
]
2 changes: 1 addition & 1 deletion django_chunk_file_upload/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class FileManagerMixin(models.Model):
on_delete=models.SET_NULL,
null=True,
blank=True,
related_name="files",
related_name="%(class)s_files",
)
metadata = models.JSONField(default=dict)

Expand Down
2 changes: 1 addition & 1 deletion django_chunk_file_upload/typed.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def path(self, value: str) -> None:

@property
def save_path(self) -> str:
return get_save_file_path(self.path)
return get_save_file_path(self.path, self._upload_to)

@property
def extension(self) -> str:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Django>=3.2
pillow~=10.4.0
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ packages = find:
python_requires = >=3.9
install_requires =
Django >= 3.2
pillow~=10.4.0

[options.packages.find]
exclude =
Expand Down