Skip to content

Commit

Permalink
add choices() classmethod to Options for django
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelchen committed Apr 18, 2023
1 parent f37609e commit 0512099
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion optenum/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,10 @@ class DoorState(Options):
```
"""

pass
@classmethod
def choices(cls):
# for django choices
return cls.get_list('code', 'text')


__all__ = ('Options', 'OptionGroup')
Expand Down
2 changes: 1 addition & 1 deletion optenum/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
""" version file """

__version__ = '1.1.8'
__version__ = '1.1.9'

0 comments on commit 0512099

Please sign in to comment.