additional readme conversion, converted setext-style headers to atx-style for better nesting

This commit is contained in:
Peter Novotnak 2014-11-07 10:45:03 -08:00
parent 1f487741c7
commit c23e4449cf
2 changed files with 22 additions and 24 deletions

View File

@ -1,8 +1,7 @@
Installation Guide # Installation Guide
------------------
## Required
Required
~~~~~~~~
1. Install or add django-ckeditor to your python path. 1. Install or add django-ckeditor to your python path.
2. Add ``ckeditor`` to your ``INSTALLED_APPS`` setting. 2. Add ``ckeditor`` to your ``INSTALLED_APPS`` setting.
@ -34,8 +33,8 @@ Required
CKEDITOR_JQUERY_URL = '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js' CKEDITOR_JQUERY_URL = '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'
Optional ## Optional
~~~~~~~~
1. All uploaded files are slugified by defaults, to disable this feature set ``CKEDITOR_UPLOAD_SLUGIFY_FILENAME`` to ``False`` 1. All uploaded files are slugified by defaults, to disable this feature set ``CKEDITOR_UPLOAD_SLUGIFY_FILENAME`` to ``False``
2. Set the CKEDITOR_RESTRICT_BY_USER setting to ``True`` in the project's ``settings.py`` file (default ``False``). This restricts access to uploaded images to the uploading user (e.g. each user only sees and uploads their own images). Superusers can still see all images. **NOTE**: This restriction is only enforced within the CKEditor media browser. 2. Set the CKEDITOR_RESTRICT_BY_USER setting to ``True`` in the project's ``settings.py`` file (default ``False``). This restricts access to uploaded images to the uploading user (e.g. each user only sees and uploads their own images). Superusers can still see all images. **NOTE**: This restriction is only enforced within the CKEditor media browser.

View File

@ -1,8 +1,7 @@
Usage Guide # Usage Guide
-----------
## Field
Field
~~~~~
The quickest way to add rich text editing capabilities to your models is to use the included ``RichTextField`` model field type. A CKEditor widget is rendered as the form field but in all other regards the field behaves as the standard Django ``TextField``. For example:: The quickest way to add rich text editing capabilities to your models is to use the included ``RichTextField`` model field type. A CKEditor widget is rendered as the form field but in all other regards the field behaves as the standard Django ``TextField``. For example::
from django.db import models from django.db import models
@ -12,8 +11,8 @@ The quickest way to add rich text editing capabilities to your models is to use
content = RichTextField() content = RichTextField()
Widget ## Widget
~~~~~~
Alernatively you can use the included ``CKEditorWidget`` as the widget for a formfield. For example:: Alernatively you can use the included ``CKEditorWidget`` as the widget for a formfield. For example::
from django import forms from django import forms
@ -43,21 +42,21 @@ Note that when using outside of admin panel you will have to make sure all form
Management Commands ## Management Commands
~~~~~~~~~~~~~~~~~~~
Included is a management command to create thumbnails for images already contained in ``CKEDITOR_UPLOAD_PATH``. This is useful to create thumbnails when starting to use django-ckeditor with existing images. Issue the command as follows:: Included is a management command to create thumbnails for images already contained in ``CKEDITOR_UPLOAD_PATH``. This is useful to create thumbnails when starting to use django-ckeditor with existing images. Issue the command as follows::
$ ./manage.py generateckeditorthumbnails $ ./manage.py generateckeditorthumbnails
**NOTE**: If you're using custom views remember to include ckeditor.js in your form's media either through ``{{ form.media }}`` or through a ``<script>`` tag. Admin will do this for you automatically. See `Django's Form Media docs <http://docs.djangoproject.com/en/dev/topics/forms/media/>`_ for more info. **NOTE**: If you're using custom views remember to include ckeditor.js in your form's media either through ``{{ form.media }}`` or through a ``<script>`` tag. Admin will do this for you automatically. See `Django's Form Media docs <http://docs.djangoproject.com/en/dev/topics/forms/media/>`_ for more info.
Using S3 ## Using S3
~~~~~~~~
See http://django-storages.readthedocs.org/en/latest/ See http://django-storages.readthedocs.org/en/latest/
If you want to use allowedContent ## If you want to use allowedContent
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To allowedContent works, disable **stylesheetparser** plugin. To allowedContent works, disable **stylesheetparser** plugin.
So included this on your settings.py.:: So included this on your settings.py.::
@ -68,8 +67,8 @@ So included this on your settings.py.::
} }
Demo / Test application ## Demo / Test application
~~~~~~~~~~~~~~~~~~~~~~~
If you clone the repository you will be able to run the ``ckeditor_demo`` application. If you clone the repository you will be able to run the ``ckeditor_demo`` application.
1. ``pip install -r ckeditor_demo_requirements.txt`` 1. ``pip install -r ckeditor_demo_requirements.txt``
@ -84,12 +83,12 @@ There is a forms.Form on main page (/) and a model in admin that uses the widget
Database is set to sqlite3 and STATIC/MEDIA_ROOT to folders in temporary directory. Database is set to sqlite3 and STATIC/MEDIA_ROOT to folders in temporary directory.
Running selenium test ### Running selenium test
~~~~~~~~~~~~~~~~~~~~~
You can run the test with ``python manage.py test ckeditor_demo`` (for repo checkout only) or with ``tox`` which is configured to run with Python 2.7 and 3.3. You can run the test with ``python manage.py test ckeditor_demo`` (for repo checkout only) or with ``tox`` which is configured to run with Python 2.7 and 3.3.
(You may have to fix some imports in selenium webdriver for Python 3.3). (You may have to fix some imports in selenium webdriver for Python 3.3).
Versioning ## Versioning
~~~~~~~~~~
First two numbers resemble ckeditor version used in the package. The third is used to issue releases for given ckeditor bundle (fixes, new features) First two numbers resemble ckeditor version used in the package. The third is used to issue releases for given ckeditor bundle (fixes, new features)