mirror of
https://github.com/magnum-opus-nn-cp/backend.git
synced 2024-12-04 04:33:44 +03:00
linter fix
This commit is contained in:
parent
265a57ec28
commit
5f4a10a25c
|
@ -28,4 +28,3 @@ REDIS_URL=redis://redis:6379/0
|
|||
# Flower
|
||||
CELERY_FLOWER_USER=UXyQUejoipUYkEXdXBHQWpPqqnQYbtSb
|
||||
CELERY_FLOWER_PASSWORD=r17u4eedX6PY1EsAh6l4VIGeBKh3ntAWT91mwHHZJrbgPYrekAGqHbzXsdUrJ9BJ
|
||||
|
||||
|
|
1
.github/dependabot.yml
vendored
1
.github/dependabot.yml
vendored
|
@ -77,4 +77,3 @@ updates:
|
|||
# Check for updates to GitHub Actions every weekday
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
|||
!.gitkeep
|
||||
.idea
|
||||
.env
|
||||
|
||||
### Python template
|
||||
# Byte-compiled / optimized / DLL files
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.urls import include, path
|
||||
from django.views import defaults as default_views
|
||||
from django.views.generic import TemplateView
|
||||
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
|
||||
from rest_framework.authtoken.views import obtain_auth_token
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
from django.db import models
|
||||
|
||||
from press_release_nl.utils.files import user_file_upload_mixin
|
||||
from press_release_nl.utils.generators import generate_charset
|
||||
from press_release_nl.common.signals import (
|
||||
create_cropped_model_image,
|
||||
delete_cropped_model_image,
|
||||
update_cropped_model_image,
|
||||
)
|
||||
from press_release_nl.utils.files import user_file_upload_mixin
|
||||
from press_release_nl.utils.generators import generate_charset
|
||||
|
||||
|
||||
class BaseImageModel(models.Model):
|
||||
|
|
|
@ -7,7 +7,7 @@ def create_cropped_model_image(sender, instance, created, **kwargs):
|
|||
model = sender
|
||||
if created:
|
||||
if instance.image:
|
||||
|
||||
|
||||
crop_model_image.apply_async(
|
||||
kwargs={
|
||||
"pk": instance.pk,
|
||||
|
@ -16,7 +16,7 @@ def create_cropped_model_image(sender, instance, created, **kwargs):
|
|||
},
|
||||
countdown=2,
|
||||
)
|
||||
|
||||
|
||||
|
||||
def update_cropped_model_image(sender, instance, **kwargs):
|
||||
model = sender
|
||||
|
@ -30,7 +30,7 @@ def update_cropped_model_image(sender, instance, **kwargs):
|
|||
# run task to create new cropped image
|
||||
if kwargs["update_fields"] != frozenset({"image_cropped"}) and instance:
|
||||
if instance.image:
|
||||
|
||||
|
||||
crop_model_image.apply_async(
|
||||
kwargs={
|
||||
"pk": instance.pk,
|
||||
|
@ -39,7 +39,7 @@ def update_cropped_model_image(sender, instance, **kwargs):
|
|||
},
|
||||
countdown=2,
|
||||
)
|
||||
|
||||
|
||||
else:
|
||||
instance.image_cropped = None
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from django.core.cache import cache
|
||||
from django.db.models.signals import post_save, post_delete, pre_save
|
||||
from django.db.models.signals import post_delete, post_save, pre_save
|
||||
from django.dispatch import receiver
|
||||
|
||||
from press_release_nl.tickets.models import Ticket
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import os
|
||||
|
||||
from io import BytesIO
|
||||
|
||||
from PIL import Image
|
||||
|
||||
from press_release_nl.users.models import User
|
||||
|
|
Loading…
Reference in New Issue
Block a user