fossy: Add created_time to CommunityTrackProposal model

Also move templates into app.
This commit is contained in:
Ben Sturmfels 2024-02-27 19:01:31 +11:00
parent 3ef31ebe43
commit 6c24b00fe3
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0
6 changed files with 22 additions and 2 deletions

View file

@ -5,5 +5,4 @@ from .models import CommunityTrackProposal
@admin.register(CommunityTrackProposal) @admin.register(CommunityTrackProposal)
class CommunityTrackProposalAdmin(admin.ModelAdmin): class CommunityTrackProposalAdmin(admin.ModelAdmin):
list_display = ['title', 'primary_proposer'] list_display = ['created_time', 'title', 'primary_proposer']
pass

View file

@ -0,0 +1,20 @@
# Generated by Django 3.2.19 on 2024-02-27 02:56
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('fossy', '0002_auto_20230130_1841'),
]
operations = [
migrations.AddField(
model_name='communitytrackproposal',
name='created_time',
field=models.DateTimeField(auto_now_add=True, default=datetime.datetime(2023, 3, 19, 0, 0)),
preserve_default=False,
),
]

View file

@ -4,6 +4,7 @@ from django.db import models
class CommunityTrackProposal(models.Model): class CommunityTrackProposal(models.Model):
created_time = models.DateTimeField(auto_now_add=True)
uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
title = models.CharField('Track title', max_length=255) title = models.CharField('Track title', max_length=255)
description = models.TextField( description = models.TextField(