Merge branch 'main' into pilot-lafede
This commit is contained in:
commit
6505d8e6b3
BIN
examples/membership-card.ods
Normal file
BIN
examples/membership-card.ods
Normal file
Binary file not shown.
BIN
examples/membership-card.xls
Normal file
BIN
examples/membership-card.xls
Normal file
Binary file not shown.
|
@ -82,7 +82,8 @@ class ImportForm(forms.Form):
|
||||||
if File_datas.objects.filter(file_name=self.file_name, success=True).exists():
|
if File_datas.objects.filter(file_name=self.file_name, success=True).exists():
|
||||||
raise ValidationError("This file already 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()
|
data_pd = df.fillna('').to_dict()
|
||||||
|
|
||||||
if not data_pd:
|
if not data_pd:
|
||||||
|
|
|
@ -528,8 +528,12 @@ class VerificableCredential(models.Model):
|
||||||
format = "%Y-%m-%dT%H:%M:%SZ"
|
format = "%Y-%m-%dT%H:%M:%SZ"
|
||||||
issuance_date = self.issued_on.strftime(format)
|
issuance_date = self.issued_on.strftime(format)
|
||||||
|
|
||||||
|
url_id = "{}/credentials/{}".format(
|
||||||
|
settings.DOMAIN.strip("/"),
|
||||||
|
self.id
|
||||||
|
)
|
||||||
context = {
|
context = {
|
||||||
'vc_id': self.id,
|
'vc_id': url_id,
|
||||||
'issuer_did': self.issuer_did.did,
|
'issuer_did': self.issuer_did.did,
|
||||||
'subject_did': self.subject_did and self.subject_did.did or '',
|
'subject_did': self.subject_did and self.subject_did.did or '',
|
||||||
'issuance_date': issuance_date,
|
'issuance_date': issuance_date,
|
||||||
|
|
|
@ -6,6 +6,8 @@ black==23.9.1
|
||||||
python-decouple==3.8
|
python-decouple==3.8
|
||||||
jsonschema==4.19.1
|
jsonschema==4.19.1
|
||||||
pandas==2.1.1
|
pandas==2.1.1
|
||||||
|
xlrd==2.0.1
|
||||||
|
odfpy==1.4.1
|
||||||
requests==2.31.0
|
requests==2.31.0
|
||||||
didkit==0.3.2
|
didkit==0.3.2
|
||||||
jinja2==3.1.2
|
jinja2==3.1.2
|
||||||
|
|
Loading…
Reference in a new issue