Skip to content
This repository
  • 6 commits
  • 7 files changed
  • 0 comments
  • 3 contributors
Apr 04, 2013
luke crouch groovecoder django 1.4.5 i18n/l10n updates
django 1.4.5 deprecates auto-discovery of locale/; add explicit LOCALE_PATHS setting

new tower doesn't need or have verbatimize command
f33751e
luke crouch groovecoder change mdn_prod logging to admin emails 9a64180
David Walsh darkwing fix bug 844636 - Add rev comment to new docs c5960d2
Les Orchard lmorchard Merge pull request #984 from groovecoder/server-error-logging
change mdn_prod logging to admin emails
7e48045
Les Orchard lmorchard Merge pull request #985 from darkwing/new-document-revision-844636
fix bug 844636 - Add rev comment to new docs
2a85f78
Les Orchard lmorchard Merge pull request #983 from groovecoder/fix-locale-path-deprecation
django 1.4.5 i18n/l10n updates
e2ed852
6 apps/wiki/templates/wiki/edit_document.html
@@ -132,11 +132,7 @@
132 132
133 133 {% include 'wiki/includes/title_autosuggest_url.html' %}
134 134
135   - <section class="page-meta"><section id="page-comment">
136   - <h2>{{_('Revision Comment')}}</h2>
137   - <p>{{_('Tell us why you made this change.')}}</p>
138   - {{ revision_form.comment | safe }}
139   - </section></section>
  135 + {% include 'wiki/includes/revision_comment.html' %}
140 136
141 137 <section class="page-meta">
142 138 {% set tags = document.tags.all() %}
5 apps/wiki/templates/wiki/includes/revision_comment.html
... ... @@ -0,0 +1,5 @@
  1 +<section class="page-meta"><section id="page-comment">
  2 + <h2>{{_('Revision Comment')}}</h2>
  3 + <p>{{_('Tell us why you made additions and changes.')}}</p>
  4 + {{ revision_form.comment | safe }}
  5 +</section></section>
7 apps/wiki/templates/wiki/new_document.html
@@ -47,12 +47,7 @@
47 47
48 48 {% include 'wiki/includes/title_autosuggest_url.html' %}
49 49
50   - <section class="page-meta">
51   - <section>
52   - <h4>{{_('Review needed?')}}</h4>
53   - {{ revision_form.review_tags|safe }}
54   - </section>
55   - </section>
  50 + {% include 'wiki/includes/revision_comment.html' %}
56 51
57 52 <section class="page-meta">
58 53 <section id="page-tags">
6 apps/wiki/templates/wiki/translate.html
@@ -118,11 +118,7 @@
118 118 </section>
119 119 </div>
120 120
121   - <section class="page-meta" style="clear:both;"><section id="page-comment">
122   - <h2>{{_('Revision Comment')}}</h2>
123   - <p>{{_('Tell us why you made this change.')}}</p>
124   - {{ revision_form.comment | safe }}
125   - </section></section>
  121 + {% include 'wiki/includes/revision_comment.html' %}
126 122
127 123 </details>
128 124 {% endif %}
16 apps/wiki/tests/test_views.py
@@ -915,6 +915,22 @@ def test_create_on_404(self):
915 915 args=['Template:NoExist'],
916 916 locale=locale))
917 917 eq_(302, response.status_code)
  918 +
  919 + def test_new_document_comment(self):
  920 + """ Creating a new document with a revision comment saves the comment """
  921 + client = LocalizingClient()
  922 + client.login(username='admin', password='testpass')
  923 +
  924 + comment = 'I am the revision comment'
  925 + slug = 'Test-doc-comment'
  926 + loc = settings.WIKI_DEFAULT_LANGUAGE
  927 +
  928 + # Create a new doc.
  929 + data = new_document_data()
  930 + data.update({'slug': slug, 'comment': comment})
  931 + resp = client.post(reverse('wiki.new_document'), data)
  932 + eq_(comment,
  933 + Document.uncached.get(slug=slug, locale=loc).current_revision.comment)
918 934
919 935 @attr('retitle')
920 936 def test_retitling_solo_doc(self):
1  docs/localization.rst
Source Rendered
@@ -275,7 +275,6 @@ be big merging headaches.
275 275 Updating strings is pretty easy. Check out the localizations as above, then::
276 276
277 277 $ python manage.py extract
278   - $ python manage.py verbatimize --rename
279 278
280 279 Congratulations! You've now updated the POT file.
281 280
6 settings.py
@@ -277,6 +277,7 @@ def lazy_language_deki_map():
277 277 # to load the internationalization machinery.
278 278 USE_I18N = True
279 279 USE_L10N = True
  280 +LOCALE_PATHS = path('locale')
280 281
281 282 # Use the real robots.txt?
282 283 ENGAGE_ROBOTS = False
@@ -1107,9 +1108,9 @@ def read_only_mode(env):
1107 1108 'level': LOG_LEVEL,
1108 1109 },
1109 1110 'mdn_prod': {
1110   - 'class': 'logging.handlers.SysLogHandler',
  1111 + 'class': 'django.utils.log.AdminEmailHandler',
1111 1112 'formatter': 'mdn_default',
1112   - 'level': LOG_LEVEL,
  1113 + 'level': logging.ERROR,
1113 1114 },
1114 1115 },
1115 1116 'loggers': {
@@ -1118,6 +1119,5 @@ def read_only_mode(env):
1118 1119 'level': LOG_LEVEL,
1119 1120 'propagate': False,
1120 1121 },
1121   -
1122 1122 },
1123 1123 }

No commit comments for this range

Something went wrong with that request. Please try again.