Skip to content

Commit

Permalink
Change title in templates
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelmv committed Jun 28, 2017
1 parent ca3fb3b commit f69b5b2
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion home/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>{{ title }}</title>
{% block title %}{% endblock %}

<link rel="stylesheet" href="{% static "css/lib/normalize.css" %}">
<link rel="stylesheet" href="{% static "css/base.css" %}">
Expand Down
6 changes: 6 additions & 0 deletions home/templates/home/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{% extends '../base.html' %}

{% block title %}
<title>
SMSuela 🇻🇪
</title>
{% endblock %}

{% block content %}
<h1>
¡Bienvenido! 🇻🇪
Expand Down
6 changes: 6 additions & 0 deletions home/templates/home/new_number.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{% extends '../base.html' %}

{% block title %}
<title>
Agregar Número
</title>
{% endblock %}

{% block content %}

<h2>Agregar número telefónico</h2>
Expand Down
6 changes: 6 additions & 0 deletions home/templates/home/number_list.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{% extends '../base.html' %}

{% block title %}
<title>
Números
</title>
{% endblock %}

{% block content %}
<h2>Números registrados</h2>

Expand Down
6 changes: 6 additions & 0 deletions home/templates/registration/login.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{% extends '../base.html' %}

{% block title %}
<title>
SMSuela 🇻🇪
</title>
{% endblock %}

{% block content %}
<h2>Login</h2>
<form method="post">
Expand Down
3 changes: 0 additions & 3 deletions home/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class NumberList(LoginRequiredMixin, ListView):

def get_context_data(self, **kwargs):
context = super(NumberList, self).get_context_data(**kwargs)
context['title'] = 'Números'
return context


Expand All @@ -56,7 +55,6 @@ def index(request):

context = {
'form': form,
'title': 'SMSuela',
'all_numbers': all_numbers,
}
return render(request, 'home/index.html', context)
Expand All @@ -77,7 +75,6 @@ def new_number(request):
template = loader.get_template('home/new_number.html')
context = {
'form': form,
'title': 'Agregar número'
}

return HttpResponse(template.render(context, request))

0 comments on commit f69b5b2

Please sign in to comment.