diff --git a/core/admin.py b/core/admin.py index 1fd949f..58aedc8 100644 --- a/core/admin.py +++ b/core/admin.py @@ -12,7 +12,7 @@ class UserProfileAdmin(admin.ModelAdmin): @admin.register(Project) class ProjectAdmin(admin.ModelAdmin): - list_display = ('name', 'active') + list_display = ('name', 'start_date', 'end_date', 'active') list_filter = ('active',) search_fields = ('name', 'description') filter_horizontal = ('supervisors',) diff --git a/core/migrations/0003_add_project_start_end_dates.py b/core/migrations/0003_add_project_start_end_dates.py new file mode 100644 index 0000000..f5914de --- /dev/null +++ b/core/migrations/0003_add_project_start_end_dates.py @@ -0,0 +1,23 @@ +# Generated by Django 5.2.7 on 2026-02-22 22:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0002_update_worker_id_numbers'), + ] + + operations = [ + migrations.AddField( + model_name='project', + name='end_date', + field=models.DateField(blank=True, null=True), + ), + migrations.AddField( + model_name='project', + name='start_date', + field=models.DateField(blank=True, null=True), + ), + ] diff --git a/core/models.py b/core/models.py index 31b5a5a..5ba2de3 100644 --- a/core/models.py +++ b/core/models.py @@ -25,6 +25,8 @@ def save_user_profile(sender, instance, **kwargs): class Project(models.Model): name = models.CharField(max_length=200) description = models.TextField(blank=True) + start_date = models.DateField(null=True, blank=True) + end_date = models.DateField(null=True, blank=True) supervisors = models.ManyToManyField(User, related_name='assigned_projects') active = models.BooleanField(default=True) diff --git a/core/templates/core/index.html b/core/templates/core/index.html index efc3638..f2d0dd1 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -179,61 +179,148 @@