Cannot add extra styles to django-ckeditor - django

django-ckeditor packages comes with highlight.js library for code snippets and that library comes with some pre-installed styles.
As I prefer seti-ui style, I download it from highlightjs.org. Inside the downloaded package is seti-ui.min.css file and I copy it to \venv\Lib\site-packages\ckeditor\static\ckeditor\ckeditor\plugins\codesnippet\lib\highlight\styles where all other styles are and then set this in my settings.py:
'codeSnippet_theme': 'seti-ui' # based on the name of css file
And it doesn't work. The editor shows the code snippet but without any style. I've tried several other pre-installed themes like monokai and foundation and they work fine.
Then I noticed that seti-ui.min.css is inside a subfolder base16 in the package I downloaded from highlightjs.org, so I tried \venv\Lib\site-packages\ckeditor\static\ckeditor\ckeditor\plugins\codesnippet\lib\highlight\styles\base16 too but didn't work either.
So what is the correct method to add it?

Related

How to make XCode bundle C++ project as an .app?

A few months ago, I inherited a C++ command-line XCode project that I've since turned into an app with a GUI, but XCode won't build it as an .app bundle:
Instead, XCode builds a Debug folder, which, interestingly enough, works as an app if I copy it and rename it to "[Bundle Display Name].app".
There are two problems with this though:
(1) I have to manually do this for each build
(2) It doesn't link to my Assets.xcassets file containing my app icons or my Info.plist file or any of the other resources I need.
I've scoured Apple's XCode documentation and come up with nothing. Are there any XCode veterans who know the solution?
EDIT: It seems like the only solution is to add a script to the Build Rules to manually change the Debug directory to an .app and structure it properly. The problem I'm now having is that my app doesn't see my .icns file unless the absolute path is hardcoded into the Info.plist file. For example:
<key>CFBundleIconFile</key>
<string>AppIcon.icns</string>
^This doesn't work
<key>CFBundleIconFile</key>
<string>/Users/.../build/Control Cam.app/Contents/Resources/AppIcon.icns</string>
^This works. But of course it can't find the icon anymore if I move the app to a different folder. Any ideas how to get it to use relative path names?

What link references to include when setting up foundation project in phpStorm

Firstly I am new to using foundation.
When you go onto foundations website and you download the complete foundation file you get this index file:
that has link references to the stylesheets and the Js files and if you start coding everything works just fine, but if I create a foundation project through php storm it downloads the foundation release straight from GitHub, but this folder:
does not have a index file that includes the required css and js files, and I have tried to find the files but they are not included in this version from github. What files do I need to link to get foundation working.
In short, you'd need to link foundation.min.css and foundation.min.js. also, make sure you include jquery before the js.
I suggest downloading a bundle from Zurb's site in this link and recieve a good and working bundle.
Foundation is a great framework so don't give up, it's totally worth it.

Qt Charts and Data Visualization widgets

I have installed Qt 5.7 in order to try Qt Charts and Qt Data Visualization but I cannot find new widgets neither in Qt Designer nor in Qt Creator. Any suggestions what should I do so new widgets appear in designer?
I was having exactly the same problem today. It looks like the QT Designer plugins of QT Charts are not part of the package by default. I ended up downloading the designer plugin sources from github https://github.com/qtproject/qtcharts/tree/5.7/plugins/designer
This consists of just 5 files.
You should then be able to open the designer.pro project in Qt Creator and compile it. Place the resulting library in your designer plugin directory. This will make the QChartsView widget appear in the Qt Designer.
Just elaborating on Holger's answer for ubuntu, compile, in terminal using qmake and make (doesn't work in qt creator - you need qt chart development package installed, which I believe is not available at this point in time), the designer.pro file in /opt/Qt/5.7/Src/qtcharts/plugins/designer directory then, copy and paste the shared library into /opt/Qt/Tools/QtCreator/lib/Qt/plugins/designer directory, where /opt/Qt is the directory in which Qt is installed.
I would like to add this as a comment to the accepted post:
If you are using python to build your project and process the .ui files with pyuic5 it might be the case that pyuic5 leaves you with an error message stating that QtChart.QChartview could not be found. This is the workaround:
Go to the site-packages/PyQt5/uic/widget-plugins directory, it should look something like this:
/widget-plugins/
__pycache__/
qaxcontainer.py
qscintilla.py
qtcharts.py <- create this file by copying qtquickwidgets.py and renaming
qtprintsupport.py
qtquickwidgets.py
qtwebkit.py
qtcharts.py looks like this (you have to edit the file):
# copyright information
pluginType = MODULE
def moduleInformation():
return "PyQt5.QtChart", ("QChartView", )
I also encountered this problem today, but Holger's way didn't work on my situation. After consulting other people via internet, I finally fixed it. And my solution is quiet simple, I just open the Maintenance Tool and choose add components, select Qt Charts and Qt Data Visualization, and click next, and then it works. This problem happens because by default Qt Charts is not selected while installing Qt, so we should add this component manually.
But I also should mention that maybe this way just work on Qt which was installed by Qt Online Installer, and if you installed Qt via offline Installer, maybe you should reinstall it.

