-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from maykinmedia/feature/94-support-dots-in-cl…
…aim-names Support dots in claim names
- Loading branch information
Showing
10 changed files
with
623 additions
and
136 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from django.db import models | ||
from django.utils.translation import gettext_lazy as _ | ||
|
||
from django_jsonform.models.fields import ArrayField | ||
|
||
|
||
class ClaimField(ArrayField): | ||
""" | ||
A field to store a path to claims holding the desired value(s). | ||
Each item is a segment in the path from the root to leaf for nested claims. | ||
""" | ||
|
||
def __init__(self, *args, **kwargs): | ||
kwargs["base_field"] = models.CharField(_("claim path segment"), max_length=50) | ||
super().__init__(*args, **kwargs) |
Oops, something went wrong.