is there a way to add new skin in django-ckeditor? - django

I'm trying to add new skin in django-ckeditor but its doesnt work and it shows a blank screen in django-admin
I have installed the kama skin and extracted in static\ckeditor\ckeditor\skins\kama but doesnt seem to work.
Below im showing my ckeditor config options:
CKEDITOR_CONFIGS = {
'default': {
'toolbar': None,
'toolbarCanCollapse': True,
'skin': 'kama',
'uiColor': '#b7d6ec',
},
}
Can someone please resolve this issue?I m very new to django ckeditor and its config and building my first website.
Thanks in advance !

I know it's a bit late but I managed to get my Office2013 skin working by mimicking CKEditor directory structure.

django-admin collectstatic -c
This did the trick for me. It replaced an old bundle-aaaaaaaa.js file by another file that was found when I reloaded my page.
(And then I discovered that my problem was that I had moono-lisa skin inside my static/djangocms_ckeditor/ckeditor/skins folder, but moono in my settings)

Related

Run .Rmd posts on HUGO's Academic theme?

Anyone knows a way to publish .Rmd files on Academic's Theme on HUGO? Normally .md and HTML files are easily read by Academic theme but when it comes to .Rmd they are nowhere to be found in the post. I can't find a way to make my website react to
This is a portion of my config.toml, which I thought may have something to do:
paginate = 10 # Number of items per page in paginated lists.
enableEmoji = true
footnotereturnlinkcontents = "<sup>^</sup>"
ignoreFiles = [".ipynb$", ".ipynb_checkpoints$", "_files$", "_cache$"]
[outputs]
home = [ "HTML", "RSS", "JSON", "WebAppManifest" ]
section = [ "HTML", "RSS" ]
[mediaTypes."application/manifest+json"]
suffixes = ["webmanifest"]
[outputFormats.WebAppManifest]
mediaType = "application/manifest+json"
rel = "manifest"
Thank you very much for your attention.
A list of supported file formats in hugo can be found here. As you can see .Rmd is not among them. .Rmd files have to be .html (or .md) in order to be understood and rendered by hugo.
If you use blogdown and run the command blogdown::serve_site() instead of usual cli hugo server this should be done automatically, if I am not mistaken.
Best

How do I make links to blog posts available to DjangoCMS when using djangocms-blog?

I use DjangoCMS (3.2.3) on Django 1.8.12 along with djangocms-blog (0.7). I would like to link blog-posts
in other posts
on other DjangoCMS pages
The app-hooked blog page is available with CMS' Link plugin. However, I do not see how I could link individual posts.
The only and in my eyes dirty workaround I have found is using the app-hooks URL and hard-coding the post's slug directly behind it. It only works if the post URLs are in "slug-only" mode, i.e. w/o categories etc.
Thanks for any thoughts!
Currently there is no generic way to link objects handled by apphooks in the same way as django CMS pages. Providing a solution in a specific application is not trivial, as you basically needs a custom widget to do this
I just came across djangocms-styledlink. Despite the styling capability this link package allows to configure links to other apps, too. For djangocms-blog I added following lines to the setup:
DJANGOCMS_STYLEDLINK_MODELS = [
{
'type': _('CMS Pages'),
'class_path': 'cms.models.Page',
'manager_method': 'public',
'filter': { 'publisher_is_draft': False },
},
{
'type': _('Blog pages'),
'class_path': 'djangocms_blog.models.Post',
'filter': { 'publish': True },
}
]
It seems that currently djangocms-styledlink only works with python 2.

Django-CMS pages all blank after upgrade from 2.3.5 to 2.4.1

