Django 2.1.x Documentation
the wording of all user facing strings for the name field: from django.utils.translation import gettext_lazy as _ class AuthorForm(ModelForm): class Meta: model = Author fields = ('name', 'title', 'birth_date') setting: from django.core.exceptions import ValidationError from django.utils.translation import gettext as _ class MinimumLengthValidator: def __init__(self, min_length=8): self.min_length = min_length translators have filled in the message file, it must be compiled. This process relies on the GNU gettext toolset. Once this is done, Django takes care of translating Web apps on the fly in each available0 码力 | 1910 页 | 6.49 MB | 1 年前3Django 2.0.x Documentation
the wording of all user facing strings for the name field: from django.utils.translation import gettext_lazy as _ class AuthorForm(ModelForm): class Meta: model = Author fields = ('name', 'title', 'birth_date') setting: from django.core.exceptions import ValidationError from django.utils.translation import gettext as _ class MinimumLengthValidator: def __init__(self, min_length=8): self.min_length = min_length translators have filled in the message file, it must be compiled. This process relies on the GNU gettext toolset. Once this is done, Django takes care of translating Web apps on the fly in each available0 码力 | 1880 页 | 6.41 MB | 1 年前3Django 2.1.x Documentation
the wording of all user facing strings for the name field: from django.utils.translation import gettext_lazy as _ class AuthorForm(ModelForm): class Meta: model = Author fields = ('name' setting: from django.core.exceptions import ValidationError from django.utils.translation import gettext as _ class MinimumLengthValidator: def __init__(self, min_length=8): self.min_length More details can be found in the W3C Web Internationalization FAQ, the Wikipedia article or the GNU gettext documentation. Warning Translation and formatting are controlled by USE_I18N and USE_L10N settings0 码力 | 2790 页 | 2.71 MB | 1 年前3Django 2.0.x Documentation
the wording of all user facing strings for the name field: from django.utils.translation import gettext_lazy as _ class AuthorForm(ModelForm): class Meta: model = Author fields = setting: from django.core.exceptions import ValidationError from django.utils.translation import gettext as _ class MinimumLengthValidator: def __init__(self, min_length=8): self.min_length More details can be found in the W3C Web Internationalization FAQ, the Wikipedia article or the GNU gettext documentation. Warning Translation and formatting are controlled by USE_I18N and USE_L10N settings0 码力 | 2746 页 | 2.67 MB | 1 年前3Django CMS 3.0.x Documentation
make your life easier, add the following at the top of the file: # -*- coding: utf-8 -*- import os gettext = lambda s: s BASE_DIR = os.path.dirname(os.path.dirname(__file__)) Add the following apps to your istory menu.add_sideframe_item(_('Delete this Poll'), url=reverse('admin:polls_poll_delete', args=[po return render(request, 'polls/detail.html', {'poll': poll}) Detecting url changes Sometimes toolbar Example: CMS_TEMPLATES = ( ('base.html', gettext('default')), ('2col.html', gettext('2 Column')), ('3col.html', gettext('3 Column')), ('extra.html', gettext('Some extra fancy template')), ) Note: All0 码力 | 180 页 | 1.56 MB | 6 月前3Django 2.2.x Documentation
the wording of all user facing strings for the name field: from django.utils.translation import gettext_lazy as _ class AuthorForm(ModelForm): class Meta: model = Author fields = ('name' setting: from django.core.exceptions import ValidationError from django.utils.translation import gettext as _ class MinimumLengthValidator: def __init__(self, min_length=8): self.min_length More details can be found in the W3C Web Internationalization FAQ, the Wikipedia article or the GNU gettext documentation. Warning Translation and formatting are controlled by USE_I18N and USE_L10N settings0 码力 | 2915 页 | 2.83 MB | 1 年前3Django 5.1 Documentation
the wording of all user facing strings for the name field: from django.utils.translation import gettext_lazy as _ class AuthorForm(ModelForm): class Meta: model = Author fields = setting: from django.core.exceptions import ValidationError from django.utils.translation import gettext as _ class MinimumLengthValidator: def __init__(self, min_length=8): self.min_length wikipedia.org/wiki/Internationalization_and_localization] or the GNU gettext documentation [https://www.gnu.org/software/gettext/manual/gettext.html#Concepts]. Warning Translation is controlled by the USE_I18N0 码力 | 3513 页 | 3.17 MB | 1 年前3Django 5.1.2 Documentation
the wording of all user facing strings for the name field: from django.utils.translation import gettext_lazy as _ class AuthorForm(ModelForm): class Meta: model = Author fields = setting: from django.core.exceptions import ValidationError from django.utils.translation import gettext as _ class MinimumLengthValidator: def __init__(self, min_length=8): self.min_length wikipedia.org/wiki/Internationalization_and_localization] or the GNU gettext documentation [https://www.gnu.org/software/gettext/manual/gettext.html#Concepts]. Warning Translation is controlled by the USE_I18N0 码力 | 3519 页 | 3.17 MB | 1 年前3Django 3.0.x Documentation
the wording of all user facing strings for the name field: from django.utils.translation import gettext_lazy as _ class AuthorForm(ModelForm): class Meta: model = Author fields = ('name' setting: from django.core.exceptions import ValidationError from django.utils.translation import gettext as _ class MinimumLengthValidator: def __init__(self, min_length=8): self.min_length More details can be found in the W3C Web Internationalization FAQ, the Wikipedia article or the GNU gettext documentation. Warning Translation and formatting are controlled by USE_I18N and USE_L10N settings0 码力 | 3085 页 | 2.95 MB | 1 年前3Django 5.1.2 Documentation
the wording of all user facing strings for the name field: from django.utils.translation import gettext_lazy as _ class AuthorForm(ModelForm): class Meta: model = Author fields = ["name", "title", setting: from django.core.exceptions import ValidationError from django.utils.translation import gettext as _ class MinimumLengthValidator: def __init__(self, min_length=8): self.min_length = min_length translators have filled in the message file, it must be compiled. This process relies on the GNU gettext toolset. Once this is done, Django takes care of translating web apps on the fly in each available0 码力 | 2923 页 | 9.62 MB | 1 年前3
共 155 条
- 1
- 2
- 3
- 4
- 5
- 6
- 16