git-svn-id: http://code.djangoproject.com/svn/django/trunk@8679 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9348c118da
commit
0c66bac4f3
|
@ -403,7 +403,7 @@ class AdminSite(object):
|
||||||
# Sort the models alphabetically within each app.
|
# Sort the models alphabetically within each app.
|
||||||
app_dict['models'].sort(lambda x, y: cmp(x['name'], y['name']))
|
app_dict['models'].sort(lambda x, y: cmp(x['name'], y['name']))
|
||||||
context = {
|
context = {
|
||||||
'title': _('%s administration' % capfirst(app_label)),
|
'title': _('%s administration') % capfirst(app_label),
|
||||||
'app_list': [app_dict],
|
'app_list': [app_dict],
|
||||||
'root_path': self.root_path,
|
'root_path': self.root_path,
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,7 @@ class ForeignKeyRawIdWidget(forms.TextInput):
|
||||||
# API to determine the ID dynamically.
|
# API to determine the ID dynamically.
|
||||||
output.append('<a href="%s%s" class="related-lookup" id="lookup_id_%s" onclick="return showRelatedObjectLookupPopup(this);"> ' % \
|
output.append('<a href="%s%s" class="related-lookup" id="lookup_id_%s" onclick="return showRelatedObjectLookupPopup(this);"> ' % \
|
||||||
(related_url, url, name))
|
(related_url, url, name))
|
||||||
output.append('<img src="%simg/admin/selector-search.gif" width="16" height="16" alt="Lookup" /></a>' % settings.ADMIN_MEDIA_PREFIX)
|
output.append('<img src="%simg/admin/selector-search.gif" width="16" height="16" alt="%s" /></a>' % (settings.ADMIN_MEDIA_PREFIX, _('Lookup')))
|
||||||
if value:
|
if value:
|
||||||
output.append(self.label_for_value(value))
|
output.append(self.label_for_value(value))
|
||||||
return mark_safe(u''.join(output))
|
return mark_safe(u''.join(output))
|
||||||
|
@ -192,7 +192,7 @@ class RelatedFieldWidgetWrapper(forms.Widget):
|
||||||
# API to determine the ID dynamically.
|
# API to determine the ID dynamically.
|
||||||
output.append(u'<a href="%sadd/" class="add-another" id="add_id_%s" onclick="return showAddAnotherPopup(this);"> ' % \
|
output.append(u'<a href="%sadd/" class="add-another" id="add_id_%s" onclick="return showAddAnotherPopup(this);"> ' % \
|
||||||
(related_url, name))
|
(related_url, name))
|
||||||
output.append(u'<img src="%simg/admin/icon_addlink.gif" width="10" height="10" alt="Add Another"/></a>' % settings.ADMIN_MEDIA_PREFIX)
|
output.append(u'<img src="%simg/admin/icon_addlink.gif" width="10" height="10" alt="%s"/></a>' % (settings.ADMIN_MEDIA_PREFIX, _('Add Another')))
|
||||||
return mark_safe(u''.join(output))
|
return mark_safe(u''.join(output))
|
||||||
|
|
||||||
def build_attrs(self, extra_attrs=None, **kwargs):
|
def build_attrs(self, extra_attrs=None, **kwargs):
|
||||||
|
|
|
@ -12,6 +12,7 @@ from django.http import Http404
|
||||||
from django.shortcuts import render_to_response
|
from django.shortcuts import render_to_response
|
||||||
from django.template.context import RequestContext
|
from django.template.context import RequestContext
|
||||||
from django.utils.hashcompat import md5_constructor
|
from django.utils.hashcompat import md5_constructor
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.contrib.formtools.utils import security_hash
|
from django.contrib.formtools.utils import security_hash
|
||||||
|
|
||||||
class FormWizard(object):
|
class FormWizard(object):
|
||||||
|
@ -126,7 +127,7 @@ class FormWizard(object):
|
||||||
This default implementation simply renders the form for the given step,
|
This default implementation simply renders the form for the given step,
|
||||||
but subclasses may want to display an error message, etc.
|
but subclasses may want to display an error message, etc.
|
||||||
"""
|
"""
|
||||||
return self.render(self.get_form(step), request, step, context={'wizard_error': 'We apologize, but your form has expired. Please continue filling out the form from this page.'})
|
return self.render(self.get_form(step), request, step, context={'wizard_error': _('We apologize, but your form has expired. Please continue filling out the form from this page.')})
|
||||||
|
|
||||||
def render_revalidation_failure(self, request, step, form):
|
def render_revalidation_failure(self, request, step, form):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue