django cms 4.1.x Documentation
and must include the language in LANGUAGE_CODE. For example: LANGUAGES = [ ("en", "English"), ("de", "German"), ("it", "Italian"), ] LANGUAGE_CODE = "en" (For simplicity’s sake, at this stage it is Python imaging library, will be installed. Pillow needs some system-level libraries - the Pillow documenta- tion describes in detail what is required to get this running on various operating systems. Add: in the following order of preference: • language code in the URL - for example, http://example.com/de (when multilingual URLs are enabled) • language stored in the browsing session • language stored0 码力 | 357 页 | 1.99 MB | 1 年前3django cms 4.1.1 Documentation
and must include the language in LANGUAGE_CODE. For example: LANGUAGES = [ ("en", "English"), ("de", "German"), ("it", "Italian"), ] LANGUAGE_CODE = "en" (For simplicity’s sake, at this stage it is Python imaging library, will be installed. Pillow needs some system-level libraries - the Pillow documenta- tion describes in detail what is required to get this running on various operating systems. Add: in the following order of preference: • language code in the URL - for example, http://example.com/de (when multilingual URLs are enabled) • language stored in the browsing session • language stored0 码力 | 361 页 | 2.00 MB | 1 年前3Django CMS 2.2.x Documentation
Please refer to the documentation on Handling media in custom CMS plugins and the django-sekizai documenta- tion for more information. Toolbar must be enabled explicitly in templates The toolbar no longer urls)), url(r'^', include('cms.urls')), ) if settings.DEBUG: urlpatterns = patterns('', url(r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}) Defines the languages available in django CMS. Example: CMS_LANGUAGES = ( ('fr', gettext('French')), ('de', gettext('German')), ('en', gettext('English')), ) Note: Make sure you only define languages which 0 码力 | 76 页 | 627.98 KB | 6 月前3Django CMS 3.0.x Documentation
tutorial-project cd tutorial-project Run it to create a new Django project called mysite: djangocms -p . mysite Windows users may need to do a little extra to make sure Python files are associated correctly yes • Languages to enable. Option can be provided multiple times, or as a comma separated list: en, de • Optional default time zone: America/Chicago: • Activate Django timezone support: yes • Activate CMS ample, if your processor wraps the output in a div tag, you might end up having div tags inside of p tags, which is invalid. You can prevent such cases by returning rendered_content unchanged if instance0 码力 | 180 页 | 1.56 MB | 6 月前3Django CMS 2.3.x Documentation
Please refer to the documentation on Handling media in custom CMS plugins and the django-sekizai documenta- tion for more information. 8 Chapter 1. Install django cms Documentation, Release 2.3.8 Toolbar to serve static media when developing: if settings.DEBUG: urlpatterns = patterns('', url(r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}) urls)), url(r'^', include('cms.urls')), ) if settings.DEBUG: urlpatterns = patterns('', url(r'^media/(?P .*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}) 0 码力 | 92 页 | 666.41 KB | 6 月前3Django CMS 2.4.x Documentation
urls)), url(r'^', include('cms.urls')), ) if settings.DEBUG: urlpatterns = patterns('', url(r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}) either via {% language %} templatetag or via activate("de") function call in views. Before: {% url "de:myview" %} After: {% load i18n %}{% language "de" %} {% url "myview_name" %} {% endlanguage %} • reverse 'en', 'name': gettext('English'), 'fallbacks': ['de', 'fr'], 'public': True, 'hide_untranslated': True, 'redirect_on_fallback':False, }, { 'code': 'de', 'name': gettext('Deutsch'), 'fallbacks': ['en', 0 码力 | 104 页 | 709.98 KB | 6 月前3django cms 3.1.x Documentation
tutorial-project cd tutorial-project Run it to create a new Django project called mysite: djangocms -p . mysite Warning: djangocms-installer expects directory . to be empty at this stage, and will check yes • Languages to enable. Option can be provided multiple times, or as a comma separated list: en, de • Optional default time zone: America/Chicago: • Activate Django timezone support: yes • Activate {% extends 'base.html' %} {% block content %}{{ view.config.title }}
<p>Namespace: {{ view.namespace }}p>- {% for entry in object_list %}
- {{ entry.question }}
- {{ entry
0 码力 | 200 页 | 1.63 MB | 1 年前3Django 5.0.x Documentation
{% for article in article_list %} <p>{{ article.headline }}p> <p>By {{ article.reporter.full_name }}p> <p>Published {{ article.pub_date|date:"F j, Y" }}p> {% endfor %} {% endblock %} Variables question.id }}/">{{ question.question_text }} {% endfor %} {% else %} <p>No polls are available.p> {% endif %} Note: To make the tutorial shorter, all template examples use incomplete {% if error_message %}<p>{{ error_message }}p>{% endif %} {% for choice in question.choice_set.all %}0 码力 | 2878 页 | 9.60 MB | 1 年前3Django 5.1.2 Documentation
{% for article in article_list %} <p>{{ article.headline }}p> <p>By {{ article.reporter.full_name }}p> <p>Published {{ article.pub_date|date:"F j, Y" }}p> {% endfor %} {% endblock %} Variables question.id }}/">{{ question.question_text }} {% endfor %} {% else %} <p>No polls are available.p> {% endif %} Note: To make the tutorial shorter, all template examples use incomplete {% if error_message %}<p>{{ error_message }}p>{% endif %} {% for choice in question.choice_set.all %}0 码力 | 2923 页 | 9.62 MB | 1 年前3Django 5.1 Documentation
{% for article in article_list %} <p>{{ article.headline }}p> <p>By {{ article.reporter.full_name }}p> <p>Published {{ article.pub_date|date:"F j, Y" }}p> {% endfor %} {% endblock %} Variables question.id }}/">{{ question.question_text }} {% endfor %} {% else %} <p>No polls are available.p> {% endif %} Note: To make the tutorial shorter, all template examples use incomplete {% if error_message %}<p>{{ error_message }}p>{% endif %} {% for choice in question.choice_set.all %}0 码力 | 2917 页 | 9.59 MB | 1 年前3共 93 条- 1
- 2
- 3
- 4
- 5
- 6
- 10