-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make dealer wifi configurable, form tweaks. Update pre-commit (#333)
* Make dealer wifi configurable, form tweaks. Update pre-commit * Fix typo * Fix default venue form population * Fix signature collection on Dealers form * Add tests for registration template tags * Fix dealer signature, for real
- Loading branch information
Showing
14 changed files
with
151 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
registration/migrations/0102_event_dealer_wifi_partner_price.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Generated by Django 3.2.25 on 2024-10-17 07:20 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("registration", "0101_auto_20240630_0045"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="event", | ||
name="dealerPartnerPrice", | ||
field=models.DecimalField(decimal_places=2, default=55, max_digits=6), | ||
), | ||
migrations.AddField( | ||
model_name="event", | ||
name="dealerWifi", | ||
field=models.BooleanField(default=True), | ||
), | ||
migrations.AddField( | ||
model_name="event", | ||
name="dealerWifiPrice", | ||
field=models.DecimalField(decimal_places=2, default=50, max_digits=6), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/*global jQuery:false*/ | ||
'use strict'; | ||
/* Puts the included jQuery into our own namespace using noConflict and passing | ||
* it 'true'. This ensures that the included jQuery doesn't pollute the global | ||
* namespace (i.e. this preserves pre-existing values for both window.$ and | ||
* window.jQuery). | ||
*/ | ||
window.django = {jQuery: jQuery.noConflict(true)}; | ||
window.jQuery = window.django.jQuery; | ||
window.$ = jQuery; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from unittest import TestCase | ||
|
||
from registration.models import Event, Venue | ||
from registration.templatetags import registration_tags | ||
from registration.tests.common import DEFAULT_EVENT_ARGS | ||
|
||
|
||
class TestTags(TestCase): | ||
def setUp(self): | ||
self.venue = Venue.objects.create(country="Pastafaria") | ||
self.venue.save() | ||
self.event = Event(**DEFAULT_EVENT_ARGS) | ||
self.event.save() | ||
|
||
def test_venue_country_empty(self): | ||
result = registration_tags.venue_country(self.event) | ||
self.assertEqual(result, "") | ||
|
||
def test_venue_country_value(self): | ||
self.event.venue = self.venue | ||
result = registration_tags.venue_country(self.event) | ||
self.assertEqual(result, self.venue.country) | ||
|
||
def test_get_value(self): | ||
d = {"foo": "bar"} | ||
result = registration_tags.get_value(d, "foo") | ||
self.assertEqual(result, "bar") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters