diff --git a/idhub/forms.py b/idhub/forms.py
deleted file mode 100644
index 2eeb961..0000000
--- a/idhub/forms.py
+++ /dev/null
@@ -1,20 +0,0 @@
-from django.contrib.auth.forms import AuthenticationForm
-from django.contrib.auth import authenticate
-
-
-class LoginForm(AuthenticationForm):
-
- def clean(self):
- username = self.cleaned_data.get('username')
- password = self.cleaned_data.get('password')
-
- if not (username and password):
- raise self.get_invalid_login_error()
-
- user = authenticate(username=username, password=password)
-
- if user is None:
- raise self.get_invalid_login_error()
-
- return self.cleaned_data
-
diff --git a/idhub/mixins.py b/idhub/mixins.py
index 72c3992..2266a19 100644
--- a/idhub/mixins.py
+++ b/idhub/mixins.py
@@ -1,6 +1,6 @@
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.auth import views as auth_views
-from django.urls import reverse_lazy
+from django.urls import reverse_lazy, resolve
from django.utils.translation import gettext_lazy as _
from django.views.generic.base import TemplateView
from django.shortcuts import redirect
@@ -13,6 +13,11 @@ class UserView(LoginRequiredMixin, TemplateView):
context = super().get_context_data(**kwargs)
context.update({
'title': self.title,
+ 'subtitle': self.subtitle,
+ 'icon': self.icon,
+ 'section': self.section,
+ 'path': resolve(self.request.path).url_name,
+ 'user': self.request.user
})
return context
diff --git a/idhub/templates/idhub/base.html b/idhub/templates/idhub/base.html
index 07391ee..daaf793 100644
--- a/idhub/templates/idhub/base.html
+++ b/idhub/templates/idhub/base.html
@@ -50,7 +50,7 @@
-
Lorena
+
{{ user.username }}
@@ -64,59 +64,59 @@
-
-
+
Home
-
-
+
My datas
-
-
+
My Wallet
@@ -145,6 +145,10 @@
+
+
+ {{ subtitle }}
+
{% block content %}
{% endblock content %}
diff --git a/idhub/templates/idhub/user_credentials.html b/idhub/templates/idhub/user_credentials.html
new file mode 100644
index 0000000..d6520a0
--- /dev/null
+++ b/idhub/templates/idhub/user_credentials.html
@@ -0,0 +1,5 @@
+{% extends "idhub/base.html" %}
+{% load i18n %}
+
+{% block content %}
+{% endblock %}
diff --git a/idhub/templates/idhub/user_credentials_presentation.html b/idhub/templates/idhub/user_credentials_presentation.html
new file mode 100644
index 0000000..d6520a0
--- /dev/null
+++ b/idhub/templates/idhub/user_credentials_presentation.html
@@ -0,0 +1,5 @@
+{% extends "idhub/base.html" %}
+{% load i18n %}
+
+{% block content %}
+{% endblock %}
diff --git a/idhub/templates/idhub/user_credentials_required.html b/idhub/templates/idhub/user_credentials_required.html
new file mode 100644
index 0000000..d6520a0
--- /dev/null
+++ b/idhub/templates/idhub/user_credentials_required.html
@@ -0,0 +1,5 @@
+{% extends "idhub/base.html" %}
+{% load i18n %}
+
+{% block content %}
+{% endblock %}
diff --git a/idhub/templates/idhub/user_dashboard.html b/idhub/templates/idhub/user_dashboard.html
index e124a3d..8fa4a87 100644
--- a/idhub/templates/idhub/user_dashboard.html
+++ b/idhub/templates/idhub/user_dashboard.html
@@ -2,10 +2,6 @@
{% load i18n %}
{% block content %}
-
-
- Identities (DID)
-
diff --git a/idhub/templates/idhub/user_gdpr.html b/idhub/templates/idhub/user_gdpr.html
new file mode 100644
index 0000000..d6520a0
--- /dev/null
+++ b/idhub/templates/idhub/user_gdpr.html
@@ -0,0 +1,5 @@
+{% extends "idhub/base.html" %}
+{% load i18n %}
+
+{% block content %}
+{% endblock %}
diff --git a/idhub/templates/idhub/user_identities.html b/idhub/templates/idhub/user_identities.html
new file mode 100644
index 0000000..d6520a0
--- /dev/null
+++ b/idhub/templates/idhub/user_identities.html
@@ -0,0 +1,5 @@
+{% extends "idhub/base.html" %}
+{% load i18n %}
+
+{% block content %}
+{% endblock %}
diff --git a/idhub/templates/idhub/user_profile.html b/idhub/templates/idhub/user_profile.html
new file mode 100644
index 0000000..d6520a0
--- /dev/null
+++ b/idhub/templates/idhub/user_profile.html
@@ -0,0 +1,5 @@
+{% extends "idhub/base.html" %}
+{% load i18n %}
+
+{% block content %}
+{% endblock %}
diff --git a/idhub/templates/idhub/user_roles.html b/idhub/templates/idhub/user_roles.html
new file mode 100644
index 0000000..d6520a0
--- /dev/null
+++ b/idhub/templates/idhub/user_roles.html
@@ -0,0 +1,5 @@
+{% extends "idhub/base.html" %}
+{% load i18n %}
+
+{% block content %}
+{% endblock %}
diff --git a/idhub/urls.py b/idhub/urls.py
index add552e..d37aa78 100644
--- a/idhub/urls.py
+++ b/idhub/urls.py
@@ -18,16 +18,37 @@ from django.contrib.auth import views as auth_views
from django.views.generic import RedirectView
from django.urls import path, reverse_lazy
from .views import LoginView
-from .views_admin import AdminDashboardView
-from .views_user import UserDashboardView
+from .admin.views import AdminDashboardView
+from .user import views as views_user
app_name = 'idhub'
urlpatterns = [
- path("", RedirectView.as_view(url=reverse_lazy('idhub:login'), permanent=False)),
+ path("", RedirectView.as_view(url=reverse_lazy('idhub:login'),
+ permanent=False)),
path('login/', LoginView.as_view(), name='login'),
path('logout/', auth_views.LogoutView.as_view(), name='logout'),
- path('user/dashboard/', UserDashboardView.as_view(), name='user_dashboard'),
- path('admin/dashboard/', AdminDashboardView.as_view(), name='admin_dashboard'),
+ path('admin/dashboard/', AdminDashboardView.as_view(),
+ name='admin_dashboard'),
+
+ # User
+ path('user/dashboard/', views_user.UserDashboardView.as_view(),
+ name='user_dashboard'),
+ path('user/profile/', views_user.UserProfileView.as_view(),
+ name='user_profile'),
+ path('user/roles/', views_user.UserRolesView.as_view(),
+ name='user_roles'),
+ path('user/gdpr/', views_user.UserGDPRView.as_view(),
+ name='user_gdpr'),
+ path('user/identities/', views_user.UserIdentitiesView.as_view(),
+ name='user_identities'),
+ path('user/credentials/', views_user.UserCredentialsView.as_view(),
+ name='user_credentials'),
+ path('user/credentials_required/',
+ views_user.UserCredentialsRequiredView.as_view(),
+ name='user_credentials_required'),
+ path('user/credentials_presentation/',
+ views_user.UserCredentialsPresentationView.as_view(),
+ name='user_credentials_presentation'),
]
diff --git a/idhub/views_admin.py b/idhub/views_admin.py
deleted file mode 100644
index 2809eef..0000000
--- a/idhub/views_admin.py
+++ /dev/null
@@ -1,12 +0,0 @@
-import logging
-
-from django.utils.translation import gettext_lazy as _
-from django.urls import reverse_lazy
-from django.contrib import messages
-from .mixins import AdminView
-
-
-class AdminDashboardView(AdminView):
- template_name = "idhub/admin_dashboard.html"
- title = _('Dashboard')
-
diff --git a/idhub/views_user.py b/idhub/views_user.py
deleted file mode 100644
index 7945290..0000000
--- a/idhub/views_user.py
+++ /dev/null
@@ -1,12 +0,0 @@
-import logging
-
-from django.utils.translation import gettext_lazy as _
-from django.urls import reverse_lazy
-from django.contrib import messages
-from .mixins import UserView
-
-
-class UserDashboardView(UserView):
- template_name = "idhub/user_dashboard.html"
- title = _('Dashboard')
-