Skip to content

Commit

Permalink
update black
Browse files Browse the repository at this point in the history
  • Loading branch information
roniahmadi committed Mar 5, 2024
1 parent f61b9d0 commit 5414d82
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions apidata/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
UserAuthToken,
UserViewSet,
)
from apidata.viewsets.distric_viewset import DistricViewSet
from apidata.viewsets.produks_viewset import (
GambarProdukViewset,
KategoriViewset,
ProdukViewSet,
TipeProdukViewset,
WarnaProdukViewset
WarnaProdukViewset,
)
from apidata.viewsets.provinsi_viewset import ProvinsiViewSet
from apidata.viewsets.regency_viewset import RegencyViewSet
from apidata.viewsets.distric_viewset import DistricViewSet
from apidata.viewsets.slides_viewset import SlidesViewSet
from apidata.viewsets.stores_viewset import UserStoreAddressViewset, UserStoreViewset
from apidata.viewsets.ulasan_viewset import UlasanViewSet
Expand Down
4 changes: 2 additions & 2 deletions apidata/viewsets/distric_viewset.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from rest_framework import viewsets, filters
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework import filters, viewsets

from apidata.serializers.distric_serializer import DistricSerializer
from django_filters.rest_framework import DjangoFilterBackend
from master.models import Distric


Expand Down
4 changes: 2 additions & 2 deletions apidata/viewsets/provinsi_viewset.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from rest_framework import viewsets, filters
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework import filters, viewsets

from apidata.serializers.provinsi_serializer import ProvinsiSerializer
from django_filters.rest_framework import DjangoFilterBackend
from master.models import Provinsi


Expand Down
4 changes: 2 additions & 2 deletions apidata/viewsets/regency_viewset.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from rest_framework import viewsets, filters
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework import filters, viewsets

from apidata.serializers.regency_serializer import RegencySerializer
from django_filters.rest_framework import DjangoFilterBackend
from master.models import Regency


Expand Down
6 changes: 3 additions & 3 deletions frontend/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from frontend.views.add_to_cart_view import AddToCart
from frontend.views.alamat_toko_delete_view import DeleteAlamatToko
from frontend.views.alamat_toko_view import AlamatToko
from frontend.views.profile.alamat_user_view import AlamatUser
from frontend.views.alamt_toko_tambah_view import AlamatTokoTambah
from frontend.views.approve_view import Approve
from frontend.views.archive_barang_view import ArchiveBarang
Expand Down Expand Up @@ -33,10 +32,11 @@
from frontend.views.payments_cart_view import PaymentsCart
from frontend.views.privacyandpolicy_view import PrivacyAndPolicy
from frontend.views.produk_view import Produks
from frontend.views.profile_delete_detail_view import DeleteDetailProfile
from frontend.views.profile_detail_address_view import DetailProfileAddressMain
from frontend.views.profile.alamat_user_view import AlamatUser
from frontend.views.profile.profile_alamat_view import ProfileAlamat
from frontend.views.profile.profile_edit_view import ProfileEdit
from frontend.views.profile_delete_detail_view import DeleteDetailProfile
from frontend.views.profile_detail_address_view import DetailProfileAddressMain
from frontend.views.profile_view import Profile
from frontend.views.promo_view import Promo
from frontend.views.save_token_views import SaveToken
Expand Down
3 changes: 1 addition & 2 deletions frontend/views/profile/profile_alamat_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt

from profiles.models import UserProfile, UserProfileAddress

from frontend.views.base_view import FrontPage
from profiles.models import UserProfile, UserProfileAddress


@method_decorator(csrf_exempt, name="dispatch")
Expand Down
11 changes: 6 additions & 5 deletions frontend/views/profile/profile_edit_view.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect, render
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.contrib import messages
from frontend.view_helper import translater

from profiles.models import LangSupport

from frontend.view_helper import translater
from frontend.views.base_view import FrontPage
from profiles.models import LangSupport


@method_decorator(csrf_exempt, name="dispatch")
Expand All @@ -33,6 +32,8 @@ def post(self, request):
models.image_profile = request.FILES.get("gambars")
models.save()
languagescode = request.user.languages.code if request.user.languages else "en"
message = translater(languagescode, "Sukses Menyimpan Profil", "Sukses Menyimpan Profil")
message = translater(
languagescode, "Sukses Menyimpan Profil", "Sukses Menyimpan Profil"
)
messages.success(request, message)
return redirect("/profiles/edit")

0 comments on commit 5414d82

Please sign in to comment.