diff --git a/input/.models.py.swp b/input/.models.py.swp deleted file mode 100644 index b7ad36d..0000000 Binary files a/input/.models.py.swp and /dev/null differ diff --git a/input/admin.py b/input/admin.py index 08df4ec..5537d38 100755 --- a/input/admin.py +++ b/input/admin.py @@ -90,12 +90,13 @@ class IFGAdmin(admin.ModelAdmin): @admin.register(Travel) class TravelAdmin(admin.ModelAdmin): save_as = True - search_fields = ['realname', 'granted_date'] - list_display = ('realname', 'granted', 'granted_date', 'project_end', 'project', 'project_end_quartal') + search_fields = ['realname', 'service_id', 'granted_date'] + list_display = ('realname', 'service_id', 'granted', 'granted_date', 'project_end', 'project', 'project_end_quartal') list_display_links = ('realname', 'project') date_hierarchy = 'project_end' readonly_fields = ('project_end_quartal', 'project_end') autocomplete_fields = ['project'] + readonly_fields = ['service_id'] @admin.register(Email) class EmailAdmin(admin.ModelAdmin): diff --git a/input/migrations/0089_auto_20221209_1648.py b/input/migrations/0089_auto_20221209_1648.py new file mode 100644 index 0000000..55f394d --- /dev/null +++ b/input/migrations/0089_auto_20221209_1648.py @@ -0,0 +1,23 @@ +# Generated by Django 3.1.2 on 2022-12-09 16:48 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('input', '0088_auto_20221208_2128'), + ] + + operations = [ + migrations.AddField( + model_name='travel', + name='service_id', + field=models.CharField(blank=True, max_length=15, null=True), + ), + migrations.AddField( + model_name='travel', + name='username', + field=models.CharField(help_text='Bitte gib den Namen ein, mit dem du dich
in den Wikimedia-Projekten registriert hast.', max_length=200, null=True, verbose_name='Benutzer_innenname'), + ), + ] diff --git a/input/models.py b/input/models.py index d1d00e0..d57d599 100755 --- a/input/models.py +++ b/input/models.py @@ -179,7 +179,7 @@ HOTEL_CHOICES = {'TRUE': format_html('Hotelzimmer benötigt'), from django.contrib.contenttypes.models import ContentType -class Travel(Volunteer): +class Travel(Extern): # project variable is now null true and blank true, which means it can be saved without project id to be later on filled out by admins project = models.ForeignKey(Project, on_delete=models.CASCADE, null=True, blank=True) project_name = models.CharField(max_length=50, null=True, blank=True, verbose_name='Projektname:')