I am using Django 1.4.3 and have several sites built using Django-CMS 2.3.5. I want to upgrade them to Django-CMS 2.4.1, so that I can then start to move to Django 1.5.
When I type ./manage runserver from a virtualenv with Django-CMS 2.3.5, all works fine. When I move to a virtualenv with Django-CMS 2.4.1, but otherwise the same, none of my pages can be accessed.
In the admin panel, they all have the name None. If I edit one, the screen shows them with the correct name and all the plugins there. If I try to save the page, the info all disappears, including the name and slug and plugins, and I get a message at the top asking me to fix the below errors (of which there are none). I can press "publish draft", but the browser cannot find any page but /, and this has no plugins on it (and it still has name None in the admin panel).
If I try to add a new plugin, I get an alert saying <django.utils.functional.__proxy__ object at 0x1067a9e90>.
I am not using the MultilingualURLMiddleware middleware, and have USE_I18N = False.
I added 'django.middleware.locale.LocaleMiddleware' to MIDDLEWARE_CLASSES anyway (but it doesn't help if I do not).
I typed ./manage.py migrate, ./manage cms fix-mptt and for good measure ./manage.py cms delete_orphaned_plugins as well.
How do I keep my pages when I migrate to the new version of Django-CMS?
thanks
Here are upgrade instruction.
I think your problem is in new style CMS_LANGUAGES.
Try to set:
USE_I18N = True
CMS_LANGUAGES = {
1: [
{
'code': 'en',
'name': gettext('English'),
'public': True,
},
],
'default': {
'fallbacks': ['en',],
'public': False,
}
}
Also run ./manage.py cms check to checking django CMS installation
The most crucial thing I've ever learnt in django was taking manuel backup of the project.db before any migration process done by manage.py.

Django-tinymce in Django Admin - "can't find variable: tinyMCE"

I'm trying to use django-tinymce to edit fields in django admin.
I've the app installed in my virtualenv (django-tinymce==1.5.1b4). It's listed in my installed apps -
INSTALLED_APPS = (
#...
'tinymce',
#...
)
My settings includes the following
TINYMCE_DEFAULT_CONFIG = {
'theme': "advanced",
'theme_advanced_toolbar_location': "top",
'theme_advanced_buttons1': "bold,italic,underline,separator,"
"bullist,separator,outdent,indent,separator,undo,redo",
'theme_advanced_buttons2': "",
'theme_advanced_buttons3': "",
}
TINYMCE_SPELLCHECKER = True
TINYMCE_COMPRESSOR = True
And I've got the files available at /MEDIA_ROOT/js/tiny_mce (the default).
My models look like -
from tinymce import models as tinymce_models
class MyModel(models.Model)
post = tinymce_models.HTMLField()
When I go to the model admin page, the field appears as a normal text field and my browser tells me there's an error on the inline js script for the field. It says it doesn't recognise the variable tinyMCE. It doesn't look like the page is even trying to load the js file (I'm getting no 404's - I can't see any sign of anything being loaded).
I'm not sure what I'm missing..
Have You, Sir, done python manage.py collectstatic ?
What value variable in settings.py is in TINYMCE_JS_ROOT and TINYMCE_JS_URL
If variable TINYMCE_JS_URL is not set check if You, Sir, have file at /MEDIA_ROOT/js/tiny_mce/tiny_mce.js. If not, try to copy manually from django-tinymce's egg.
OK, looks like it might have been a bug in the django_tinymce code. I've reverted to 1.5.1b2 and everything works as expected. Guess I should look into filing a bug report.

Django CACHE_BACKEND Error

So Im running into this CACHE error when I try to runserver or syncdb.
Here is the traceback: https://gist.github.com/1538051
I tried inserting this into the settings.py file:
CACHE_BACKEND = {
'default': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
}
}
But that gave another error which makes no sense to me.
if backend_uri.find(':') == -1:
AttributeError: 'dict' object has no attribute 'find'
Can someone help me figure what the problem is and how I can go about fixing it.
NB: I am working on the dev server
If you're using Django 1.2 or lower, CACHE_BACKEND (docs) accepts a string:
CACHE_BACKEND = 'dummy://'
If you're using Django 1.3+, CACHE_BACKEND has been deprecated in favour of CACHES (docs):
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
}
}
I'm not sure why your installation isn't creating the appropriate default - it could be that there's something else going on with your installation, but I don't really have enough information without knowing more about your settings.py etc.
First off, What version of django are you using? The dictionary- style backend config is new to django 1.3, and your traceback suggests that you are on something like 1.2.4.
If that's the case, you will need to use the older uri-style cache settings. Something like
CACHE_BACKEND = 'dummy://'
would match what you are trying to set in your question.
The full documentation on caching, relevant to Django 1.2, is available here: http://docs.djangoproject.com/en/1.2/topics/cache/