mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-23 15:24:21 +00:00
62 lines
1.1 KiB
Python
62 lines
1.1 KiB
Python
|
from django.contrib import admin
|
||
|
|
||
|
from sophon.core.admin import SophonAdmin
|
||
|
from . import models
|
||
|
|
||
|
|
||
|
@admin.register(models.Notebook)
|
||
|
class NotebookAdmin(SophonAdmin):
|
||
|
list_display = (
|
||
|
"slug",
|
||
|
"name",
|
||
|
"project",
|
||
|
"locked_by",
|
||
|
"container_image",
|
||
|
"container_id",
|
||
|
"port",
|
||
|
)
|
||
|
|
||
|
list_filter = (
|
||
|
"container_image",
|
||
|
)
|
||
|
|
||
|
ordering = (
|
||
|
"slug",
|
||
|
)
|
||
|
|
||
|
fieldsets = (
|
||
|
(
|
||
|
None, {
|
||
|
"fields": (
|
||
|
"slug",
|
||
|
"name",
|
||
|
"project",
|
||
|
"locked_by",
|
||
|
),
|
||
|
},
|
||
|
),
|
||
|
(
|
||
|
"Docker", {
|
||
|
"fields": (
|
||
|
"container_image",
|
||
|
"container_id",
|
||
|
"internet_access",
|
||
|
),
|
||
|
},
|
||
|
),
|
||
|
(
|
||
|
"Proxy", {
|
||
|
"fields": (
|
||
|
"port",
|
||
|
),
|
||
|
},
|
||
|
),
|
||
|
(
|
||
|
"Jupyter", {
|
||
|
"fields": (
|
||
|
"jupyter_token",
|
||
|
),
|
||
|
},
|
||
|
),
|
||
|
)
|