from django.http import JsonResponse
from django.urls import reverse
from django.shortcuts import render
-from django.utils.translation import gettext as _
from django.views.decorators import cache
from django.views.generic import DetailView, UpdateView
from . import models
def describe(value):
if hasattr(value, '_meta'):
meta = value._meta
- return _('''a <a href="%(docs_url)s">%(verbose_name)s</a> object.''') % {
+ return '''objekt typu <a href="%(docs_url)s">%(verbose_name)s</a>.''' % {
'docs_url': reverse('django-admindocs-models-detail', args=(meta.app_label, meta.model_name)),
'verbose_name': meta.verbose_name,
}
"contact": contact,
}
ctx.update(state(test=True).get_context(contact))
- help_text = '%s:<br>' % _('Context')
+ help_text = 'Kontekst:<br>'
for k, v in ctx.items():
help_text += '<br><code>{{ %s }}</code> — %s<br>' % (k, describe(v))