Add from __future__ import unicode_literals, issue #37
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.contrib import messages
|
||||
from django.contrib.formtools.wizard.views import SessionWizardView
|
||||
@@ -31,7 +31,7 @@ class DocumentCreateWizard(ViewPermissionCheckMixin, SessionWizardView):
|
||||
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
if InteractiveSource.objects.filter(enabled=True).count() == 0:
|
||||
messages.error(request, _(u'No interactive document sources have been defined or none have been enabled, create one before proceeding.'))
|
||||
messages.error(request, _('No interactive document sources have been defined or none have been enabled, create one before proceeding.'))
|
||||
return HttpResponseRedirect(reverse('sources:setup_source_list'))
|
||||
return super(DocumentCreateWizard, self).dispatch(request, *args, **kwargs)
|
||||
|
||||
@@ -41,8 +41,8 @@ class DocumentCreateWizard(ViewPermissionCheckMixin, SessionWizardView):
|
||||
self.condition_dict = {'1': DocumentCreateWizard._has_metadata_types}
|
||||
|
||||
self.step_titles = [
|
||||
_(u'Step 1 of 2: Select document type'),
|
||||
_(u'Step 2 of 2: Enter document metadata'),
|
||||
_('Step 1 of 2: Select document type'),
|
||||
_('Step 2 of 2: Enter document metadata'),
|
||||
]
|
||||
|
||||
def get_form_initial(self, step):
|
||||
@@ -62,7 +62,7 @@ class DocumentCreateWizard(ViewPermissionCheckMixin, SessionWizardView):
|
||||
context = super(DocumentCreateWizard, self).get_context_data(form=form, **kwargs)
|
||||
context.update({
|
||||
'step_title': self.step_titles[self.steps.step0],
|
||||
'submit_label': _(u'Next step'),
|
||||
'submit_label': _('Next step'),
|
||||
'submit_icon_famfam': 'arrow_right',
|
||||
})
|
||||
return context
|
||||
|
||||
Reference in New Issue
Block a user