diff --git a/payments/admin.py b/payments/admin.py index b4b82420..1f617523 100644 --- a/payments/admin.py +++ b/payments/admin.py @@ -2,7 +2,6 @@ from django.contrib import admin from django.contrib.admin.decorators import display -from fsm_admin.mixins import FSMTransitionMixin from mitol.common.admin import TimestampedModelAdmin from reversion.admin import VersionAdmin @@ -53,7 +52,7 @@ def has_add_permission(self, request, obj=None): # noqa: ARG002 can_add = False -class BaseOrderAdmin(FSMTransitionMixin, TimestampedModelAdmin): +class BaseOrderAdmin(TimestampedModelAdmin): """Base admin for Order""" search_fields = [ diff --git a/payments/migrations/0001_add_order_and_basket_models.py b/payments/migrations/0001_add_order_and_basket_models.py index 3033a935..6f5314de 100644 --- a/payments/migrations/0001_add_order_and_basket_models.py +++ b/payments/migrations/0001_add_order_and_basket_models.py @@ -1,6 +1,5 @@ # Generated by Django 4.2.8 on 2024-01-11 16:49 import django.db.models.deletion -import django_fsm from django.conf import settings from django.db import migrations, models @@ -67,7 +66,7 @@ class Migration(migrations.Migration): ("updated_on", models.DateTimeField(auto_now=True)), ( "state", - django_fsm.FSMField( + models.CharField( choices=[ ("pending", "Pending"), ("fulfilled", "Fulfilled"), @@ -76,10 +75,8 @@ class Migration(migrations.Migration): ("declined", "Declined"), ("errored", "Errored"), ("review", "Review"), - ("partially_refunded", "Partially Refunded"), ], default="pending", - max_length=50, ), ), ( diff --git a/poetry.lock b/poetry.lock index 5e108029..06267839 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. [[package]] name = "amqp" @@ -1048,36 +1048,6 @@ files = [ [package.dependencies] Django = ">=3.2" -[[package]] -name = "django-fsm" -version = "3.0.0" -description = "Django friendly finite state machine support." -optional = false -python-versions = "*" -files = [ - {file = "django-fsm-3.0.0.tar.gz", hash = "sha256:0112bcac573ad14051cf8ebe73bf296b6d5409f093e5f1677eb16e2196e263b3"}, - {file = "django_fsm-3.0.0-py2.py3-none-any.whl", hash = "sha256:fa28f84f47eae7ce9247585ac6c1895e4ada08efff93fb243a59e9ff77b2d4ec"}, -] - -[[package]] -name = "django-fsm-admin-maintained" -version = "1.2.6" -description = "Integrate django-fsm state transitions into the django admin with django 4 support." -optional = false -python-versions = "*" -files = [] -develop = false - -[package.dependencies] -Django = ">=1.6" -django-fsm = ">=2.1.0" - -[package.source] -type = "git" -url = "https://github.com/7tg/django-fsm-admin-django-4.git" -reference = "HEAD" -resolved_reference = "0a82736a1f41e7d947a7f7eda90fe0d48afb6b1f" - [[package]] name = "django-guardian" version = "2.4.0" @@ -4145,4 +4115,4 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = "^3.11.0" -content-hash = "f3c16a31a913537d8033660c8343c07fbf33db39c4dbc9d6a0869a944ed2730e" +content-hash = "084508218f325c3596e886c2d426b3df8f6652b7c03c2326d7f3bc793a27d720" diff --git a/pyproject.toml b/pyproject.toml index ad8e30d0..46426d4e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,7 +75,6 @@ mitol-django-common = "^2023.12.19" mitol-django-payment-gateway = "^2023.12.19" deepdiff = "^6.7.1" django-safedelete = "^1.3.3" -django-fsm-admin-maintained = {git = "https://github.com/7tg/django-fsm-admin-django-4.git"} python-slugify = "^8.0.1" django-oauth-toolkit = "^2.3.0" requests-oauthlib = "^1.3.1" diff --git a/unified_ecommerce/settings.py b/unified_ecommerce/settings.py index 36c0b3fe..d95e897f 100644 --- a/unified_ecommerce/settings.py +++ b/unified_ecommerce/settings.py @@ -88,8 +88,6 @@ "drf_spectacular", "safedelete", "reversion", - "django_fsm", - "fsm_admin", "oauth2_provider", # Application modules "unified_ecommerce",