-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
17 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
from django.db import models | ||
from django.utils.translation import gettext_lazy as _ | ||
|
||
from djchoices import ChoiceItem, DjangoChoices | ||
|
||
|
||
class Operators(DjangoChoices): | ||
exact = ChoiceItem("exact", _("equal to")) | ||
gt = ChoiceItem("gt", _("greater than")) | ||
gte = ChoiceItem("gte", _("greater than or equal to")) | ||
lt = ChoiceItem("lt", _("lower than")) | ||
lte = ChoiceItem("lte", _("lower than or equal to")) | ||
icontains = ChoiceItem("icontains", _("case-insensitive partial match")) | ||
class Operators(models.TextChoices): | ||
exact = "exact", _("equal to") | ||
gt = "gt", _("greater than") | ||
gte = "gte", _("greater than or equal to") | ||
lt = "lt", _("lower than") | ||
lte = "lte", _("lower than or equal to") | ||
icontains = "icontains", _("case-insensitive partial match") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
from django.db import models | ||
from django.utils.translation import gettext_lazy as _ | ||
|
||
from djchoices import ChoiceItem, DjangoChoices | ||
|
||
|
||
class PermissionModes(DjangoChoices): | ||
read_only = ChoiceItem("read_only", _("Read-only")) | ||
read_and_write = ChoiceItem("read_and_write", _("Read and write")) | ||
class PermissionModes(models.TextChoices): | ||
read_only = "read_only", _("Read-only") | ||
read_and_write = "read_and_write", _("Read and write") |