-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix Workflow * Added tests * Added Lead API * Fix Already Scanned * Modified Response * Modified the response for already scanned case to include attendee name and email * Added Option for Tags * Updated Exhibitors to have Booth with ID and Name * Modifications on the settings page * isort Fixes * Add Modification for Booth ID
- Loading branch information
Showing
21 changed files
with
743 additions
and
141 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,32 @@ | ||
from django import forms | ||
from django.utils.translation import gettext, gettext_lazy as _ | ||
|
||
from pretix.base.forms import SettingsForm | ||
from .models import ExhibitorInfo | ||
|
||
from .models import ExhibitorInfo | ||
|
||
class ExhibitorSettingForm(SettingsForm): | ||
exhibitor_url = forms.URLField( | ||
label=_("Exhibitor URL"), | ||
required=False, | ||
) | ||
|
||
exhibitor_name = forms.CharField( | ||
label=_("Exhibitor Name"), | ||
required=True, | ||
) | ||
|
||
exhibitor_description = forms.CharField( | ||
label=_("Exhibitor Description"), | ||
required=False, | ||
) | ||
|
||
exhibitor_logo = forms.ImageField( | ||
label=_("Exhibitor Logo"), | ||
required=False, | ||
) | ||
lead_scanning_enabled = forms.BooleanField( | ||
label=_("Lead Scanning Enabled"), | ||
required=False, | ||
initial=True, | ||
class ExhibitorInfoForm(forms.ModelForm): | ||
allow_voucher_access = forms.BooleanField(required=False) | ||
allow_lead_access = forms.BooleanField(required=False) | ||
lead_scanning_scope_by_device = forms.BooleanField(required=False) | ||
comment = forms.CharField( | ||
widget=forms.Textarea(attrs={'rows': 10}), | ||
required=False | ||
) | ||
booth_id = forms.CharField(required=False) | ||
|
||
def __init__(self, *args, **kwargs): | ||
self.obj = kwargs.get('obj') | ||
super().__init__(*args, **kwargs) | ||
|
||
def clean(self): | ||
data = super().clean() | ||
return data | ||
|
||
|
||
class ExhibitorInfoForm(forms.ModelForm): | ||
class Meta: | ||
model = ExhibitorInfo | ||
fields = ['name', 'description', 'url', 'email', 'logo'] | ||
fields = [ | ||
'name', | ||
'description', | ||
'url', | ||
'email', | ||
'logo', | ||
'booth_id', | ||
'booth_name', | ||
'lead_scanning_enabled' | ||
] | ||
widgets = { | ||
'description': forms.Textarea(attrs={'rows': 4}), | ||
} |
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
2 changes: 1 addition & 1 deletion
2
exhibitors/migrations/0002_alter_exhibitorinfo_lead_scanning_enabled_and_more.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
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,26 @@ | ||
# Generated by Django 4.2.14 on 2024-10-14 10:02 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('exhibitors', '0002_alter_exhibitorinfo_lead_scanning_enabled_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Lead', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)), | ||
('pseudonymization_id', models.CharField(max_length=190)), | ||
('scanned', models.DateTimeField()), | ||
('scan_type', models.CharField(max_length=50)), | ||
('device_name', models.CharField(max_length=50)), | ||
('attendee', models.JSONField(null=True)), | ||
('exhibitor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='exhibitors.exhibitorinfo')), | ||
], | ||
), | ||
] |
Oops, something went wrong.