mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-22 06:44:21 +00:00
🔧 Reserve static
notebook slug
This commit is contained in:
parent
5a30fa8548
commit
8e4baf9e6d
2 changed files with 37 additions and 7 deletions
|
@ -0,0 +1,29 @@
|
|||
# Generated by Django 3.2.7 on 2021-10-19 17:45
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
import sophon.notebooks.validators
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
('notebooks', '0010_auto_20211019_1738'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='notebook',
|
||||
name='container_image',
|
||||
field=models.CharField(choices=[('steffo45/jupyterlab-docker-sophon', 'Python (Sophonic)')], default='steffo45/jupyterlab-docker-sophon',
|
||||
help_text='The Docker image to run for this notebook.', max_length=256, verbose_name='Docker image'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='notebook',
|
||||
name='slug',
|
||||
field=models.SlugField(
|
||||
help_text='Unique alphanumeric string which identifies the project. Changing this once the container has been created <strong>will break Docker</strong>!',
|
||||
max_length=64, primary_key=True, serialize=False,
|
||||
validators=[sophon.notebooks.validators.DisallowedValuesValidator(['api', 'static', 'proxy', 'backend', 'frontend', 'src'])],
|
||||
verbose_name='Slug'),
|
||||
),
|
||||
]
|
|
@ -46,6 +46,7 @@ class Notebook(SophonGroupModel):
|
|||
validators=[
|
||||
DisallowedValuesValidator([
|
||||
"api", # reserved for docker deployment
|
||||
"static", # reserved for production deployment
|
||||
"proxy", # reserved for future use
|
||||
"backend", # reserved for future use
|
||||
"frontend", # reserved for future use
|
||||
|
@ -75,13 +76,13 @@ class Notebook(SophonGroupModel):
|
|||
|
||||
# Remember to make a migration when changing this!
|
||||
IMAGE_CHOICES = (
|
||||
("jupyter/base-notebook", "Base"),
|
||||
("jupyter/minimal-notebook", "Python"),
|
||||
("jupyter/scipy-notebook", "Python (Scientific)"),
|
||||
("jupyter/tensorflow-notebook", "Python (Tensorflow)"),
|
||||
("jupyter/r-notebook", "Python + R"),
|
||||
("jupyter/pyspark-notebook", "Python (Scientific) + Apache Spark"),
|
||||
("jupyter/all-spark-notebook", "Python (Scientific) + Scala + R + Apache Spark"),
|
||||
# ("jupyter/base-notebook", "Base"),
|
||||
# ("jupyter/minimal-notebook", "Python"),
|
||||
# ("jupyter/scipy-notebook", "Python (Scientific)"),
|
||||
# ("jupyter/tensorflow-notebook", "Python (Tensorflow)"),
|
||||
# ("jupyter/r-notebook", "Python + R"),
|
||||
# ("jupyter/pyspark-notebook", "Python (Scientific) + Apache Spark"),
|
||||
# ("jupyter/all-spark-notebook", "Python (Scientific) + Scala + R + Apache Spark"),
|
||||
("steffo45/jupyterlab-docker-sophon", "Python (Sophonic)"),
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue