-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
corrections proposé lors de la relecture
- Loading branch information
Showing
14 changed files
with
80 additions
and
218 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from django.contrib.auth.mixins import LoginRequiredMixin | ||
|
||
|
||
class IsStaffMixin(LoginRequiredMixin): | ||
def dispatch(self, request, *args, **kwargs): | ||
if not request.user.is_staff: | ||
return self.handle_no_permission() | ||
return super().dispatch(request, *args, **kwargs) |
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 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,15 +1,15 @@ | ||
from django.contrib.gis import admin | ||
|
||
from data.models import SuggestionCohorte, SuggestionUnitaire | ||
from data.models import Suggestion, SuggestionCohorte | ||
|
||
|
||
class SuggestionCohorteAdmin(admin.ModelAdmin): | ||
pass | ||
|
||
|
||
class SuggestionUnitaireAdmin(admin.ModelAdmin): | ||
class SuggestionAdmin(admin.ModelAdmin): | ||
pass | ||
|
||
|
||
admin.site.register(SuggestionCohorte, SuggestionCohorteAdmin) | ||
admin.site.register(SuggestionUnitaire, SuggestionUnitaireAdmin) | ||
admin.site.register(Suggestion, SuggestionAdmin) |
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 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,11 +1,11 @@ | ||
from django.urls import path | ||
|
||
from data.views import SuggestionManagment | ||
from data.views import SuggestionManagement | ||
|
||
urlpatterns = [ | ||
path( | ||
"suggestions", | ||
SuggestionManagment.as_view(), | ||
"suggestions/", | ||
SuggestionManagement.as_view(), | ||
name="suggestions", | ||
), | ||
] |
Oops, something went wrong.