stash
This commit is contained in:
parent
6fcdd1eefa
commit
c0f70004eb
21 changed files with 1855 additions and 260 deletions
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 4.2.2 on 2026-08-09 13:08
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('authentication', '0003_accountpreference'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='accountpreference',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
]
|
||||
|
|
@ -73,8 +73,8 @@ admin.site.register(StorageLocation, StorageLocationAdmin)
|
|||
|
||||
|
||||
class WorkflowInstanceAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'state', 'owner', 'created_at', 'updated_at')
|
||||
search_fields = ('name', 'owner__username')
|
||||
list_display = ('slug', 'state', 'owner', 'created_at', 'updated_at')
|
||||
search_fields = ('slug', 'owner__username')
|
||||
list_filter = ('state', 'created_at', 'owner')
|
||||
readonly_fields = ('created_at', 'updated_at')
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 4.2.2 on 2026-08-09 13:08
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('toolshed', '0009_alter_workflowinstance_payload'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='workflowinstance',
|
||||
old_name='name',
|
||||
new_name='slug',
|
||||
),
|
||||
]
|
||||
|
|
@ -135,7 +135,7 @@ class StorageLocation(models.Model):
|
|||
|
||||
|
||||
class WorkflowInstance(models.Model):
|
||||
name = models.CharField(max_length=255)
|
||||
slug = models.CharField(max_length=255)
|
||||
state = models.CharField(max_length=255)
|
||||
payload = models.TextField(default='', blank=True) # an opaque, frontend-serialized JSON string on the backend.
|
||||
owner = models.ForeignKey(ToolshedUser, on_delete=models.CASCADE, related_name='workflows')
|
||||
|
|
|
|||
|
|
@ -206,6 +206,6 @@ class WorkflowInstanceSerializer(serializers.ModelSerializer):
|
|||
|
||||
class Meta:
|
||||
model = WorkflowInstance
|
||||
fields = ['id', 'name', 'state', 'payload', 'owner', 'created_at', 'updated_at']
|
||||
fields = ['id', 'slug', 'state', 'payload', 'owner', 'created_at', 'updated_at']
|
||||
read_only_fields = ['owner', 'created_at', 'updated_at']
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue