1
Fork 0
mirror of https://github.com/Steffo99/sophon.git synced 2024-12-22 14:54:22 +00:00
sophon/backend/sophon/notebooks/admin.py
Stefano Pigozzi b44f7b4ebf 💥 Dockerize everything! (#74 closes #59)
*  Create Dockerfile for the backend

* 🔧 Limit the allowed slug values

*  Create docker image for the proxy

*  Add serve script (and serve dependency)

*  Add .dockerignore symlinks to .gitignore

*  Create docker image for the frontend

* 🔧 Proxy the frontend

* 🔧 Configure the proxy.dbm directory

* 🚧 WIP

* 💥 Improve settings handling

* 💥 Prepare backend for docker deployment

* 🔧 Reserve `static` notebook slug

*  Make static work

* 🐛 Set a default value for reduce

* 💥 Things

* 💥 Everything works!
2021-10-19 22:41:18 +02:00

60 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",
)
list_filter = (
"container_image",
)
ordering = (
"slug",
)
fieldsets = (
(
None, {
"fields": (
"slug",
"name",
"project",
"locked_by",
),
},
),
(
"Docker", {
"fields": (
"container_image",
"container_id",
),
},
),
(
"Proxy", {
"fields": (
"port",
"internal_url",
),
},
),
(
"Jupyter", {
"fields": (
"jupyter_token",
),
},
),
)