En fait tout était public, oups
This commit is contained in:
parent
2d36898bc4
commit
bcb5d35dd1
1 changed files with 6 additions and 6 deletions
|
@ -32,17 +32,17 @@ def perso(request):
|
|||
|
||||
# Profil
|
||||
#login_required
|
||||
class ProfilView(DetailView, LoginRequiredMixin):
|
||||
class ProfilView(LoginRequiredMixin, DetailView):
|
||||
model = Normalien
|
||||
template_name = 'avisstage/detail/profil.html'
|
||||
|
||||
# Récupération de son propre profil
|
||||
# Récupération du profil
|
||||
def get_object(self):
|
||||
return Normalien.objects.get(user__username=self.kwargs.get('username'))
|
||||
|
||||
# Stage
|
||||
#login_required
|
||||
class StageView(DetailView, LoginRequiredMixin):
|
||||
class StageView(LoginRequiredMixin, DetailView):
|
||||
model = Stage
|
||||
template_name = 'avisstage/detail/stage.html'
|
||||
|
||||
|
@ -53,7 +53,7 @@ class StageView(DetailView, LoginRequiredMixin):
|
|||
|
||||
# Liste des stages par dernière modification
|
||||
#login_required
|
||||
class StageListe(ListView, LoginRequiredMixin):
|
||||
class StageListe(LoginRequiredMixin, ListView):
|
||||
model = Stage
|
||||
template_name = 'avisstage/liste/stage.html'
|
||||
|
||||
|
@ -75,7 +75,7 @@ def faq(request):
|
|||
|
||||
# Profil
|
||||
#login_required
|
||||
class ProfilEdit(UpdateView, LoginRequiredMixin):
|
||||
class ProfilEdit(LoginRequiredMixin, UpdateView):
|
||||
model = Normalien
|
||||
fields = ['nom', 'promotion', 'mail', 'contactez_moi', 'bio']
|
||||
template_name = 'avisstage/formulaires/profil.html'
|
||||
|
@ -180,7 +180,7 @@ def save_lieu(request):
|
|||
else:
|
||||
return JsonResponse({"erreur": "Aucune donnée POST"})
|
||||
|
||||
class LieuAjout(CreateView, LoginRequiredMixin):
|
||||
class LieuAjout(LoginRequiredMixin, CreateView):
|
||||
model = Lieu
|
||||
form_class = LieuForm
|
||||
template_name = 'avisstage/formulaires/lieu.html'
|
||||
|
|
Loading…
Reference in a new issue