Skip to content

Commit dd6d0c3

Browse files
Update google_registration_form variable to registration_form in view, forms, model, templates
1 parent de7aca0 commit dd6d0c3

File tree

5 files changed

+23
-5
lines changed

5 files changed

+23
-5
lines changed

hackathon/forms.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class HackathonForm(forms.ModelForm):
8989
)
9090
is_public = forms.BooleanField(required=False)
9191
is_register = forms.BooleanField(required=False, label="Allow external registrations")
92-
google_registration_form = forms.URLField(
92+
registration_form = forms.URLField(
9393
label="External Registration Form",
9494
required=False,
9595
widget=forms.TextInput(
@@ -109,7 +109,7 @@ class Meta:
109109
fields = ['display_name', 'description', 'theme', 'start_date',
110110
'end_date', 'status', 'organisation', 'score_categories',
111111
'team_size', 'tag_line', 'is_public', 'max_participants',
112-
'is_register', 'google_registration_form'
112+
'is_register', 'registration_form'
113113
]
114114

115115
def __init__(self, *args, **kwargs):
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 3.1.13 on 2024-09-12 13:24
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('hackathon', '0051_auto_20240911_1306'),
10+
]
11+
12+
operations = [
13+
migrations.RenameField(
14+
model_name='hackathon',
15+
old_name='google_registration_form',
16+
new_name='registration_form',
17+
),
18+
]

hackathon/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class Hackathon(models.Model):
8181
is_public = models.BooleanField(default=True)
8282
max_participants = models.IntegerField(default=None, null=True, blank=True)
8383
is_register = models.BooleanField(default=True)
84-
google_registration_form = models.URLField(
84+
registration_form = models.URLField(
8585
default="",
8686
blank=True,
8787
help_text=("Link to the Google Form for registrations.")

hackathon/templates/hackathon/create-event.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ <h1>Create Hackathon</h1>
6262
{{ form.is_register|as_crispy_field }}
6363
</div>
6464
<div class="col-6 col-md-6 mb-3" id="google-registration-form-wrapper" style="display: none;" >
65-
{{ form.google_registration_form|as_crispy_field }}
65+
{{ form.registration_form|as_crispy_field }}
6666
</div>
6767
<div class="col-12 col-md-12 mb-12">
6868
{{ form.max_participants|as_crispy_field }}

hackathon/templates/hackathon/hackathon_view_public.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<div class="row">
2525
<div class="col p-0">
2626
{% if hackathon.is_register %}
27-
<a role="button" class="btn btn-ci mt-3 w-100" href="{{ hackathon.google_registration_form }}" target="_blank">Register your interest</a>
27+
<a role="button" class="btn btn-ci mt-3 w-100" href="{{ hackathon.registration_form }}" target="_blank">Register your interest</a>
2828
{% else %}
2929
<a role="button" class="btn btn-ci mt-3 w-100" href="{% url 'account_login' %}">Login To Register</a>
3030
{% endif %}

0 commit comments

Comments
 (0)