Edit a build system in Sublime Text 3

How can I edit a build system in Sublime Text 3, whether its a native one or one I installed through Package Control? For instance, for the Sass Build package, it outputs .map files recently, so I'd like to configure it so that it stops doing that.
It seems to be different from Sublime Text 2 because those instructions don't seem to apply to what I have in my Sublime Text 3 folder.
And can I change them on a per-project basis?
Unlike Sublime Text 2, version 3 uses zipped .sublime-package files to contain both the default packages and plugins installed via Package Control. As a result, they don't all have folders within the Packages folder accessed via Preferences -> Browse Packages....
To access the files in these packages, use the PackageResourceViewer plugin. By default it adds PackageResourceViewer: Extract Package and PackageResourceViewer: Open Resource menu options to the Command Palette. Use Extract Package to completely unzip a package or plugin to the Packages directory, where its contents will override the original files in the .sublime-package archive. Use Open Resource to open a file within a package for viewing. This file can be edited, and if saved will be put in Packages/PluginName/file.name and will override the original.
While this feature is great, keep in mind that subsequent upgrades to an extracted plugin will not be applied, as the extracted files in Packages/PluginName override those in the PluginName.sublime-package archive. Monitor the Package Control messages that appear periodically in Sublime as well as your various plugins' pages on the Package Control website to see if you need to update your extracted files. The most conservative mode of action is to just extract individual files that you know you need to modify, allowing the rest of the plugin/package to be upgraded if needed.

How to configure code completion for Django based projects in PyDev?

I am playing with a simple project based on Django framework. My IDE is PyDev/Eclipse.
I cannot make code completion work for Django code, but it works fine for standard Python libraries.
I tried to add Django dir (in my case C:\Program Files\Python26\Lib\site-packages\django) to PYTHONPATH both on PyDev level (Window->Preferences->PyDev->Interpreter - Python->libraries) and on a project level (Project->Properties->PyDev - PYTHONPATH) - no luck so far.
Can you please advise what I am missing here (preferably without installing PyDev extensions).
Ok I give it another try.
Eclipse in C:\test\eclipse
Python 2.6.2 in C:\test\python-2.6.2
Django 1.0.2 final in C:\test\python-2.6.2\Lib\site-packages -> only the actual django folder not the docs, example, and so on. I did this without running setup.py as descriped in the INSTALL file.
Added C:\test\python-2.6.2 and C:\test\python-2.6.2\Lib\site-packages to the PATH variable
As described here I set the Interpreter in Eclipse by Window > preferences > pydev > Interpreter > Python. This automatically included a whole bunch of things under System libs like (C:\test\python-2.6.2\;C:\test\python-2.6.2\DLLs;C:\test\python-2.6.2\lib\site-packages;....). A whole bunch of Forced Builtins are also found.
Then I made a new "Pydev Project" added a package and there a new module with a class and a module which imports the class and calls a function from it. During writing this pressed Crtl+Space several times, and builtins as well as the new stuff from my Module where shown by code completion.
I suggest Configuring pydev to work with django and
Getting started Eclipse/Pyddev
In the latter one there is a section specifically for code completion which mentions a problem with firewall or shell timeout. And in another section he mentions problems when (as in your case) the eclipse installations has spaces in the filepath
I solved setting the PYTHONPATH too.
In the pallet Projects, right-click on the project -> properties
In the PYTHONPATH configuration you have to put the folder that contains your project as a external folder.
Exemple:
/var/www/my_project
PYTHONPATH=/var/www/