Simplify title generating
This commit is contained in:
parent
d763d39e6d
commit
c790c946a0
|
@ -29,7 +29,7 @@ def profile(request):
|
|||
response = render_to_response('profile.html', RequestContext(request, {
|
||||
'form': form,
|
||||
'userform': userform,
|
||||
'title': '%s @ %s' % (_('User profile'), settings.SITE_TITLE),
|
||||
'title': _('User profile'),
|
||||
}))
|
||||
response.set_cookie(settings.LANGUAGE_COOKIE_NAME, request.user.get_profile().language)
|
||||
return response
|
||||
|
@ -58,5 +58,5 @@ def contact(request):
|
|||
|
||||
return render_to_response('contact.html', RequestContext(request, {
|
||||
'form': form,
|
||||
'title': '%s @ %s' % (_('Contact'), settings.SITE_TITLE),
|
||||
'title': _('Contact'),
|
||||
}))
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
{% if title %}
|
||||
{{ title }}
|
||||
{{ title }} @ {{ site_title }}
|
||||
{% else %}
|
||||
{% if object %}
|
||||
{{ object }} @ {{ site_title }}
|
||||
{% else %}
|
||||
{{ site_title }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
@ -35,7 +35,6 @@ def home(request):
|
|||
'top_translations': top_translations,
|
||||
'top_suggestions': top_suggestions,
|
||||
'usertranslations': usertranslations,
|
||||
'title': settings.SITE_TITLE,
|
||||
}))
|
||||
|
||||
def show_project(request, project):
|
||||
|
@ -43,7 +42,6 @@ def show_project(request, project):
|
|||
|
||||
return render_to_response('project.html', RequestContext(request, {
|
||||
'object': obj,
|
||||
'title': '%s @ %s' % (obj.__unicode__(), settings.SITE_TITLE),
|
||||
}))
|
||||
|
||||
def show_subproject(request, project, subproject):
|
||||
|
@ -51,7 +49,6 @@ def show_subproject(request, project, subproject):
|
|||
|
||||
return render_to_response('subproject.html', RequestContext(request, {
|
||||
'object': obj,
|
||||
'title': '%s @ %s' % (obj.__unicode__(), settings.SITE_TITLE),
|
||||
}))
|
||||
|
||||
def show_translation(request, project, subproject, lang):
|
||||
|
@ -61,7 +58,6 @@ def show_translation(request, project, subproject, lang):
|
|||
|
||||
return render_to_response('translation.html', RequestContext(request, {
|
||||
'object': obj,
|
||||
'title': '%s @ %s' % (obj.__unicode__(), settings.SITE_TITLE),
|
||||
'form': form,
|
||||
'search_form': search_form,
|
||||
}))
|
||||
|
@ -228,7 +224,6 @@ def translate(request, project, subproject, lang):
|
|||
|
||||
return render_to_response('translate.html', RequestContext(request, {
|
||||
'object': obj,
|
||||
'title': '%s @ %s' % (obj.__unicode__(), settings.SITE_TITLE),
|
||||
'unit': unit,
|
||||
'total': total,
|
||||
'type': rqtype,
|
||||
|
|
Loading…
Reference in New Issue
Block a user