Every repository with this icon (
Every repository with this icon (
| Description: | An Advanced Django Cms edit |
-
1 comment Created 2 days ago by digi604bugxtestsxtestsuite should be working outside of exampleunsurexComments
-
5 comments Created 10 days ago by philomat2.1xtemplates/admin/cms/page/change_form.html bugbugx{% block extrahead %} {{ block.super.super }}
must be:
{% block extrahead %} {{ block.super }}
Comments
just to be sure... is reversion installed? I have changed this line 3 or 4 times the last 3 month... and it seams a bit strange now
Not sure what you mean – isn't reversion a Django-internal versioning app? What does it have to do with this?
By the way, in the latest code I just pulled, the super.super is still there.
django-reversion is a 3th party app. If it is installed the template inheritance is changed. Do you have it installed?
Posting this from the Google group:
The master branch contains {{ block.super.super }}, which does not do
anything.
It also contains {{ media }}.I edited in the correct {{ block.super }}, which does what it should.
But then the {{ media }} variable loads all .js files into the current
page again, which causes a conflict leading to said problem.Adding {{ block.super }} and removing {{ media }} seems to fix it.
-
1 comment Created about 1 month ago by quattromic2.1xbugxPython 2.6: SyntaxError in cms/admin/pageadmin.py:338unsurexEnvironment:
Request Method: GET
Request URL: http://localhost:8000/
Django Version: 1.1.1
Python Version: 2.6.1
Installed Applications:
['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'appmedia', 'filebrowser', 'mptt', 'multilingual', 'siteinfo', 'sorl.thumbnail', 'south', 'tagging', 'tinymce', 'uni_form', 'cms', 'cms.plugins.text', 'cms.plugins.picture', 'cms.plugins.link', 'cms.plugins.file', 'cms.plugins.flash', 'cms.plugins.googlemap', 'cms.plugins.snippet', 'cms.plugins.videoplayer', 'cms.plugins.teaser', 'cms.plugins.twitter', 'contactform', 'csv_export', 'blog', 'news', 'image_filer', 'simplegallery', 'publisher', 'rosetta'] Installed Middleware:
('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', 'cms.middleware.page.CurrentPageMiddleware', 'cms.middleware.user.CurrentUserMiddleware', 'multilingual.middleware.DefaultLanguageMiddleware', 'siteinfo.middleware.login_required.RequireLoginMiddleware', 'cms.middleware.toolbar.ToolbarMiddleware', 'rosetta.middleware.MOReloadMiddleware')Traceback:
File "/Library/Python/2.6/site-packages/django/core/handlers/base.py" in get_response
83. request.path_info) File "/Library/Python/2.6/site-packages/django/core/urlresolvers.py" in resolve
216. for pattern in self.url_patterns: File "/Library/Python/2.6/site-packages/django/core/urlresolvers.py" in get_url_patterns
245. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/Library/Python/2.6/site-packages/django/core/urlresolvers.py" in get_urlconf_module
240. self._urlconf_module = import_module(self.urlconf_name) File "/Library/Python/2.6/site-packages/django/utils/importlib.py" in import_module
35. import(name) File "/Users/maiklust/Documents/workspace/sandbox2.divio.ch/py_src/sandbox2/urls.py" in
6. admin.autodiscover() File "/Library/Python/2.6/site-packages/django/contrib/admin/init.py" in autodiscover
56. import_module("%s.admin" % app) File "/Library/Python/2.6/site-packages/django/utils/importlib.py" in import_module
35. import(name) File "/Users/maiklust/Documents/workspace/dlib/python/py2/cms/admin/init.py" in
1. import pageadminException Type: SyntaxError at /
Exception Value: ('invalid syntax', ('/Users/maiklust/Documents/workspace/dlib/python/py2/cms/admin/pageadmin.py', 338, 101, ' name = settings.CMS_PLACEHOLDER_CONF.get("%s %s" % (obj.template placeholder_name), {}).get("name", None)\n'))
Comments
-
8 comments Created 20 days ago by ulope2.1xbugxUse of jQuery in frontedit mode breaks other JS frameworksfronteditxInjecting jQuery into the page in frontedit mode causes JS-Errors (and possible page breakage) if other JS-Framework (MooTools in my case) are used.
What makes this even worse is that the Toolbar is shown as soon as a user is logged on in the backend.I think there are at least two possibilities of "fixing" this:
- Somehow bring jQuery to not trample over other frameworks.
- Only inject jQuery if Editmode is "ON" (of course then the Off state would have to be coded without jQuery but I guess that's doable)
Comments
Yes, it's included with all js-code on my page as a single compressed js file inside the <head> tag
http://docs.jquery.com/Using_jQuery_with_Other_Libraries the problem is most likely the $ variable, the simple way of fixing this is to not use it and use jQuery variable, and tell jQuery to not change the $ variable.
we actually did something there...
see here:
http://github.com/digi604/django-cms-2.0/blob/master/cms/templates/cms/toolbar/toolbar.html#L365
and
http://github.com/digi604/django-cms-2.0/blob/master/cms/templates/cms/toolbar/toolbar.html#L807
but 807 seams to be commented out... could you play with this a little and see if you bring it to work?
No the problem is not $ but rather that jQuery changes the prototypes of the various object types.
can this be worked around?
If not... could we have the same code implemented in Mootools and a setting to switch (dislikes the idea already)?
I'm not using the frontedit branch yet, but is it possible to impliment the frontedit code in pure javascript instead of using jquery? Or is there jQuery plugins at play?
-
0 comments Created 13 days ago by digi6042.1xbugxtinymce popups in frontedit have the toolbarfronteditxmaybe disable the toolbar if the url starts with MEDIA_URL?
Comments
-
0 comments Created 10 days ago by quattromic2.1xbugxCMS Toolbar middleware unicode problemfronteditxFile "/home/divio/endlich30.info/lib/cms/middleware/toolbar.py", line 62, in process_response
response.content = inster_after_tag(smart_unicode(response.content), u'body', smart_unicode(self.render_toolbar(request)))File "/usr/lib/python2.5/site-packages/django/utils/encoding.py", line 44, in smart_unicode
return force_unicode(s, encoding, strings_only, errors)File "/usr/lib/python2.5/site-packages/django/utils/encoding.py", line 92, in force_unicode
raise DjangoUnicodeDecodeError(s, *e.args)DjangoUnicodeDecodeError: 'utf8' codec can't decode byte 0x8b in position 1: unexpected code byte. You passed in '\x1f\x8b [...]
Comments
-
1 comment Created about 1 month ago by buzzlight2.1xperformance problemoptimizationxit open "http://127.0.0.1:8000/admin/cms/page/" very very slowy,when I run a script that auto add the page.Is it performance problem?
my script is:
for c xrange(2000): p = Page(parent_id=1,created_by='admin', changed_by="admin", site=site,level=0, lft='1', rght='2', tree_id='3') p.save()Comments
we don't have pagination for the tree view. that's probably why its slow. Especially the JS performance gets slow with a lot of pages.
You also add 2000 pages at the root. 2000 root pages is very highly unlikely to happen in a real world scenario.
To make things faster we could add a ajax loading of tree-children instead of the current rendering of all pages. this would speed things up for big trees.
An additional feature could be to add pagination for root nodes. So we would paginage every 20 root nodes. Or a pagination over all nodes but this would make drag&drop unusable. -
1 comment Created 24 days ago by philomat2.1xbugxException when subclassing subclass of CMSPluginfeature requestxWhen creating a plugin model that is based on an existing plugin model, for instance: class SpecialText(Text):
Caught an exception while rendering: plugin model needs to subclass CMSPlugin
Comments
what happens if you try:
class SpecialText(Text, CMSPlugin):i had the same problem making a faq plugin. i had to copy a lot of stuff, but i was able to keep it somewhat manageable by using a lot of import statements:
http://bitbucket.org/tehfink/cmsplugin-faq/ -
at http://www.django-cms.org/en/documentation/2.0/plugins/ there is no entry covering the video plugin
Comments
-
0 comments Created 2 days ago by digi6042.1xoptimizationxexample should not be installed in site-packagespackagingxComments
-
0 comments Created 2 days ago by digi6042.1xoptimizationxcms/media/cms should stay where it is after install with pippackagingxComments
-
1 comment Created 21 days ago by itopia2.1xfeature requestx:Links on the menu to add pages under heading (as children of the page referenced by heading)fronteditxAlso, I would like
registered users to be able to add a page (as child on pagess in the
menu). I reckon I could change the menu templates to have a clickable
link for authorised users, but then will have to populate the page
with defaults, and give users the plugin-list, and so on to continue
with compositon of the new pageComments
-
0 comments Created 4 months ago by ghansson2.1xpage_attribute by reverse_idfeature requestxI've added a feature to the page_attribute template tag that allows outputting page attributes for any page using the reverse_id property, like so:
{# Output current page's page_title attribute #} {% page_attribute page_title %} {# Output page_title attribute of the page with reverse_id 'the_page' #} {% page_attribute page_title 'the_page' %}Patch av cms/templatetags/cms_tags.py
11a12 > import sys 458,460c459,463 < if len(bits) == 2: < #tag_name, name < return PageAttributeNode(bits[1]) --- > if len(bits) >= 2: > # tag_name, name > # tag_name, name, reverse_id > reverse_id = bits[2] if len(bits) == 3 else None > return PageAttributeNode(bits[1], reverse_id) 465c468 < """This template node is used to output attribute from page such --- > """This template node is used to output attribute from a page such 468c471,480 < eg: {% page attribute field-name %} --- > Synopsis > {% page_attribute field-name %} > {% page_attribute field-name reverse-id %} > > Example > {# Output current page's page_title attribute #} > {% page_attribute page_title %} > {# Output page_title attribute of the page with reverse_id 'the_page' #} > {% page_attribute page_title 'the_page' %} > 472a485,486 > reverse-id -- The page's reverse_id property, if omitted field-name of > current page is returned. 474,475c488,490 < def __init__(self, name): < self.name = name.lower() --- > def __init__(self, name, reverse_id=None): > self.name = name.lower() > self.reverse_id = reverse_id 479a495 > 481,482c497,498 < request = context['request'] < page = request.current_page --- > page = self._get_page(context['request']) > 488,489c504,505 < else: < return '' --- > > return '' 492a509,525 > > def _get_page(self, request): > if self.reverse_id == None: > return request.current_page > > PageModel = get_page_model(request) > > try: > return PageModel.objects.get(reverse_id=self.reverse_id) > except: > # FIXME: Move this exception handling further up the call stack > # FIXME: This just ensures error message isn't supressed, replace with > # some proper logging statements > print "ERROR: ", sys.exc_info()[0] > send_missing_mail(self.reverse_id, request) > >Unfortunately I could not get the test suite to pass in its original form (do not know if my version was passing, or if there's something in my environment that causes it to fail), so I'm not submitting the unit test.
Comments
-
1 comment Created 2 months ago by digi6042.1xfeature requestxuse language namespaces for app hooksi18nx -
The plugin list in a page is too wide for many of our users, because they are not considered important enough to be allowed larger monitors. So, it would be handy to change the width of the list - a good way of doing this might be via a setting: CMS_PLUGIN_LIST_WIDTH
Comments
-
1 comment Created 6 months ago by DrMeers2.1xfeature requestxoptimizationxOrphaned Plugin Managementplugin-treexParticularly when dealing with plugins embedded in text, it is very easy for plugins to become orphaned and therefore useless (until #67 is implemented). There should be some provision made to detect and optionally delete (or recover) orphaned plugins.
Comments
at the moment embeded plugins are saved as a child of the text plugin. The idea originally was to display those plugins in the plugin-tree (that still needs to be done :-)
A possibility would be to parse the text on save and delete all plugins that are not referenced anymore in the text. -
0 comments Created 2 days ago by ChrisT2.1xDocumentation installation and configuration. (Example templates)feature requestxWould it be possible to modify the example website (django-cms-2.0/example) to have the templates necessary to create the look and feel of the django-cms.org website (which is very nice by the way).
I am creating this ticket after Patrick's suggestion here:
http://groups.google.com/group/django-cms/browse_thread/thread/fb1531b53707840f#
Comments
-
5 comments Created about 1 month ago by bzedSaving a page with a set reverse id several times still failsbugxThis is a follow-up for issue 237, tested with 2.0 and a clean database.
I was able to reproduce the problem (no very exact steps, but if necessary I can figure it out) by: 1. adding a page
2. adding content and a reverse id
3. publishing the page
4. play with the moderation buttons
5.edit the page again - now saving fails.Here is the output of a select * from cms_page, which shows the problem of the duplicate reverse_ids:
sqlite> select * from cms_page; id = 1 publisher_is_draft = 1 publisher_public_id = 2 publisher_state = 1 created_by = bzed changed_by = bzed parent_id = creation_date = 2009-11-13 12:29:22.987580 publication_date = publication\_end\_date = in_navigation = 1 soft_root = 0 reverse_id = bar navigation_extenders = published = 1 template = base.html site_id = 1 moderator_state = 10 level = 0 lft = 1 rght = 2 tree_id = 1 login_required = 0 menu_login_required = 0 id = 2 publisher_is_draft = 0 publisher_public_id = publisher_state = 0 created_by = bzed changed_by = bzed parent_id = creation_date = 2009-11-13 12:29:22.987580 publication_date = publication\_end\_date = in_navigation = 1 soft_root = 0 reverse_id = bar navigation_extenders = published = 1 template = base.html site_id = 1 moderator_state = 1 level = 0 lft = 1 rght = 2 tree_id = 2 login_required = 0 menu_login_required = 0Let me know if I can help you to debug this.Comments
I'm kinda sure that
diff --git a/pylib/django-cms-2.0/cms/admin/forms.py b/pylib/django-cms-2.0/cms/admin/forms.py index 1db0b19..864ed19 100644 --- a/pylib/django-cms-2.0/cms/admin/forms.py +++ b/pylib/django-cms-2.0/cms/admin/forms.py @@ -104,7 +104,7 @@ class PageForm(PageAddForm): id = cleaned_data['reverse_id'] site_id = cleaned_data['site'] if id: - if Page.objects.filter(reverse_id=id, site=site_id, publisher_is_draft=True).exclude(pk=self.instance.pk).count(): + if Page.objects.filter(reverse_id=id, site=site_id, publisher_is_draft=True).count() > 1: raise forms.ValidationError(ugettext_lazy('A page with this reverse URL id exists already.')) return cleaned_datais the right fix.
i don't think this is the right fix as if you moderator = False you don't get 2 same pages
I think it can have something in common with i18n. When I tried saved my english version of page (primary lang is polish), it yield about reverse id duplication. So I changed it, save and it was OK. Then I edited it again and changed reverse id to previous version. Save was OK.
I doubt that, I've configured my instance to use and know about exactly one language only.
-
6 comments Created 2 months ago by DrMeersCan only edit text-embedded plugins once between savesbugxUsing wymeditor and current master, I can edit a text-embedded plugin and it updates fine. But if I then (without saving) select any embedded plugin icon and then click "edit plugin" again, I get a "No object selected." error message.
Comments
I have now confirmed that this is wymeditor-specific -- TinyMCE works fine.
can you edit the plugin after you "moved" it with drag&drop?
curiously, yes. In fact I can edit it once, then get the error message when trying again, then drag and drop it to somewhere else and then it will work again (once). Dragging/dropping seems to fix the error, but editing again always brings it back.
this is soooooo a wymeditor bug. I hate wymeditor more and more
this will not be fixed in 2.0 as this is a wymeditor bug and really out of the scope of this project. if somebody will take a shot at it... go for it.. but I don't have time and the energy for this.
-
If you store the media on a different domain the rich text editor causes a JavaScript editor when it attempts to load the HTML file.
You can repeat this by doing the following. If the following config for the site/media; site_root - www.mydomain.com media_url - media.mydomain.com admin_media = admin.mydomain.com
Then when you go to the admin and add a text plugin, trying to edit will cause a JavaScript error a request is being made from www.mydomain.com to media.mydomain.com . This is a problem since cross domain requests are not allowed for security reasons. Change History (follow-up: ↓ 2 ) 03/30/09 13:28:32 changed by divio ¶
how does the normal admin handles this issue with the javascript files it loads? (in reply to: ↑ 1 ) 04/04/09 19:45:01 changed by guest ¶
Replying to divio:
how does the normal admin handles this issue with the javascript files it loads?
contrib.admin doesn't user any Ajax so cross domain issues are not well an issue. 04/06/09 16:17:18 changed by divio ¶
how do you handle this if you use ajax anywhere on your site?
Comments
This might well be useful for this bug; https://developer.mozilla.org/En/Same_origin_policy_for_JavaScript
-
0 comments Created 5 months ago by digi604copy pages for m2m and inlines in plugins does not workbugxComments
-
9 comments Created 3 months ago by vinilios3rd party bugxmysql InnoDB support for migrationsmigrationsxComments
Only MyIsam is working at the moment for migrations. Never had the time to make it work on InnoDB. postgres should be working as well
work around:
remove south from installed apps.
reset db
manage.py syncdb
add south to installed apps again
manage.py syncdb
manage.py migrate --fake
ok i tryd to fix this... but either south has troubles with InnoDb or there is something else fundamentally flawed
-
7 comments Created about 1 month ago by mfa3rd party bugxsqlite and migrations (south) problemmigrationsxFile "cms/migrations/0015_modified_by_added.py", line 11, in forwards
db.add_column('cms_publicpage', 'changed_by', orm['cms.publicpage:changed_by'])File "south/db/sqlite3.py", line 20, in add_column
raise ValueError("You cannot add a null=False column without a default value.")ValueError: You cannot add a null=False column without a default value.
Comments
how is the support for sqllite in south nowadays? if you define a default value... does everything else run?
I first used sqlite with django-cms-2.0 and had no problems. but without using south.
because of the recent changes I had to use south/migrations. this seems not to work atm with sqlite :(
so this bug is maybe a south-issue, but why does all 14 migrations before work smoothly?
So since yesterday I'm using postgres to run my testsite with django-cms-2.0.I can confirm that the problem is still there for sqlite with the rc3
I had (what looks to me), like a slightly different manifestation of this problem with the error:
sqlite3.IntegrityError: south_migrationhistory.id may not be NULL
I'm trusting that the person who marked my original as a dup is more in-the-know than I.
Is there a simple workaround that I could use for now? Or is the whole notion of using sqlite with south for local development really not a good idea at this juncture?
have a look here for a possible workaround: http://github.com/digi604/django-cms-2.0/issues/#issue/142
This can be easily fixed:
--- a/cms/migrations/0015_modified_by_added.py +++ b/cms/migrations/0015_modified_by_added.py @@ -112,8 +112,8 @@ class Migration: 'user': ('models.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}) }, 'cms.publicpage': { - 'changed_by': ('models.CharField', [], {'max_length': '70'}), - 'created_by': ('models.CharField', [], {'max_length': '70'}), + 'changed_by': ('models.CharField', [], {'max_length': '70', 'default': '""'}), + 'created_by': ('models.CharField', [], {'max_length': '70', 'default': '""'}), 'author': ('models.ForeignKey', [], {'to': "orm['auth.User']"}), 'creation_date': ('models.DateTimeField', [], {'default': 'datetime.datetime(2009, 6, 30, 4, 55, 13, 502271)' 'id': ('models.AutoField', [], {'primary_key': 'True', 'blank': 'True'}),However this only gets you a little further down the path...
-
3 comments Created about 1 month ago by tehfinkbugxdeleting 'site' object in admin error: sqlite3.OperationalError: no such table: cms_globalpagepermission_sitesdjango1.2xOperationalError: no such table: cms_globalpagepermission_sites
Traceback (most recent call last): File "/opt/source/django_trunk/django/django/core/servers/basehttp.py", line 651, in __call__ return self.application(environ, start_response) File "/opt/source/django_trunk/django/django/core/handlers/wsgi.py", line 241, in __call__ response = self.get_response(request) File "/opt/source/django_trunk/django/django/core/handlers/base.py", line 134, in get_response return self.handle_uncaught_exception(request, resolver, exc_info) File "/opt/source/django_trunk/django/django/core/handlers/base.py", line 154, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/opt/source/django_trunk/django/django/core/handlers/base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/opt/source/django_trunk/django/django/contrib/admin/options.py", line 228, in wrapper return self.admin_site.admin_view(view)(*args, **kwargs) File "/opt/source/django_trunk/django/django/utils/decorators.py", line 36, in __call__ return self.decorator(self.func)(*args, **kwargs) File "/opt/source/django_trunk/django/django/utils/decorators.py", line 86, in _wrapped_view response = view_func(request, *args, **kwargs) File "/opt/source/django_trunk/django/django/utils/decorators.py", line 36, in __call__ return self.decorator(self.func)(*args, **kwargs) File "/opt/source/django_trunk/django/django/views/decorators/cache.py", line 70, in _wrapped_view_func response = view_func(request, *args, **kwargs) File "/opt/source/django_trunk/django/django/contrib/admin/sites.py", line 187, in inner return view(request, *args, **kwargs) File "/opt/source/django_trunk/django/django/utils/decorators.py", line 86, in _wrapped_view response = view_func(request, *args, **kwargs) File "/opt/source/django_trunk/django/django/contrib/admin/options.py", line 917, in changelist_view response = self.response_action(request, queryset=cl.get_query_set()) File "/opt/source/django_trunk/django/django/contrib/admin/options.py", line 696, in response_action response = func(self, request, queryset.filter(pk__in=selected)) File "/opt/source/django_trunk/django/django/contrib/admin/actions.py", line 46, in delete_selected get_deleted_objects(deletable_objects[i], perms_needed, request.user, obj, opts, 1, modeladmin.admin_site, levels_to_root=2) File "/opt/source/django_trunk/django/django/contrib/admin/util.py", line 164, in get_deleted_objects for sub_obj in rel_objs.all(): File "/opt/source/django_trunk/django/django/db/models/query.py", line 99, in _result_iter self._fill_cache() File "/opt/source/django_trunk/django/django/db/models/query.py", line 690, in _fill_cache self._result_cache.append(self._iter.next()) File "/opt/source/django_trunk/django/django/db/models/query.py", line 231, in iterator for row in self.query.results_iter(): File "/opt/source/django_trunk/django/django/db/models/sql/query.py", line 281, in results_iter for rows in self.execute_sql(MULTI): File "/opt/source/django_trunk/django/django/db/models/sql/query.py", line 2373, in execute_sql cursor.execute(sql, params) File "/opt/source/django_trunk/django/django/db/backends/util.py", line 19, in execute return self.cursor.execute(sql, params) File "/opt/source/django_trunk/django/django/db/backends/sqlite3/base.py", line 193, in execute return Database.Cursor.execute(self, query, params) OperationalError: no such table: cms_globalpagepermission_sitesComments
sorry, i forgot to mention:
- django trunk, rev: 11723
- django-cms trunk, commit: 3205b6d
- using example project
- south was not installed (uncommented from settings.py before syncdb)
-
Comments
-
3 comments Created 7 months ago by digi604feature requestxRefactor out the plugin system to its own applicationplugin-treexSo it can be used in other apps such as:
News, Blogs etc.
Comments
This can be relatively simple from a backend perspective.
All that needs to happen to get things linking up correctly is making the Placeholder model link to any model. This could be done with contenttypes (slow) or it could be done by changing the object reference (page, currently an FK on Page) to a string and doing some simple serialisation.
So instead of storing a page pk (eg 3), it stores "Page:3".
This does mean that Placeholder wouldn't be easily able to look up the tree (ie access the Page object). I'm not sure if that's an issue but it would be anyway as if Placeholders are bound to non-page objects, they're not going to have Page-like footprints anyway. I would suggest making Placeholder completely independent.
The second and larger point to all of this is editing the Placeholders. There would need to be some interface. There could be an admin widget that gets thrown around but I think this would be a great opportunity to explore some on-page editing.
It would be relatively simple from there for non-CMS views to load the editing framework.
the problem we have at the moment is that we only can link to existing rows. So if you would use this in a blog for example. You would need to save the blog entry first before you can add plugins. This is very ugly on my point of view and I probably will do something like a generic foreign key and a custom edit-inline... something similar that feincms has but with our interface. Instead of placeholders we would make the whole thing a model.field or form.field.
You would need to save the blog entry first before you can add plugins
I don't see that as a major issue. The model I'm basic this on is Concrete5.
http://www.concrete5.org/It's a PHP CMS that has a few things wrong with it (PHP for one) but its editing interface is pretty awesome (see the video on their homepage).
To create a page in that model, you have to create the page first and then you're presented with edit zones (placeholders if you will) that you can add "blocks" (plugins here) to. It works really well as an editing route.
-
0 comments Created 3 months ago by digi604feature requestxmake menu its own applicationmenu refactorxso other apps can easily extend and manipulate it
Comments
-
Plugins should be organized in a tree so more complex stuff can happen
Comments
-
3 comments Created 8 months ago by digi604feature requestxplugin-treexTranslation Helpers / Plugin copyusabilityxIt would be nice if you could copy the plugins from other languages and if you could see in the page view which languages still need translations
Comments
I am not sure I understand fully. You're not talking about something like http://code.google.com/p/django-rosetta/ for example? Are you?
no.. just copy and paste for plugins... over languages
-
1 comment Created 7 months ago by digi604feature requestxplugin-treexOne save (if page is saved all plugins are saved as well)usabilityx -
5 comments Created 6 months ago by DrMeersfeature requestxplugin-treexSharable pluginsusabilityxSay I have the same link, or file, or image that appears in the content of a number of pages on my site. It would be nice to be able to link an existing plugin into each page rather than creating numerous duplicates. Then if I want to update that image or file or link, I could just update a single instance and all pages would be up to date.
So when adding a plugin to a page, the user should be given the option to select an existing one, or create a new one.
Comments
this is similar to #13. I would propose a cut / copy / paste.
The problem is: CMSPlugin only has a foreign-key to the page... and would need to be replaced with a m2m field. Or we could just introduce a new kind of plugin: Clone or Duplicate... that just refers to the original plugin. This way if the plugin gets deleted not all instances get deleted... or maybe this is desired?Although it could make the admin page quite messy if implemented for all plugins, I like the way django-dbforms uses a model for settings up forms via admin, then from a page you add a form plugin and pick the content to add.
This could be applied to text etc, to allow a list of content to be assembled independent of the pages.I am against doing that. There are certain places where this is very helpful, but most of the times it's probably a better choice to implement this in the plugin itself. Similar to what agentk suggested.
An example is the picture plugin. sure copying this would be useful and all, but why not just change it so that you get the option to upload a new image upon creating the plugin instance OR choose from an already uploaded one.
I think it's wiser to leave this part to the plugin itself. It makes more sense IMO, because on the plugin level, you have more flexibility. To go with the picture example: you might want to reuse the image that you already have on Page X but here you want a different caption, this is not easily possible with your proposed solution.
if, in case, you want a different caption, you go use GenericForeignKeys http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#id1
This way you could have one image (read "the same") on the filesystem/database/whatever and different captions.
Imho it would be nice to have the opportunity to not have duplicates -- this is especially true for things like images, videos etc. as they eat up a lot of diskspace. Where and how exactly to put this kind of code ... hm ... plugin level sounds reasonable to me i.e. Clone (basically a link ie no duplication) and Duplicate sounds good to me.
-
3 comments Created 7 months ago by digi604feature requestxplugin-treexAuto add default plugins to placeholdersusabilityxIf you add a page placeholders should be filled with default plugins
Comments
-
5 comments Created 6 months ago by digi604Plugins should be able to include JS / CSS in frontendfeature requestxComments
define media like in widget or forms in plugin class that get included on the frontend site
fivethreeo
Thu Oct 29 04:59:49 -0700 2009
| link
I was wondering about fixing this, but I got some questions for you. Do you want the media to be "static" like in the admin, or returned from a function of the modeladmin that takes request or request and the plugin instance as arguments.
def get_media(self, request): # or def get_media(self, request, obj): # or just a media property/class class PluginMedia: js = () css {} # or a combination of the threeThis also brings up the question of number of db_hits, should the query be a distinct just to get the plugin types or hould all plugins be loaded and cached for later use in the templatetag. This also depends a lot on if the media should be based on the plugin instance or not.
i think loading them beforehand and caching them is the only way. But we don't know yet if a plugin will be displayed as a placeholder may be inside an {% if %} or a plugin is assigned to a placeholder the the current template does not provide anymore. But i think this are edge cases and can be overlooked. request and instance as function parameter are good and should cover all possible cases. returning a Media Class is preferred.
fivethreeo
Thu Oct 29 12:52:32 -0700 2009
| link
made a branch for this in my repo, works with the example app so should be easy to try out, i want to add some docs, where should templatetags/plugin config be documented?
-
1 comment Created 6 months ago by evildmpSuggestion to allow arbitrary page template flagsfeature requestxWe could implement a setting, like:
CMS_PAGE_FLAGS = ( 'use_special_stylesheet', 'put_search_box_on_page', )Where the user can create flags.
Then in the admin for each page the user will see a check-box for each flag.
In the templates we can check for each flag, and accordingly add stylesheet, insert a search box, and so on.
This will make it possible to add simple attributes to a page without requiring them to be hardcoded into models.
Comments
-
Comments
-
8 comments Created 6 months ago by ichernetskyRedirecting in a plugin view.feature requestxPlease add the possibility to redirect an user in a plugin view. Sometimes it's preferred to control a flow on the server side, instead of using AJAX.
Comments
maybe a possibility to raise an exception and middleware that will handle it
Right now this does not work as expected, as raising an exception in a plugin raises a TemplateSyntaxError. So no way to do anything.
we could set a variable on the request and the middleware could look for if this variable is present.
This works, but still it would be more convenient if there was the possibility to return a HttpResponse in the plugin, as
1) it's cleaner and easier
2) Django doesn't have to process the entire responseWhy do we have to return the context anyway, if we can modify the context directly?
The problem is that at the moment when the plugin is rendered we are not anymore in a view but already in render_to_response. This is needed for 3th party app support. We could check if the render function returns a HttpResponse.... and if it does wrap it like described above... would make the api simpler and more intuitive..
We also could assign the response to the request and then raise an exception... this would eliminate the render to the end problem.
What do you mean by: if we can modify the context directly?
I did not take a look at the django-cms code, but the context variable is passed to the render method, that's why we could just update it and not return it. That way, the return value of render() would be reserved for a HttpResponse. But I agree that we shouldn't change the behaviour, so a check isinstance(retval, HttpResponse) might be an option.
-
1 comment Created 5 months ago by digi604approverxgenerate a diff for approverfeature requestxFor somebody that needs to approve a changed page generating a diff would be awesome
http://code.google.com/p/django-reversion/wiki/GeneratingDiffs
Comments
There's also HTML Diff from lxml, which, at least for the Text plugin, would probably be better understood by non-technical users.
http://codespeak.net/lxml/lxmlhtml.html#html-diff
Another possibility would be Aaron Swartz's HTMLDiff, which wouldn't introduce a dependency on lxml
-
1 comment Created 5 months ago by lucasvoShow plugin again after saving it.feature requestx -
1 comment Created 3 months ago by vinilioscopy plugins from one language to anotherfeature requestxi would like some comments on the following method
i created an admin view to duplicate plugins of a page from one language to another:
def copy_page_assets(self, request, object_id, lfrom, lto): """Copy plugins from one language to another """ from cms.plugins.text.models import Text instance = page = get_object_or_404(Page, id=object_id) plugins = list(page.cmsplugin_set.all().order_by('tree_id', '-rght')) """ plugin duplicates creation (code shared from cms/models/pagemodel.py copy_page method) """ ptree = [] for p in plugins: plugin, cls = p.get_plugin_instance() p.page = page p.pk = None p.id = None p.tree_id = None p.lft = None p.rght = None p.publisher_public_id = None p.language = lto if p.parent: pdif = p.level - ptree[-1].level if pdif < 0: ptree = ptree[:pdif-1] p.parent = ptree[-1] if pdif != 0: ptree.append(p) else: ptree = [p] p.level = None p.save() if plugin: plugin.pk = p.pk plugin.id = p.pk plugin.page = page plugin.tree_id = p.tree_id plugin.lft = p.lft plugin.rght = p.rght plugin.level = p.level plugin.cmsplugin_ptr = p plugin.publisher_public_id = p.pk plugin.language = lto plugin.save() #TODO: retrieve url dynamicly return HttpResponseRedirect("/admin/cms/page/%s/?language=%s" % (object_id, lto))i have also implemented javascript hooks for it to work with page language select box if someone wants it msg me
Comments
hey vinilios.
read here http://github.com/digi604/django-cms-2.0/blob/e1e2dcd0cd0d981cd950d061a86505dafb6d5474/cms/docs/contribution.md on how to contribute so we would be able to have a look at it and integrate it into master branch
-
3 comments Created 3 months ago by aronchi{% show_breadcrumb %} shows the first breadcrumb if used outside cms urlsfeature requestxIf I use show_breadcrumb templatetag outside the cms pages it shows me a wrong page (the first) instead of nothing.
I need this to work because I use only a template for cms pages and other apps one.
Comments
as a workaround, you could wrap the breadcrumb template tag in an {% if…%} tag to test if you are in the right template
I must check a var to use if tag.
But I don't know what var I can check. I'm using the same template because I need to integrate django-cms with other django content. I think it's a pretty standard need.
But It always shows the root page, which is not the root of my site (I have a blog in the home, I only need to say the home is another page).
-
0 comments Created 2 months ago by quattromicfeature requestxEnhancement: Editing a page in multi-site environmentusabilityxWhen a page in a multi-site environment is edited, there should be an obvious, eye-catching indication to which site the currently edited page belongs to.
Comments
-
0 comments Created 2 months ago by mfaRender Django template commands in text-pluginfeature requestxComments
-
0 comments Created 2 months ago by mfaAdd ability to choose no WYSIWYG-Texteditor in text-plugin.feature requestxComments
-
implement page extensions
refactor out some obscure title fields to its own extensions (seo, softroot etc)
will depend on: http://code.djangoproject.com/ticket/7270
hopefully ready in django 1.2Comments
-
auto detect apphooks,
auto detect nav_extenders,Comments
-
Hi
I'm using S3 as a storage backend, so that I have made small changes to the files urls to support it
cms/plugins/file/models.pyfrom:
def file_exists(self): return exists(self.file.path); def get_file_name(self): return basename(self.file.path)to:
from django.core.files.storage import default_storage
def file_exists(self): return default_storage.exists(self.file.name); def get_file_name(self): return basename(self.file.url)Could somebody please batch it to the CMS?
Thank youComments
please read here: http://www.django-cms.org/en/documentation/2.0/contribution/
if you want this to be in RC2 push to github
-
2 comments Created about 1 month ago by CianticSame plugin on bunch of pages.feature requestxCurrently one can set plugin to single page, one should be able to choose which pages it appears instead. Sort of shared plugin which appears on selected pages "Right column".
It is important you can select the pages. Creating rule system (e.g. only "show this plugin in right column of subpages of this page") is always a bit inflexible.
This prevents me to using django-cms at the moment, in Joomla one can choose plugin (module at joomla) and put it to selected pages. And almost all pages reuses some text plugins.
Comments
sublimevelo
Wed Oct 28 06:45:42 -0700 2009
| link
I agree that there should be some sort of cascading portlet system. Even the "rule system" mentioned in the post would be a step in the right direction.
-
0 comments Created about 1 month ago by makkalotHaving Per Row Permissions for Pluginsfeature requestxIt would be cool to have some options to say : load that plugin for users that have permission 'x'. One project i discovered http://bitbucket.org/jezdez/django-authority/ is doing that per row permissions very easy.
Comments
-
2 comments Created about 1 month ago by bzedplugins/picture: Use filebrowser if installed instead of the defaultupload dialogfeature requestxOften you want to reuse images instead to upload them again and again, so the picture plugin should support to use filebrowser if it is installed.
Comments
filebrowser integration is on the todo list... do you know if the filebrowser Fields extend now ImageField?
-
0 comments Created about 1 month ago by rawjamMake placeholders accessible in the contextfeature requestxThere are a few scenarios where it would be useful to be able to check for the existance of a placeholder (that is to say, to check whether or not plugins have been added to a specific placeholder for a given page). This would allow a bit of basic logic to be added to the cms template such as:
{% if headline %}
<h1 class="headline">{% placeholder headline %}</h1>{% else %}
<h1 class="headline">{% page_attribute page_title %}</h1>{% endif %}
Comments
-
1 comment Created about 1 month ago by glooneyEdit Page Templates within the admin site.feature requestx -
2 comments Created 27 days ago by BlizzTheShowFeature request: cms admin + grappellifeature requestxWould be great if the admin interface would work with grappelli.
http://code.google.com/p/django-grappelli/
At the moment it does not work well together.
Comments
I am also interested in this. I tried to have a look at the code but I do not currently have the time to attempt and get this working well. I am however willing to donate $100 to anyone who is able to get this working well with grappelli (working well and fitting in with the rest of grappelli).
-
Text plugins get their name automatically from the text, but other plugins often have no useful name. It would be nice to be able to name them optionally: "Intro", "List of departments", "Picture of the Prime Minister"
Comments
-
9 comments Created 16 days ago by italomaiaplugins.picture image should accept rel attribute infofeature requestxDoing this, slimbox will became easier to use. rel="lightbox" makes slimbox capture the image.
Comments
do you mean in the admin?
Why you don't just overwrite the template for certain placeholders?Yeap, in the admin. Well, it seemed a common use, as the link field gives you a hyperlink to the image to have a way to edit it's rel. Just the first line of the default template woulf have to change. Something like this works:
{% if link %}{% endif %}
In the model, the change is very slim too.
I support this as well, all the link / picture items should have all the attributes available (but optional) like rel, class, etc.
I would support this if this fields are hidden in an advanced tab
just before someone goes ahead and implements it....
why don't you solve it over the template?what do you mean? why don't we override the template for pictures? If so mostly because i don't want the rel="shadowbox" attribute on all of my pictures which is where i would use this at.
do you don't want it on pictures that are in the same or in different placeholders?
Depends on the image, often times i will have images in the same placeholder that i want some of them to have a rel attribute and other ones not too. I don't really see a reason not to allow this so i think i'll try to get this done over this weekend. It's really the only local patch i have left that i have to apply to a checkout.
-
1 comment Created 7 days ago by fitzgeraldsteeleCSRF verification failed in django1.2django1.2xDjango is updating its Cross Site Request Forgery protection, requiring a csrf_token to be passed with each form.
I installed django-cms master from git, and ran against django trunk rev 11807. When I tried to add a page through the admin panel, I got the 403 Forbidden error. Reason for failure: CSRF token missing or incorrect.
Comments
-
Hi,
Your Installation Doc is Good but very hard to understand for me (http://www.django-cms.org/en/documentation/2.0/installation/).
/> This First Line made confusion (Make sure that cms, mptt and publisher folders are on your pythonpath.). I am Newbie with Django can you tell what is and where is (pythonpath).This line also make confusion for me (Be sure to copy the cms/media/cms/ folder into your media directory or make a symbolic link as appropriate.) Can you tell me what is and where is media dir.
Friend tell me, all code which you tell to add on your installation page. those code will add in every project files or some code will add django and python files.
Please help me, i want to do web development with django-cms but i can't do this without your help friend.
I think you can make good and user friendly your doc with some screenshots, it will help somebody like me and it will increase django-cms users.
Regards,
AzadComments
-
0 comments Created 1 day ago by ecommerceguyUser View and edit permisons by user groupfeature requestxCurrently you can limit user views based on logged in or not logged in. However this is very limited a powerful feature would be to give different view permissions for different user groups for example different levels of subscribers can access different content.
Dot Net Nuke 5.0 does this very well... although their system is lacking the elegance and speed of django CMS they have this part of it done right you can assign view and or edit permissions to different groups at the page, menu or even module level.
Our company is using Django CMS for our website however this feature is very important for us. we have different users Sales Reps, Retail Stores, Distributors, Employees, all who need to log into our site and view specific pages and content only available to them. If this could be included with the next release I am certain it will be of great value.
Comments
- 2.0.1▾
- 2.1▾
- 3rd party bug▾
- approver▾
- bug▾
- django1.2▾
- docs▾
- fallbacks▾
- feature request▾
- frontedit▾
- i18n▾
- menu refactor▾
- migrations▾
- moderation▾
- optimization▾
- packaging▾
- permissions▾
- plugin-tree▾
- publisher▾
- python 2.4▾
- reversion▾
- tests▾
- unsure▾
- usability▾
- validation▾
- Apply to Selection
-
Change Color…
Preview:preview
- Rename…
- Delete












with other settings