Skip to content

Commit

Permalink
moved dynamic_storage to a separate repo
Browse files Browse the repository at this point in the history
  • Loading branch information
engAmirEng committed May 25, 2023
1 parent be678f5 commit 0a5da2d
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 200 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Django>=4.2,<4.3
apache-libcloud>=3.6,<3.7
django-cors-headers>=3.13,<3.14
django-debug-toolbar>=4.0,<4.1
django-dynamic-storage==0.1.1
django-environ>=0.9,<1.0
django-grpc>=1.0,<1.1
django-htmx>=1.12,<1.13
Expand Down
4 changes: 2 additions & 2 deletions say/core/migrations/0001_dsws.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import say.dynamic_storage.models
import dynamic_storage.models
import taggit.managers
import wagtail.images.models
import wagtail.models.collections
Expand Down Expand Up @@ -60,7 +60,7 @@ class Migration(migrations.Migration):
),
(
"file",
say.dynamic_storage.models.DynamicImageField(
dynamic_storage.models.DynamicImageField(
height_field="height",
upload_to=wagtail.images.models.get_upload_to,
verbose_name="file",
Expand Down
4 changes: 2 additions & 2 deletions say/core/migrations/0002_alter_dswrendition_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from django.db import migrations
import wagtail.images.models
import say.dynamic_storage.models
import dynamic_storage.models


def delete_all_renditions(apps, schema_editor):
Expand All @@ -28,7 +28,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name="dswrendition",
name="file",
field=say.dynamic_storage.models.DynamicImageField(
field=dynamic_storage.models.DynamicImageField(
height_field="height",
upload_to=wagtail.images.models.get_rendition_upload_to,
width_field="width",
Expand Down
4 changes: 2 additions & 2 deletions say/core/migrations/0003_dswdocument.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import say.dynamic_storage.models
import dynamic_storage.models
import taggit.managers
import wagtail.models.collections
import wagtail.search.index
Expand Down Expand Up @@ -42,7 +42,7 @@ class Migration(migrations.Migration):
),
(
"file",
say.dynamic_storage.models.DynamicFileField(
dynamic_storage.models.DynamicFileField(
upload_to="documents", verbose_name="file"
),
),
Expand Down
5 changes: 2 additions & 3 deletions say/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
get_rendition_upload_to,
)

from grapple.models import GraphQLImage, GraphQLInt, GraphQLString

from say.dynamic_storage.models import (
from dynamic_storage.models import (
DynamicFileField,
DynamicImageField,
DynamicImageFieldFile,
)
from grapple.models import GraphQLImage, GraphQLInt, GraphQLString


class Monkey:
Expand Down
6 changes: 3 additions & 3 deletions say/core/signals.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from django.dispatch import receiver

from say.dynamic_storage.models import DynamicFieldFile
from say.dynamic_storage.signals import pre_dynamic_file_save
from say.dynamic_storage.storage import DynamicStorage
from dynamic_storage.models import DynamicFieldFile
from dynamic_storage.signals import pre_dynamic_file_save
from dynamic_storage.storage import DynamicStorage

from . import models

Expand Down
2 changes: 1 addition & 1 deletion say/core/storage.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from django.utils.deconstruct import deconstructible

from dynamic_storage.storage import DynamicStorageMixin
from storages.backends.apache_libcloud import LibCloudFile as BaseLibCloudFile

from say.customized.libcloud.storage.drivers.minio import MinIOStorageDriver
from say.customized.storages.backends.apache_libcloud import (
LibCloudStorage as BaseLibCloudStorage,
)
from say.dynamic_storage.storage import DynamicStorageMixin


@deconstructible
Expand Down
Empty file removed say/dynamic_storage/__init__.py
Empty file.
142 changes: 0 additions & 142 deletions say/dynamic_storage/models.py

This file was deleted.

5 changes: 0 additions & 5 deletions say/dynamic_storage/signals.py

This file was deleted.

39 changes: 0 additions & 39 deletions say/dynamic_storage/storage.py

This file was deleted.

2 changes: 1 addition & 1 deletion say/storage/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
from django.core.files.storage import Storage
from django.utils.deconstruct import deconstructible

from dynamic_storage.storage import DynamicStorageMixin
from pydantic import BaseModel, ValidationError, conint, constr

from say.core.storage import MinioStorage
from say.dynamic_storage.storage import DynamicStorageMixin


class StorageDoesNotExists(Exception):
Expand Down

0 comments on commit 0a5da2d

Please sign in to comment.