Fr3deric
6 years ago
3 changed files with 15 additions and 2 deletions
@ -0,0 +1,7 @@ |
|||||||
|
{% extends "base.html" %} |
||||||
|
|
||||||
|
{% block content %} |
||||||
|
|
||||||
|
<a href="{% url 'password_change' %}">Change password</a> |
||||||
|
|
||||||
|
{% endblock %} |
@ -1,7 +1,11 @@ |
|||||||
|
|
||||||
from django.urls import path |
from django.urls import path |
||||||
from django.urls import include |
from django.urls import include |
||||||
|
from django.views.generic.base import RedirectView |
||||||
|
from bam.views import ProfileView |
||||||
|
|
||||||
urlpatterns = [ |
urlpatterns = [ |
||||||
|
path('accounts/profile/', ProfileView.as_view(), name='profile'), |
||||||
path('accounts/', include('django.contrib.auth.urls')), |
path('accounts/', include('django.contrib.auth.urls')), |
||||||
|
path('', RedirectView.as_view(pattern_name='profile')), |
||||||
] |
] |
||||||
|
@ -1,3 +1,5 @@ |
|||||||
from django.shortcuts import render |
from django.views.generic.base import TemplateView |
||||||
|
from django.contrib.auth.mixins import LoginRequiredMixin |
||||||
|
|
||||||
# Create your views here. |
class ProfileView(LoginRequiredMixin, TemplateView): |
||||||
|
template_name = 'profile.html' |
||||||
|
Loading…
Reference in new issue