Hide PhotoEffect, PhotoSize and Watermark from admin
This commit is contained in:
parent
1af83a8630
commit
971b112dec
2 changed files with 5 additions and 1 deletions
|
|
@ -122,6 +122,7 @@ production néccessite **une installation de Debian Bullseye**.
|
||||||
$ sudo -u www-data ./venv/bin/python ./manage.py collectstatic
|
$ sudo -u www-data ./venv/bin/python ./manage.py collectstatic
|
||||||
$ sudo -u www-data ./venv/bin/python ./manage.py check
|
$ sudo -u www-data ./venv/bin/python ./manage.py check
|
||||||
$ sudo -u www-data ./venv/bin/python ./manage.py migrate
|
$ sudo -u www-data ./venv/bin/python ./manage.py migrate
|
||||||
|
$ sudo -u www-data ./venv/bin/python ./manage.py loaddata initial
|
||||||
$ sudo ./venv/bin/python ./manage.py compilemessages
|
$ sudo ./venv/bin/python ./manage.py compilemessages
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from photologue.admin import GalleryAdmin as GalleryAdminDefault
|
from photologue.admin import GalleryAdmin as GalleryAdminDefault
|
||||||
from photologue.admin import PhotoAdmin as PhotoAdminDefault
|
from photologue.admin import PhotoAdmin as PhotoAdminDefault
|
||||||
from photologue.models import Gallery, Photo
|
from photologue.models import Gallery, Photo, PhotoEffect, PhotoSize, Watermark
|
||||||
|
|
||||||
from .models import GalleryExtended, PhotoExtended
|
from .models import GalleryExtended, PhotoExtended
|
||||||
|
|
||||||
|
|
@ -34,5 +34,8 @@ class PhotoAdmin(PhotoAdminDefault):
|
||||||
|
|
||||||
admin.site.unregister(Gallery)
|
admin.site.unregister(Gallery)
|
||||||
admin.site.unregister(Photo)
|
admin.site.unregister(Photo)
|
||||||
|
admin.site.unregister(PhotoEffect)
|
||||||
|
admin.site.unregister(PhotoSize)
|
||||||
|
admin.site.unregister(Watermark)
|
||||||
admin.site.register(Gallery, GalleryAdmin)
|
admin.site.register(Gallery, GalleryAdmin)
|
||||||
admin.site.register(Photo, PhotoAdmin)
|
admin.site.register(Photo, PhotoAdmin)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue