resolve conflicts
This commit is contained in:
commit
7a9017563a
Binary file not shown.
Binary file not shown.
|
@ -79,7 +79,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:
|
||||||
|
|
|
@ -549,8 +549,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,
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
{% block login_content %}
|
{% block login_content %}
|
||||||
<form action="{% url 'idhub:login' %}" role="form" method="post">
|
<form action="{% url 'idhub:login' %}" role="form" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="next" value="{{ next }}" />
|
|
||||||
|
|
||||||
<div id="div_id_username"
|
<div id="div_id_username"
|
||||||
class="clearfix control-group {% if form.username.errors %}error{% endif %}">
|
class="clearfix control-group {% if form.username.errors %}error{% endif %}">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
@ -14,8 +14,10 @@ class LoginView(auth_views.LoginView):
|
||||||
}
|
}
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
if request.GET.get('next'):
|
self.extra_context['success_url'] = request.GET.get(
|
||||||
self.extra_context['success_url'] = request.GET.get('next')
|
'next',
|
||||||
|
reverse_lazy('idhub:user_dashboard')
|
||||||
|
)
|
||||||
return super().get(request, *args, **kwargs)
|
return super().get(request, *args, **kwargs)
|
||||||
|
|
||||||
def form_valid(self, form):
|
def form_valid(self, form):
|
||||||
|
@ -26,11 +28,8 @@ class LoginView(auth_views.LoginView):
|
||||||
sensitive_data_encryption_key = user.decrypt_sensitive_data(password)
|
sensitive_data_encryption_key = user.decrypt_sensitive_data(password)
|
||||||
|
|
||||||
if not user.is_anonymous and user.is_admin:
|
if not user.is_anonymous and user.is_admin:
|
||||||
user_dashboard = reverse_lazy('idhub:user_dashboard')
|
|
||||||
admin_dashboard = reverse_lazy('idhub:admin_dashboard')
|
admin_dashboard = reverse_lazy('idhub:admin_dashboard')
|
||||||
if self.extra_context['success_url'] == user_dashboard:
|
self.extra_context['success_url'] = admin_dashboard
|
||||||
self.extra_context['success_url'] = admin_dashboard
|
|
||||||
|
|
||||||
cache.set("KEY_DIDS", sensitive_data_encryption_key, None)
|
cache.set("KEY_DIDS", sensitive_data_encryption_key, None)
|
||||||
|
|
||||||
self.request.session["key_did"] = user.encrypt_data(
|
self.request.session["key_did"] = user.encrypt_data(
|
||||||
|
|
|
@ -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 New Issue