I am trying to install the CKEditor for use with Django-WYSIWYG. This is proving to be oddly difficult.
As mentioned on the site for Django-WYSIWYG, it is possible to "install" CKEditor by dropping the distribution file in the MEDIA_URL folder on one's system.
In addition, you've got to set a variable in settings, which determines Django-WYSIWYG's "flavor."
I've done both of these things. I get no errors, but the thing still wants to use YUI. I'm really dissatisfied with YUI and would much prefer CKEditor, but for some reason it won't install.
If I am missing a step, or if you have done this somehow, please let me know!
Sorry for what is probably an obvious question.
https://github.com/shaunsephton/django-ckeditor u can use it.
I was able to get this to work. It is likely that you are not setting the URL correctly in your settings file. For Django 1.3, the ckeditor files are placed in static.
Related
This is the second time i'm commenting about this problem and I really hope you can help me this time since i've gained some more information about the problem. So the problem is basically that all my Django projects doesn't update the static files (this also includes projects which I have downloaded). So I can fx still see the old styling from the css files but the changes is not displayed. When i insert the css or js directly into the html file i can see it though. I thought that it maybe had something to do with my browsers stored caches but I have tried to do a hard refresh, clearing all my caches, installing whitenoise and forced browser to reload the css file by adding an extra parameter to the end of the src tag. I have also tried python manage.py collectstatic and almost everything else on this thread.
When the problem bagan to occur I was working with the implementation of stripe. I don't neccessarily think that stripe is the problem since the problem occured hours after i had already implementet the checkout site. I just think it's worth at least mentioning.
Some of my venv packages:
Django | 3.0.3
django-bootstrap4 | 2.2.0
stripe | 2.50.0
Weird behaviour:
Yesterday when I decided to comment out the bootstrap link to see if that was somehow the problem, the changes to the css file got applied to the site. I tried to do that several times and that seemed to be the problem but that only worked for like an hour. Now I cant apply any changes to the sites whatsoever.
My first post:
If you want to see my first post about the problem, you can check it out here. Keep in mind that the problem is not only happening to my Django projects but also the projects which i've downloaded.
I have no idea whats happening and I would very much appreciate your help. If you need any more information please just ask.
Edit:
I created a new folder and css/js file and it kind of worked. I believe the reason it worked was bcs whenever you create a new css/js file, Django needs to atleast load the content of the file once. But whenever I wanted to make other changes it suddenly didn't work again. In my file i had two links to css files. This should usually not be a problem, but apparently it was for me. I deleted one css link and It suddenly worked fine again. If anyone knows why this happened pls tell me, i'm all ears.
Assume you did everything correctly! I once faced this problem too and I fixed it by changed the directory name inside static folder to the same name as my app name. static/css/style.css change to static/app_name/style.css. Also don't forget to refresh the browser (ctrl + r or cmd + r). Hope this would help.
I'm using the django registration app in my django site. And now I want to add more custom code. I think it would be better if I can modify directly to the original code of the django registration app.
How can I do that?
Should I just download the source code of the django registration app and then put into my project folder. From my understanding, it will check the files right under my project folder first before checking similar files under DJANGO_HOME\contrib.
Is it right?
Ideally, you should not modify the source unless you want to push the changes back to the original source.
Just create a new app and extend/override/copy whatever methods that are custom for your project.
The reason for this is that if django-registration updates their code, you're gonna run into maintenance overhead. If it's separate, you can still update it with pip (you are using virtualenv right?), and then all you need to change are your custom methods and classes.
Yes, you can simply place it in your project folder, and modify it to work as you wish. You can also remove the installed one since you will no longer need it in this case.
Do remember to included it in your INSTALLED_APPS in your settings file.
Disclaimer: generally, it is considered bad to edit source code of installed apps. Another application on the same host would not be aware of your changes (btw, take a look at virtualenv). You can forget you've changed somehting and get unexpected behavior. You will not track changes. Ie, it's too easy to break something. If you want to change an existing app, copy it to your project dir and then change.
From your other question, it looks you're asking about django-registration from ubernostrum. This app supports custom backends and events that would be probably enough for you.
In my django project, I finally made django-css working, but however, if I do
#import "compass"
Then the css would break, an emapty css file is generated.
And I have not find any documentation in django-css that says it is able to use with compass. But since it is a fork from django-compressor what has a way to deal with compass style.
So I am wondering here, can I use django-css with compass? If yes, please provide a little tips or hints to use it properly.
Thanks very much.
The recommended way is to not do so.
The Official Compass Website says develop the CSS on the development machine and commit the CSS to source control, then treat it just as CSS once it's committed and give it to django-css.
this is probably a really dumb question but im struggling to integrate it. im playing with a reusable app called brookie that uses wmd-editor.
in the install instructions it states to "Link admin_wmdeditor/media/admin-wmdeditor in your MEDIA_ROOT as admin-wmdeditor"
im assuming this is a symlink?
I've tried to create a symlink to point at the wmd folder in lib/python2.6/site-packages/wmd but i don't think it worked. i say that, as i cant see any symlink created in my folder.
so 1st question, is there a simple way to list symlinks so i can see if i've really created one? i know this is a noob question, im not a mac genius. i also know this should be covered by a quick google but do me a favour and do it, i can only find noise.
if anyone has some slightly more explicit instructions other than the ones on django-adminwmd_editors github page i'd love to see them. i can normally work this stuff out, but i've got an hour in just trying to hook this stuff up and its a wind up.
I'm not a Mac crack, but usually (on Linux) you can see a symlink, when you list the directory content.
I've played around with the brookie app some time ago and if I remember it right I have had some trouble with wmd also, after researching stackoverflow I changed to Markitup, which works fine.
Have a look here: WMD in Django Admin?
in the end i just commented out the lines referring to wmd and removed the class reference to it, forced it back to a std modeladmin.
will be adding tiny mce in if it needs it, nice n simple. not sure why this single text box needed something as complicated as wmdeditor.
For school, I have made a CMS in django for my major assessment task for Software. My teacher has asked to get the source code and, if applicable, the program compiled.
Now, because i dont want my teacher to install django (Something might go wrong, he may get a different version, missing dependences), how can i package up my django app, plus the django source and make the whole thing runnable (on the development server) by running a single script?
He has python, so that does not need to be included and the target OS would be OS X, but Windows can do as well.
Pip and VirtualENV will make this task much easier. (not sure the support for windows though)
PIP will help with the requirements installation.
http://pypi.python.org/pypi/pip
VirtualENV provides an isolated python environment.
URL: http://pypi.python.org/pypi/virtualenv
Reading through this blog post on installing Pinax will give you a good understanding on how the two work together: http://uswaretech.com/blog/2009/03/create-a-new-social-networking-site-in-few-hours-using-pinax-platform-django/
Perhaps Instant Django will set you in the right direction. It's for windows, but it might be of help.
Without having actually tested it, you should be able to copy the main django directory (/usr/lib/python2.6/site-packages/django for me) over into your project directory, and archive the whole thing. This will continue to keep everything importable (from django import ...), and make it so there's just one archive to extract.
Now, I wouldn't say this is a good way, but it's simple, and I think it'll work. I think.
I belive this is what your looking for (it's not pretty but it gets the job done).
It describes how to package django, a web server, and everything else needed to make a stand alone django application. To make it work for osx you should just be able to substitue py2app (http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html) instead of py2exe and it should (cross your fingers) work, however I have not tested it. Hope this helps!
Ps: sorry for not hyperlinking py2app im a new user and cant post 2 links yet :(