This file contains hidden or 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
diff --git a/cms/admin/placeholderadmin.py b/cms/admin/placeholderadmin.py | |
index b589111..aa7d415 100644 | |
--- a/cms/admin/placeholderadmin.py | |
+++ b/cms/admin/placeholderadmin.py | |
@@ -124,7 +124,7 @@ class PlaceholderAdmin(ModelAdmin): | |
raise Http404 | |
parent = get_object_or_404(CMSPlugin, pk=parent_id) | |
plugin = CMSPlugin(language=language, plugin_type=plugin_type, | |
- position=position, parent=parent) | |
+ position=position, parent=parent, placeholder=parent.placeholder) |
This file contains hidden or 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
diff --git a/cms/models/pluginmodel.py b/cms/models/pluginmodel.py | |
index 5f4317f..5f5d4b5 100644 | |
--- a/cms/models/pluginmodel.py | |
+++ b/cms/models/pluginmodel.py | |
@@ -237,6 +237,14 @@ class CMSPlugin(MpttPublisher): | |
Handle copying of any relations attached to this plugin | |
""" | |
+ def has_change_permission(self, request): | |
+ if self.page: |
This file contains hidden or 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
--- toolbar.html 2010-04-13 20:24:13.000000000 +0200 | |
+++ toolbar_fix.html 2010-04-13 20:24:34.000000000 +0200 | |
@@ -901,7 +901,7 @@ | |
{% if auth %} | |
{% if has_change_permission %}<li><a href="{% url admin:cms_page_change page.pk %}"><span class="cms_toolbar_icon_padeadmin">Icon</span>{% trans "Page Settings" %}</a></li> | |
<!--li><a href="#"><span class="cms_toolbar_icon_pageunpublish">Icon</span>Unpublish Page</a></li--> | |
- <li><a href="{% url pages-root %}{% url admin:cms_page_history page.pk %}"><span class="cms_toolbar_icon_history">{% trans "history" %}</span>{% trans "View History" %}</a></li> | |
+ <li><a href="{% url admin:cms_page_history page.pk %}"><span class="cms_toolbar_icon_history">{% trans "history" %}</span>{% trans "View History" %}</a></li> | |
{% endif %} | |
{% endif %} |
This file contains hidden or 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
In [1]: from simplegallery import models as sg | |
--------------------------------------------------------------------------- | |
ImportError Traceback (most recent call last) | |
/Users/stefanfoulis/Documents/Coding/Workspaces/Main/affichage/<ipython console> in <module>() | |
/Users/stefanfoulis/Documents/Coding/Workspaces/Main/django-simplegallery/simplegallery/models.py in <module>() | |
6 from cms.models import Page | |
7 from cms.models import CMSPlugin | |
----> 8 from cms.models.fields import PageField |
NewerOlder