-
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.
Introduce Django-Generic-API-Permissions: We now use the permissions/visibility framework that was originally derived from Emeis' code. This simplifies stuff a lot, and removes tons of code that isn't required anymore. And, as a bonus, we now also get the ability to provide custom validations, free of charge!
- Loading branch information
Showing
15 changed files
with
168 additions
and
694 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
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,20 +1,6 @@ | ||
from django.apps import AppConfig | ||
from django.conf import settings | ||
from django.utils.module_loading import import_string | ||
|
||
|
||
class DefaultConfig(AppConfig): | ||
name = "emeis.core" | ||
label = "emeis_core" | ||
|
||
def ready(self): | ||
from .models import PermissionMixin, VisibilityMixin | ||
|
||
# to avoid recursive import error, load extension classes | ||
# only once the app is ready | ||
PermissionMixin.permission_classes = [ | ||
import_string(cls) for cls in settings.PERMISSION_CLASSES | ||
] | ||
VisibilityMixin.visibility_classes = [ | ||
import_string(cls) for cls in settings.VISIBILITY_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
Oops, something went wrong.