Skip to content

Commit

Permalink
Merge pull request #3872 from yakky/merge_3010
Browse files Browse the repository at this point in the history
Merge 3.0.10 back
  • Loading branch information
yakky committed Feb 15, 2015
2 parents 4a75fae + ea423ff commit 3864d6e
Show file tree
Hide file tree
Showing 349 changed files with 21,478 additions and 24,354 deletions.
3 changes: 2 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ Contributors (based on gitlog) (440):
* mrlundis
* mvaerle
* MW
* Nelson Brochado
* neoprolog
* Nick Jones
* Nickolay V. Shmyrev
Expand Down Expand Up @@ -460,4 +461,4 @@ Contributors (based on gitlog) (440):
* zundoya
* Óscar M. Lage
* Øyvind Saltvik
* Антон Евжаков
* Антон Евжаков
13 changes: 13 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,19 @@ Please see Install/2.4 release notes *before* attempting to upgrade to version 2
- Fix an error in a translated phrase
- Fix error when moving items in the page tree

=== 3.0.10 (2015-02-14) ===
- Improved Py3 compatibility
- Improved the behavior when changing the operator's language
- Numerous documentation updates
- Revert a change that caused an issue with saving plugins in some browsers
- Fix an issue where urls were not refreshed when a page slug changes
- Fix an issue with FR translations
- Fixed an issue preventing the correct rendering of custom contextual menu items for plugins
- Fixed an issue relating to recovering deleted pages
- Fixed an issue that caused the uncached placeholder tag to display cached content
- Fixed an issue where extra slashed would appear in apphooked URLs when APPEND_SLASH=False
- Fixed issues relating to the logout function

==== 3.1 (unreleased) ===
- Removed django-mptt in favor of django-treebeard
- Removed compatibility with Django 1.4 / 1.5
Expand Down
26 changes: 23 additions & 3 deletions cms/admin/settingsadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from django.contrib.auth.admin import csrf_protect_m
from django.db import transaction
from django.http import HttpResponseRedirect, HttpResponse
from django.utils.translation import override

from cms.models import UserSettings
from cms.utils.urlutils import admin_reverse
Expand Down Expand Up @@ -55,15 +56,34 @@ def session_store(self, request):
if request.method == "POST":
request.session['cms_settings'] = request.POST['settings']
request.session.save()
return HttpResponse(json.dumps(request.session.get('cms_settings', '')), mimetype="application/json")
return HttpResponse(
json.dumps(request.session.get('cms_settings', '')),
mimetype="application/json"
)

def save_model(self, request, obj, form, change):
obj.user = request.user
obj.save()

def response_post_save_change(self, request, obj):
post_url = admin_reverse('index', current_app=self.admin_site.name)
return HttpResponseRedirect(post_url)
#
# When the user changes his language setting, we need to do two things:
# 1. Change the language-prefix for the sideframed admin view
# 2. Reload the whole window so that the new language affects the
# toolbar, etc.
#
# To do this, we first redirect the sideframe to the correct new, URL,
# but we pass a GET param 'reload_window', which instructs JS on that
# page to strip (to avoid infinite redirection loops) that param then
# reload the whole window again.
#
with override(obj.language):
post_url = admin_reverse(
'cms_usersettings_change',
args=[obj.id, ],
current_app=self.admin_site.name
)
return HttpResponseRedirect("{0}?reload_window".format(post_url))

def has_change_permission(self, request, obj=None):
if obj and obj.user == request.user:
Expand Down
2 changes: 1 addition & 1 deletion cms/extensions/toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def get_title_extension_admin(self, language=None):
page = self._get_page()
urls = []
if language:
titles = page.get_title_object(language),
titles = page.get_title_obj(language),
else:
titles = page.title_set.all()
# Titles
Expand Down
Binary file modified cms/locale/af/LC_MESSAGES/django.mo
Binary file not shown.

0 comments on commit 3864d6e

Please sign in to comment.