Permalink
Browse files

updating license, setup, readme and adding support for themes

  • Loading branch information...
1 parent cffc2d7 commit 896ac36b4341804b1fd3a5a5a935a55784b316cf @barraq committed Feb 22, 2013
Showing with 165 additions and 95 deletions.
  1. +2 −0 CHANGES
  2. +50 −0 LICENSE
  3. +0 −24 LICENSE.txt
  4. +0 −66 README.md
  5. +99 −0 README.rst
  6. +14 −5 setup.py
View
@@ -0,0 +1,2 @@
+v0.2.0, 21/02/2013 -- Initial release.
+v0.2.1, 22/02/2013 -- Adding themes support and bugs fix
View
50 LICENSE
@@ -0,0 +1,50 @@
+django-epiceditor
+-----------------
+
+Copyright (c) Remi Barraquand
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+3. Neither the name of FileBrowser nor the names of its contributors may be used
+to endorse or promote products derived from this software without specific prior
+written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+django-epiceditor contains code from epiceditor
+-----------------------------------------------
+
+Copyright (c) 2011-2013, Oscar Godson (http://oscargodson.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
@@ -1,24 +0,0 @@
-Copyright (c) 2012, Remi Barraquand
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of the authors nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
@@ -1,66 +0,0 @@
-django-epiceditor
-=================
-
-A django app that allows the easy addition of [EpicEditor](http://oscargodson.github.com/EpicEditor/) markdown editor to a django form field, whether in a custom app or the Django Admin.
-
-
----
-
-## Preview
-
-Here are a few screenshots of EpicEditor within django.
-
-### Edition mode
-
-![Screenshot of Django Admin with EpicEditor initialised](https://raw.github.com/barraq/django-epiceditor/master/editor.png "A screenshot of EpicEditor edition mode in Django's admin")
-
-### Fullscreen mode
-
-![Screenshot of Django Admin with EpicEditor initialised](https://raw.github.com/barraq/django-epiceditor/master/fullscreen.png "A screenshot of EpicEditor fullscree mode in Django's admin")
-
-
-## Installation
-
-- Install via pip: `pip install -e https://github.com/barraq/django-epiceditor.git#egg=django-epiceditor` for the latest version, otherwise 'pip install django-epiceditor'
-- Add `epiceditor` to your `INSTALLED_APPS`
-
-Note that this package will install a cloned copy of the EpicEditor library from [https://github.com/OscarGodson/EpicEditor](https://github.com/OscarGodson/EpicEditor)
-
-
-## Usage ##
-
-If you want to use the EpicEditor editor in a django admin field, there are numerous possible approaches:
-
-To use it in **all** `TextField`'s in you admin form:
-
- from django.db import models
- from epiceditor.widgets import AdminEpicEditorWidget
-
- class FooModelAdmin(models.ModelAdmin):
- formfield_overrides = {
- models.TextField: {'widget': AdminEpicEditorWidget },
- }
-
-Alternatively, to only use it on particular fields, first create a form (in `forms.py`):
-
- from django import forms
- from models import FooModel
- from epiceditor.widgets import AdminEpicEditorWidget
- class FooModelForm(forms.ModelForm):
- a_text_field = forms.CharField(widget=AdminEpicEditorWidget())
- another_text_field = forms.CharField(widget=AdminEpicEditorWidget())
-
- class Meta:
- model = FooModel
-
-and in your `admin.py`:
-
- from forms import FooModelForm
-
- class FooModelAdmin(models.ModelAdmin):
- form = FooModelForm
-
-
-## Notes ##
-
-This plugin was develop by taking inspiration from [django-pagedown](https://github.com/timmyomahony/django-pagedown) and is using the great [EpicEditor](https://github.com/OscarGodson/EpicEditor).
View
@@ -0,0 +1,99 @@
+django-epiceditor
+=================
+
+A django app that allows the easy addition of EpicEditor_ markdown editor to a django form field, whether in a custom app or the Django Admin.
+
+.. _EpicEditor: http://oscargodson.github.com/EpicEditor/
+
+Preview
+-------
+
+Here are a few screenshots of EpicEditor within django.
+
+Standard edition mode
+~~~~~~~~~~~~~~~~~~~~~
+
+.. image:: https://raw.github.com/barraq/django-epiceditor/master/editor.png
+ :alt: A screenshot of EpicEditor standard edition mode in Django's admin
+
+Fullscreen edition mode mode
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. image:: https://raw.github.com/barraq/django-epiceditor/master/fullscreen.png
+ :alt: A screenshot of EpicEditor fullscree mode in Django's admin")
+
+
+Installation
+------------
+
+- Install via pip: `pip install -e https://github.com/barraq/django-epiceditor.git#egg=django-epiceditor` for the latest version, otherwise 'pip install django-epiceditor'
+- Add `epiceditor` to your `INSTALLED_APPS`
+
+.. note:: This package will install a cloned copy of the EpicEditor_ library from https://github.com/OscarGodson/EpicEditor
+
+
+Usage
+-----
+
+If you want to use the EpicEditor editor in a django admin field, there are numerous possible approaches:
+
+To use it in **all** `TextField`'s in you admin form:
+
+.. code:: python
+
+ from django.db import models
+ from epiceditor.widgets import AdminEpicEditorWidget
+
+ class FooModelAdmin(models.ModelAdmin):
+ formfield_overrides = {
+ models.TextField: {'widget': AdminEpicEditorWidget },
+ }
+
+Alternatively, to only use it on particular fields, first create a form (in `forms.py`):
+
+.. code:: python
+
+ from django import forms
+ from models import FooModel
+ from epiceditor.widgets import AdminEpicEditorWidget
+ class FooModelForm(forms.ModelForm):
+ a_text_field = forms.CharField(widget=AdminEpicEditorWidget())
+ another_text_field = forms.CharField(widget=AdminEpicEditorWidget())
+
+ class Meta:
+ model = FooModel
+
+and in your `admin.py`:
+
+.. code:: python
+
+ from forms import FooModelForm
+
+ class FooModelAdmin(models.ModelAdmin):
+ form = FooModelForm
+
+Themes
+~~~~~~
+
+EpicEditor_ comes with different themes. In order to change the default themes EpicEditorWidget
+allows you to pass *themes* parameters. For instance if you want to use the light theme for the editor do as
+follow:
+
+.. code:: python
+
+ from django import forms
+ from models import FooModel
+ from epiceditor.widgets import AdminEpicEditorWidget
+ class FooModelForm(forms.ModelForm):
+ a_text_field = forms.CharField(widget=AdminEpicEditorWidget(themes={'editor':'epic-light.css'}))
+ another_text_field = forms.CharField(widget=AdminEpicEditorWidget())
+
+ class Meta:
+ model = FooModel
+
+Notes
+-----
+
+This plugin was develop by taking inspiration from django-pagedown_ and is using the great EpicEditor_.
+
+.. _django-pagedown: https://github.com/timmyomahony/django-pagedown
View
@@ -36,12 +36,21 @@ def run(self):
author_email = "dev@remibarraquand.com",
url = "https://github.com/barraq/django-epiceditor",
description = ("A django app that allows the easy addition of EpicEditor markdown editor to a django form field, whether in a custom app or the Django Admin."),
- long_description=open('README.md').read(),
- packages=['epiceditor'],
- include_package_data=True,
- install_requires=[
+ long_description = open('README.rst').read(),
+ packages = ['epiceditor'],
+ include_package_data = True,
+ install_requires = [
"Django >= 1.3",
],
- license='LICENSE.txt',
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Web Environment',
+ 'Framework :: Django',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: BSD License',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python',
+ ],
+ license='LICENSE',
cmdclass={"build": build_with_submodules, "develop": develop_with_submodules},
)

0 comments on commit 896ac36

Please sign in to comment.