diff --git a/exhibition/api.py b/exhibition/api.py index 948a33d..4f3bc35 100644 --- a/exhibition/api.py +++ b/exhibition/api.py @@ -53,7 +53,7 @@ def post(self, request, *args, **kwargs): class ExhibitorInfoSerializer(I18nAwareModelSerializer): class Meta: model = ExhibitorInfo - fields = ('id', 'name', 'description', 'url', 'email', 'logo', 'key', 'lead_scanning_enabled') + fields = ('id', 'name', 'description', 'url', 'email', 'logo', 'key', 'lead_scanning_enabled', 'status') class ExhibitorInfoViewSet(viewsets.ReadOnlyModelViewSet): diff --git a/exhibition/forms.py b/exhibition/forms.py index 4a96f00..7c264dc 100644 --- a/exhibition/forms.py +++ b/exhibition/forms.py @@ -65,6 +65,7 @@ class Meta: 'allow_voucher_access', 'allow_lead_access', 'lead_scanning_scope_by_device', + 'status', ] labels = { 'name': _('Exhibitor name'), diff --git a/exhibition/models.py b/exhibition/models.py index dc44832..e27ca07 100644 --- a/exhibition/models.py +++ b/exhibition/models.py @@ -99,6 +99,17 @@ class ExhibitorInfo(models.Model): ) allow_voucher_access = models.BooleanField(default=False) allow_lead_access = models.BooleanField(default=False) + STATUS_CHOICES = ( + ('pending', _('Pending Approval')), + ('approved', _('Approved')), + ('rejected', _('Rejected')), + ) + status = models.CharField( + max_length=20, + choices=STATUS_CHOICES, + default='pending', + verbose_name=_('Status') + ) lead_scanning_scope_by_device = models.BooleanField(default=False) class Meta: diff --git a/exhibition/templates/exhibitors/add.html b/exhibition/templates/exhibitors/add.html index 093a303..f5da13e 100644 --- a/exhibition/templates/exhibitors/add.html +++ b/exhibition/templates/exhibitors/add.html @@ -49,8 +49,8 @@