Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cms settings changed, added merging with django settings
video plugin upgrade some tests fixed yaml test fixtures changed to json copy is broken, permission framework is broken, currently: 9 Failures, 1 Error
- Loading branch information
Showing
57 changed files
with
741 additions
and
1,072 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
|
||
VERSION = (2, 0, 0, 'RC1') | ||
__version__ = '.'.join(map(str, VERSION)) | ||
|
||
# patch settings | ||
from conf import patch_settings | ||
patch_settings() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
from django import forms | ||
from django.utils.translation import ugettext_lazy as _ | ||
from cms import settings as cms_settings | ||
from django.conf import settings | ||
|
||
def get_copy_dialog_form(request): | ||
fields = {} | ||
if cms_settings.CMS_PERMISSION: | ||
if settings.CMS_PERMISSION: | ||
fields['copy_permissions'] = forms.BooleanField(label=_('Copy permissions'), required=False, initial=True) | ||
|
||
if cms_settings.CMS_MODERATOR: | ||
if settings.CMS_MODERATOR: | ||
fields['copy_moderation'] = forms.BooleanField(label=_('Copy moderation'), required=False, initial=True) | ||
Form = type('CopyDialogForm', (forms.BaseForm,), { 'base_fields': fields }) | ||
return Form |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
from django.conf import settings | ||
from patch import pre_patch, post_patch, post_patch_check | ||
|
||
ALREADY_PATCHED = False | ||
|
||
def patch_settings(): | ||
"""Merge settings with global cms settings, so all required attributes | ||
will exist. Never override, just append non existing settings. | ||
Also check for setting inconstistence if settings.DEBUG | ||
""" | ||
global ALREADY_PATCHED | ||
|
||
# do this just once | ||
if ALREADY_PATCHED: | ||
return | ||
|
||
ALREADY_PATCHED = True | ||
|
||
from cms.conf import global_settings | ||
# patch settings | ||
|
||
pre_patch() | ||
|
||
# merge with global cms settings | ||
for attr in dir(global_settings): | ||
if attr == attr.upper() and not hasattr(settings, attr): | ||
setattr(settings._wrapped, attr, getattr(global_settings, attr)) | ||
|
||
|
||
post_patch() | ||
|
||
if settings.DEBUG: | ||
# check if settings are correct, call this only if debugging is enabled | ||
post_patch_check() | ||
|
||
|
||
|
||
|
||
|
||
""" | ||
removed CMS_UNIQUE_SLUGS setting | ||
""" |
Oops, something went wrong.