-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use dgap instead of custom visibilities and permissions (#289)
* feat!: use dgap instead of custom visibilities and permissions BREAKING CHANGE: This removes the custom permission system for DGAP. Change imports for the visibility, permission and validators Example: From ```py from alexandria.core.visibilities import BaseVisibility, filter_queryset_for ``` to ```py from generic_permissions.visibilities import, filter_queryset_for ``` * chore: update readme * fix: cleanup dgap merge
- Loading branch information
Showing
22 changed files
with
1,170 additions
and
1,269 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,25 +1,6 @@ | ||
from django.apps import AppConfig | ||
from django.conf import settings | ||
from django.utils.module_loading import import_string | ||
|
||
|
||
class DefaultConfig(AppConfig): | ||
name = "alexandria.core" | ||
label = "alexandria_core" | ||
|
||
def ready(self): | ||
# to avoid recursive import error, load extension classes | ||
# only once the app is ready | ||
from .models import PermissionMixin, VisibilityMixin | ||
from .serializers import BaseSerializer | ||
|
||
PermissionMixin.permission_classes = [ | ||
import_string(cls) for cls in settings.ALEXANDRIA_PERMISSION_CLASSES | ||
] | ||
VisibilityMixin.visibility_classes = [ | ||
import_string(cls) for cls in settings.ALEXANDRIA_VISIBILITY_CLASSES | ||
] | ||
|
||
BaseSerializer.validation_classes = [ | ||
import_string(cls) for cls in settings.ALEXANDRIA_VALIDATION_CLASSES | ||
] |
This file was deleted.
Oops, something went wrong.
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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.