diff --git a/examples/membership-card.ods b/examples/membership-card.ods new file mode 100644 index 0000000..adf3cfc Binary files /dev/null and b/examples/membership-card.ods differ diff --git a/examples/membership-card.xls b/examples/membership-card.xls new file mode 100644 index 0000000..857fb28 Binary files /dev/null and b/examples/membership-card.xls differ diff --git a/idhub/admin/forms.py b/idhub/admin/forms.py index 69e8f3a..719696d 100644 --- a/idhub/admin/forms.py +++ b/idhub/admin/forms.py @@ -80,7 +80,8 @@ class ImportForm(forms.Form): if File_datas.objects.filter(file_name=self.file_name, success=True).exists(): raise ValidationError("This file already exists!") - df = pd.read_csv (data, delimiter="\t", quotechar='"', quoting=csv.QUOTE_ALL) + # df = pd.read_csv (data, delimiter="\t", quotechar='"', quoting=csv.QUOTE_ALL) + df = pd.read_excel(data) data_pd = df.fillna('').to_dict() if not data_pd: diff --git a/idhub/models.py b/idhub/models.py index b862dc1..8d201e5 100644 --- a/idhub/models.py +++ b/idhub/models.py @@ -542,8 +542,12 @@ class VerificableCredential(models.Model): format = "%Y-%m-%dT%H:%M:%SZ" issuance_date = self.issued_on.strftime(format) + url_id = "{}/credentials/{}".format( + settings.DOMAIN.strip("/"), + self.id + ) context = { - 'vc_id': self.id, + 'vc_id': url_id, 'issuer_did': self.issuer_did.did, 'subject_did': self.subject_did and self.subject_did.did or '', 'issuance_date': issuance_date, diff --git a/idhub/templates/auth/login.html b/idhub/templates/auth/login.html index 28c199e..8ae5822 100644 --- a/idhub/templates/auth/login.html +++ b/idhub/templates/auth/login.html @@ -4,8 +4,6 @@ {% block login_content %}