Skip to content

Commit

Permalink
Update google_registration_form variable to registration_form in view…
Browse files Browse the repository at this point in the history
…, forms, model, templates
  • Loading branch information
kenanwright1988 committed Sep 12, 2024
1 parent de7aca0 commit dd6d0c3
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
4 changes: 2 additions & 2 deletions hackathon/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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):
Expand Down
18 changes: 18 additions & 0 deletions hackathon/migrations/0052_auto_20240912_1324.py
Original file line number Diff line number Diff line change
@@ -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',
),
]
2 changes: 1 addition & 1 deletion hackathon/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
2 changes: 1 addition & 1 deletion hackathon/templates/hackathon/create-event.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h1>Create Hackathon</h1>
{{ form.is_register|as_crispy_field }}
</div>
<div class="col-6 col-md-6 mb-3" id="google-registration-form-wrapper" style="display: none;" >
{{ form.google_registration_form|as_crispy_field }}
{{ form.registration_form|as_crispy_field }}
</div>
<div class="col-12 col-md-12 mb-12">
{{ form.max_participants|as_crispy_field }}
Expand Down
2 changes: 1 addition & 1 deletion hackathon/templates/hackathon/hackathon_view_public.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<div class="row">
<div class="col p-0">
{% if hackathon.is_register %}
<a role="button" class="btn btn-ci mt-3 w-100" href="{{ hackathon.google_registration_form }}" target="_blank">Register your interest</a>
<a role="button" class="btn btn-ci mt-3 w-100" href="{{ hackathon.registration_form }}" target="_blank">Register your interest</a>
{% else %}
<a role="button" class="btn btn-ci mt-3 w-100" href="{% url 'account_login' %}">Login To Register</a>
{% endif %}
Expand Down

0 comments on commit dd6d0c3

Please sign in to comment.