On rajoute <meta name="robots" content="noindex">
sur toutes les pages sauf la page d'accueil
This commit is contained in:
parent
846a7548d1
commit
d5238314e6
2 changed files with 4 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<meta charset="UTF-8">
|
||||
{% if no_crawlers %}<meta name="robots" content="noindex">{% endif %}
|
||||
<title>
|
||||
{% block title_onglet %}{% trans "Annuaire des élèves de l'ENS" %}{% endblock %}
|
||||
</title>
|
||||
|
|
|
@ -30,6 +30,7 @@ from fiches.models import Address, Mail, Phone, Profile, Social
|
|||
class FicheView(DetailView):
|
||||
model = Profile
|
||||
template_name = "fiches/fiche.html"
|
||||
extra_context = {"no_crawlers": True}
|
||||
|
||||
def get_object(self):
|
||||
return get_object_or_404(Profile, user__username=self.kwargs.get("user"))
|
||||
|
@ -40,6 +41,7 @@ class EditView(UpdateView):
|
|||
template_name = "fiches/fiches_modif.html"
|
||||
model = Profile
|
||||
form_class = ProfileForm
|
||||
extra_context = {"no_crawlers": True}
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
self.object = self.get_object()
|
||||
|
@ -141,6 +143,7 @@ class HomeView(FormView):
|
|||
class BirthdayView(ListView):
|
||||
model = Profile
|
||||
template_name = "fiches/birthday.html"
|
||||
extra_context = {"no_crawlers": True}
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
|
|
Loading…
Reference in a new issue