Compare commits
1 commit
main
...
thubrecht/
Author | SHA1 | Date | |
---|---|---|---|
212fd6286e |
1 changed files with 3 additions and 5 deletions
|
@ -3,10 +3,8 @@ from datetime import date, timedelta
|
||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
from django.core.mail import send_mail
|
from django.core.mail import send_mail
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.forms import formset_factory
|
|
||||||
from django.forms.models import model_to_dict
|
|
||||||
from django.http import HttpResponseRedirect
|
from django.http import HttpResponseRedirect
|
||||||
from django.shortcuts import get_object_or_404, redirect, render
|
from django.shortcuts import get_object_or_404
|
||||||
from django.template.loader import render_to_string
|
from django.template.loader import render_to_string
|
||||||
from django.urls import reverse, reverse_lazy
|
from django.urls import reverse, reverse_lazy
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
@ -23,7 +21,7 @@ from fiches.forms import (
|
||||||
SearchForm,
|
SearchForm,
|
||||||
SocialFormSet,
|
SocialFormSet,
|
||||||
)
|
)
|
||||||
from fiches.models import Address, Department, Mail, Phone, Profile, Social
|
from fiches.models import Department, Profile
|
||||||
from fiches.utils import get_ldap_infos
|
from fiches.utils import get_ldap_infos
|
||||||
|
|
||||||
|
|
||||||
|
@ -126,7 +124,7 @@ class EditView(UpdateView):
|
||||||
return reverse("fiche", args=(self.get_object().user,))
|
return reverse("fiche", args=(self.get_object().user,))
|
||||||
|
|
||||||
|
|
||||||
@method_decorator(login_required, name="dispatch")
|
@method_decorator(login_required, name="post")
|
||||||
class HomeView(FormView):
|
class HomeView(FormView):
|
||||||
model = Profile
|
model = Profile
|
||||||
template_name = "fiches/home.html"
|
template_name = "fiches/home.html"
|
||||||
|
|
Loading…
Add table
Reference in a new issue