-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Staff user admin permissions (#1057)
- Loading branch information
Showing
10 changed files
with
79 additions
and
29 deletions.
There are no files selected for viewing
Empty file.
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,12 +1,10 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. | ||
from admin.admin import ApilosModelAdmin | ||
from .models import Bailleur | ||
|
||
|
||
class BailleurAdmin(admin.ModelAdmin): | ||
@admin.register(Bailleur) | ||
class BailleurAdmin(ApilosModelAdmin): | ||
search_fields = ["nom"] | ||
list_display = ["nom", "nature_bailleur", "sous_nature_bailleur", "ville"] | ||
|
||
|
||
admin.site.register(Bailleur, BailleurAdmin) |
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,13 +1,10 @@ | ||
from django.contrib import admin | ||
from admin.admin import ApilosModelAdmin | ||
|
||
from .models import ( | ||
Administration, | ||
) | ||
from .models import Administration | ||
|
||
|
||
class AdministrationAdmin(admin.ModelAdmin): | ||
@admin.register(Administration) | ||
class AdministrationAdmin(ApilosModelAdmin): | ||
search_fields = ["nom", "code"] | ||
list_display = ["nom", "code", "ville_signature"] | ||
|
||
|
||
admin.site.register(Administration, AdministrationAdmin) |
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,6 +1,10 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. | ||
from admin.admin import ApilosModelAdmin | ||
from .models import UploadedFile | ||
|
||
admin.site.register(UploadedFile) | ||
|
||
@admin.register(UploadedFile) | ||
class UploadedFileAdmin(ApilosModelAdmin): | ||
staff_user_can_change = False | ||
staff_user_can_add = False |
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