Skip to content
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

Upgrade to Django v4 #206

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
django-mptt==0.9.1
django-mptt==0.14.0
factory-boy==2.11.1
mock==2.0.0
pyhamcrest==1.9.0
django-cte==1.1.4
django-cte==1.2.1
django-codemirror2==0.2
behave-django==1.3.0
5 changes: 4 additions & 1 deletion river/models/base_model.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from django.conf import settings

from django.db import models
from django.utils.translation import ugettext_lazy as _
try:
from django.utils.translation import ugettext_lazy as _
except ImportError:
from django.utils.translation import gettext_lazy as _

from river.models.managers.rivermanager import RiverManager

Expand Down
5 changes: 4 additions & 1 deletion river/models/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

from django.db import models
from django.db.models.signals import pre_save
from django.utils.translation import ugettext_lazy as _
try:
from django.utils.translation import ugettext_lazy as _
except ImportError:
from django.utils.translation import gettext_lazy as _

from river.models import BaseModel

Expand Down
5 changes: 4 additions & 1 deletion river/models/hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.db.models import PROTECT
from django.utils.translation import ugettext_lazy as _
try:
from django.utils.translation import ugettext_lazy as _
except ImportError:
from django.utils.translation import gettext_lazy as _

from river.models import Workflow, GenericForeignKey, BaseModel
from river.models.function import Function
Expand Down
5 changes: 4 additions & 1 deletion river/models/on_approved_hook.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from django.db import models
from django.db.models import CASCADE
from django.utils.translation import ugettext_lazy as _
try:
from django.utils.translation import ugettext_lazy as _
except ImportError:
from django.utils.translation import gettext_lazy as _

from river.models import TransitionApprovalMeta, TransitionApproval
from river.models.hook import Hook
Expand Down
5 changes: 4 additions & 1 deletion river/models/on_transit_hook.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from django.db import models
from django.db.models import CASCADE
from django.utils.translation import ugettext_lazy as _
try:
from django.utils.translation import ugettext_lazy as _
except ImportError:
from django.utils.translation import gettext_lazy as _

from river.models import TransitionMeta, Transition
from river.models.hook import Hook
Expand Down
5 changes: 4 additions & 1 deletion river/models/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
except ImportError:
from six import python_2_unicode_compatible

from django.utils.translation import ugettext_lazy as _
try:
from django.utils.translation import ugettext_lazy as _
except ImportError:
from django.utils.translation import gettext_lazy as _

from river.models.base_model import BaseModel
from river.models.managers.state import StateManager
Expand Down
5 changes: 4 additions & 1 deletion river/models/transition.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
from django.contrib.contenttypes.generic import GenericForeignKey

from django.db import models
from django.utils.translation import ugettext_lazy as _
try:
from django.utils.translation import ugettext_lazy as _
except ImportError:
from django.utils.translation import gettext_lazy as _

from river.models.base_model import BaseModel
from river.models.managers.transitionapproval import TransitionApprovalManager
Expand Down
5 changes: 4 additions & 1 deletion river/models/transitionapproval.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
from django.contrib.contenttypes.generic import GenericForeignKey

from django.db import models
from django.utils.translation import ugettext_lazy as _
try:
from django.utils.translation import ugettext_lazy as _
except ImportError:
from django.utils.translation import gettext_lazy as _

from river.models.base_model import BaseModel
from river.models.managers.transitionapproval import TransitionApprovalManager
Expand Down
6 changes: 4 additions & 2 deletions river/models/transitionapprovalmeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
from django.db import models, transaction
from django.db.models import PROTECT
from django.db.models.signals import post_save, pre_delete
from django.utils.translation import ugettext_lazy as _

try:
from django.utils.translation import ugettext_lazy as _
except ImportError:
from django.utils.translation import gettext_lazy as _
from river.config import app_config
from river.models import Workflow
from river.models.base_model import BaseModel
Expand Down
5 changes: 4 additions & 1 deletion river/models/transitionmeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

from django.db import models
from django.db.models import PROTECT
from django.utils.translation import ugettext_lazy as _
try:
from django.utils.translation import ugettext_lazy as _
except ImportError:
from django.utils.translation import gettext_lazy as _

from river.models import State, Workflow
from river.models.base_model import BaseModel
Expand Down
5 changes: 4 additions & 1 deletion river/models/workflow.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from django.db import models
from django.db.models import PROTECT
from django.utils.translation import ugettext_lazy as _
try:
from django.utils.translation import ugettext_lazy as _
except ImportError:
from django.utils.translation import gettext_lazy as _

from river.config import app_config
from river.models import BaseModel, State
Expand Down
12 changes: 6 additions & 6 deletions river/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
from river.models.on_complete_hook import OnCompleteHook
from river.models.on_transit_hook import OnTransitHook

pre_on_complete = Signal(providing_args=["workflow_object", "field_name", ])
post_on_complete = Signal(providing_args=["workflow_object", "field_name", ])
pre_on_complete = Signal()
post_on_complete = Signal()

pre_transition = Signal(providing_args=["workflow_object", "field_name", "source_state", "destination_state"])
post_transition = Signal(providing_args=["workflow_object", "field_name", "source_state", "destination_state"])
pre_transition = Signal()
post_transition = Signal()

pre_approve = Signal(providing_args=["workflow_object", "field_name", "transition_approval"])
post_approve = Signal(providing_args=["workflow_object", "field_name", "transition_approval", "transition_approval_meta"])
pre_approve = Signal()
post_approve = Signal()

LOGGER = logging.getLogger(__name__)

Expand Down