add name to calendar for better admin overview
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
6e34d8acea
commit
22d70d1e26
|
@ -10,5 +10,5 @@ def update_calendar(modeladmin, request, queryset):
|
|||
|
||||
@admin.register(Calendar)
|
||||
class CalendarAdmin(admin.ModelAdmin):
|
||||
list_display = ("url", "needs_fallback", "has_errors")
|
||||
list_display = ("name", "url", "needs_fallback", "has_errors")
|
||||
actions = (update_calendar,)
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 5.0.4 on 2025-05-15 21:38
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("importer", "0003_alter_calendar_url"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="calendar",
|
||||
name="name",
|
||||
field=models.CharField(blank=True, max_length=255, null=True),
|
||||
),
|
||||
]
|
|
@ -7,6 +7,7 @@ class Calendar(models.Model):
|
|||
url = models.URLField(primary_key=True, max_length=1000)
|
||||
needs_fallback = models.BooleanField(default=False, editable=True)
|
||||
has_errors = models.BooleanField(default=False, editable=False)
|
||||
name = models.CharField(max_length=255, null=True, blank=True)
|
||||
|
||||
def update(self):
|
||||
# break circular import
|
||||
|
|
Loading…
Reference in New Issue