Merge pull request #196 from Visgean/patch-2

Loading form media section
This commit is contained in:
Piotr Maliński 2015-06-06 09:40:41 +02:00
commit bb3588312a
1 changed files with 10 additions and 1 deletions

View File

@ -136,7 +136,10 @@ Alernatively you can use the included ``CKEditorWidget`` as the widget for a for
admin.site.register(Post, PostAdmin)
Note that when using outside of admin panel you will have to make sure all form media is present for the editor to work. You may have to render the media like so::
Outside of django admin
~~~~~~~~~~~~~~~~~~~~~~~
When you are rendering form outside of admin panel you will have to make sure that all form media is present for the editor to work. One of the way how to achieve this is following::
<form>
{{ myform.media }}
@ -144,6 +147,12 @@ Note that when using outside of admin panel you will have to make sure all form
<input type="submit"/>
</form>
or you can load the media manually at it is done in demo app::
{% load staticfiles %}
<script type="text/javascript" src="{% static "ckeditor/ckeditor/ckeditor.js" %}"></script>
<script type="text/javascript" src="{% static "ckeditor/ckeditor-init.js" %}"></script>
Management Commands