From dd6d0c3dac37bbeef892fcc879d99c04ae1e9702 Mon Sep 17 00:00:00 2001 From: Kenan Wright Date: Thu, 12 Sep 2024 13:30:02 +0000 Subject: [PATCH] Update google_registration_form variable to registration_form in view, forms, model, templates --- hackathon/forms.py | 4 ++-- .../migrations/0052_auto_20240912_1324.py | 18 ++++++++++++++++++ hackathon/models.py | 2 +- .../templates/hackathon/create-event.html | 2 +- .../hackathon/hackathon_view_public.html | 2 +- 5 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 hackathon/migrations/0052_auto_20240912_1324.py diff --git a/hackathon/forms.py b/hackathon/forms.py index c5a5e425..2876768a 100644 --- a/hackathon/forms.py +++ b/hackathon/forms.py @@ -89,7 +89,7 @@ class HackathonForm(forms.ModelForm): ) is_public = forms.BooleanField(required=False) is_register = forms.BooleanField(required=False, label="Allow external registrations") - google_registration_form = forms.URLField( + registration_form = forms.URLField( label="External Registration Form", required=False, widget=forms.TextInput( @@ -109,7 +109,7 @@ class Meta: fields = ['display_name', 'description', 'theme', 'start_date', 'end_date', 'status', 'organisation', 'score_categories', 'team_size', 'tag_line', 'is_public', 'max_participants', - 'is_register', 'google_registration_form' + 'is_register', 'registration_form' ] def __init__(self, *args, **kwargs): diff --git a/hackathon/migrations/0052_auto_20240912_1324.py b/hackathon/migrations/0052_auto_20240912_1324.py new file mode 100644 index 00000000..221661a3 --- /dev/null +++ b/hackathon/migrations/0052_auto_20240912_1324.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.13 on 2024-09-12 13:24 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('hackathon', '0051_auto_20240911_1306'), + ] + + operations = [ + migrations.RenameField( + model_name='hackathon', + old_name='google_registration_form', + new_name='registration_form', + ), + ] diff --git a/hackathon/models.py b/hackathon/models.py index e62471ea..6802d93a 100644 --- a/hackathon/models.py +++ b/hackathon/models.py @@ -81,7 +81,7 @@ class Hackathon(models.Model): is_public = models.BooleanField(default=True) max_participants = models.IntegerField(default=None, null=True, blank=True) is_register = models.BooleanField(default=True) - google_registration_form = models.URLField( + registration_form = models.URLField( default="", blank=True, help_text=("Link to the Google Form for registrations.") diff --git a/hackathon/templates/hackathon/create-event.html b/hackathon/templates/hackathon/create-event.html index df19c44a..e1a0ec55 100644 --- a/hackathon/templates/hackathon/create-event.html +++ b/hackathon/templates/hackathon/create-event.html @@ -62,7 +62,7 @@

Create Hackathon

{{ form.is_register|as_crispy_field }}
{{ form.max_participants|as_crispy_field }} diff --git a/hackathon/templates/hackathon/hackathon_view_public.html b/hackathon/templates/hackathon/hackathon_view_public.html index 11e8dda9..aa591721 100644 --- a/hackathon/templates/hackathon/hackathon_view_public.html +++ b/hackathon/templates/hackathon/hackathon_view_public.html @@ -24,7 +24,7 @@
{% if hackathon.is_register %} - Register your interest + Register your interest {% else %} Login To Register {% endif %}