Permalink
Browse files

bump for 0.5.0

  • Loading branch information...
pydanny committed Oct 21, 2012
1 parent 7d7e6fb commit b766427916f5746e431f83530a4af7f9a7ff1f48
Showing with 35 additions and 159 deletions.
  1. +1 −1 LICENSE.txt
  2. +12 −0 django_wysiwyg/__init__.py
  3. +2 −2 docs/conf.py
  4. +20 −156 setup.py
View
@@ -1,4 +1,4 @@
-Copyright (c) 2008-2011 Daniel Greenfeld, Chris Adams and contributors.
+Copyright (c) 2008-2012 Daniel Greenfeld, Chris Adams and contributors.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
View
@@ -1,3 +1,15 @@
+__author__ = 'Daniel Greenfeld, Chris Adams'
+
+VERSION = (0, 5, 0)
+
+def get_version():
+ version = '%s.%s' % (VERSION[0], VERSION[1])
+ if VERSION[2]:
+ version = '%s.%s' % (version, VERSION[2])
+ return version
+
+__version__ = get_version()
+
def clean_html():
raise ImportError("clean_html requires html5lib or pytidylib")
View
@@ -48,9 +48,9 @@
# built documents.
#
# The short X.Y version.
-version = '0.4.0'
+version = '0.5.0'
# The full version, including alpha/beta/rc tags.
-release = '0.4.0'
+release = '0.5.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
View
176 setup.py
@@ -1,171 +1,35 @@
from setuptools import setup, find_packages
-version = '0.4.1'
+import django_wysiwyg
-LONG_DESCRIPTION = """
-DJANGO WYSIWYG
-==================
-
-.. contents:: Table of Contents
-
-A Django application for easily converting HTML <textarea>s into rich HTML
-editors that meet US Government 508/WAC standards. This application has been
-demonstrated to work just fine with django-uni-form
-(http://github.com/pydanny/django-uni-form).
-
-Currently this works as a template tag. We did it this way because control of
-how editing works is arguably a template issue (i.e. presentation) and not a
-forms/model issue (i.e. control).
-
-YUI is the default editor due to familiarity, accessiblity and the fact that
-it's possible to run with entirely off of Yahoo's CDN, avoiding the need to
-maintain any local resources. CKEditor can be used but will require you to
-install the CKEditor files in STATIC_URL/ckeditor (see below).
-
-If you want to contribute to django-wysiwyg, please do so from the repository
-at http://github.com/pydanny/django-wysiwyg.
-
-**Note**: This may be obvious, but this only works on ``<textarea>`` (models.TextField) and not simple character ( ``<input>`` ) fields.
-
-Installation
-~~~~~~~~~~~~~~~~
-
-Via pip::
-
- pip install django-wysiwyg
-
-Configuration
-~~~~~~~~~~~~~~
-
-Add `'django_wysiwyg'` to your `INSTALLED_APPS` in `settings.py`::
-
- INSTALLED_APPS = (
- ...
- 'django_wysiwyg',
- )
-
-If you wish to use CKEditor set the flavor in `settings.py`::
-
- DJANGO_WYSIWYG_FLAVOR = "ckeditor"
-
-Please note that doing so requires you to either place the ckeditor
-distributables under `STATIC_URL/ckeditor` or set `DJANGO_WYSIWYG_MEDIA_URL`
-in `settings.py` to the appropriate location containing the ckeditor
-distribution.
-
-Usage
-~~~~~~
-
-Within your pages
------------------
-
-There are two template tags: ``wysiwyg_setup`` must be called once per page,
-preferably in the <head>, to load the JavaScript dependencies.
-``wysiwyg_editor`` should be called once per text area, after the text area has
-been created. A simple example::
-
- {% load wysiwyg %}
- {% wysiwyg_setup %}
-
- <textarea id="foo"></textarea>
-
- {% wysiwyg_editor "foo" %}
-
-Within Django Admin
--------------------
-
-django-wysiwyg comes with a custom file that serves as a base template for
-alterations to admin displays. To make an admin field display rich text, do
-the following:
-
-#. In your custom app's admin.py file, on the MyModelAdmin class, add
- ``change_form_template = 'my-app-name/admin/change_form.html'``. For example::
-
- from django.contrib import admin
- from fun.models import Playground
-
- class PlaygroundAdmin(admin.ModelAdmin):
- change_form_template = 'fun/admin/change_form.html'
-
- admin.site.register(admin, PlaygroundAdmin)
-
-#. copy ``django_wysiwyg/templates/my-app-name/admin/change_form.html`` to ``my_app/templates/<my-app-name>/adminchange_form.html``. For example::
-
- cp django_wysiwyg/templates/admin/my-app-name/change_form.html pydanny/templates/fun/admin/change_form.html
-
-#. Now open the new ``pydanny/templates/my-app-name/admin/change_form.html`` file. You
- will need to set the fields you want made into rich text editors by adding
- {% wysiwyg_editor "id_description" %} template tag calls, replacing
- "id_description" with whatever your form's HTML field is named. For
- example::
-
- {% extends "admin/change_form.html" %}
-
- {% load wysiwyg %}
-
- {% block extrahead %}
- {{ block.super }}
- {% wysiwyg_setup %}
- {% endblock %}
-
- {% block content %}
- {{ block.super }}
- {% wysiwyg_editor "id_description" %}
- {% endblock %}
-
-----
-
-Handling Content
-~~~~~~~~~~~~~~~~
-
-Cleaning HTML
--------------
-
-django_wysiwyg.clean_html will be exported if you have either html5lib
-(http://code.google.com/p/html5lib/) or pytidylib installed. Both should
-install with pip or easy_install, although the later will require having the
-htmltidy C library installed.
-
-Using clean_html in views is simple::
-
- data = django_wysiwyg.clean_html(data)
-
-To display raw HTML
--------------------
-
-In your templates::
-
- {% autoescape off %}
- {{ content }}
- {% endautoescape %}
-
-or::
-
- {{ content|safe }}
-
-*This should not be used without careful consideration if your content comes
-from untrusted users*
-
-`clean_html` does not protect against security problems; `sanitize_html`
-attempts to do so but is only available with html5lib (tidylib has no
-equivalent mode) and should currently be considered experimental.
-
-
-"""
+LONG_DESCRIPTION = open('README.rst').read()
setup(
name='django-wysiwyg',
- version=version,
+ version=django_wysiwyg.get_version(),
description="django-wysiwyg",
long_description=LONG_DESCRIPTION,
classifiers=[
+ "Development Status :: 4 - Beta",
+ "Environment :: Web Environment",
+ "Framework :: Django",
+ "License :: OSI Approved :: MIT License",
+ "Operating System :: OS Independent",
+ "Programming Language :: JavaScript",
"Programming Language :: Python",
+ "Programming Language :: Python :: 2.6",
+ "Programming Language :: Python :: 2.7",
+ "Topic :: Internet :: WWW/HTTP :: Browsers",
+ "Topic :: Internet :: WWW/HTTP :: Site Management",
+ "Topic :: Office/Business :: Office Suites",
"Topic :: Software Development :: Libraries :: Python Modules",
- "Framework :: Django",
- "Environment :: Web Environment",
+ "Topic :: Software Development :: User Interfaces",
+ "Topic :: Text Editors :: Word Processors",
+ "Topic :: Text Processing :: Fonts",
+ "Topic :: Text Processing :: Markup :: HTML"
],
- keywords='django',
- author='Daniel Greenfeld, Chris Adams',
+ keywords='django,wysiwyg,redactor,ckeditor,',
+ author=django_wysiwyg.__author__,
author_email='pydanny@gmail.com',
url='https://github.com/pydanny/django-wysiwyg',
license='MIT',

0 comments on commit b766427

Please sign in to comment.