diff --git a/.gitignore b/.gitignore index b1f19c0..c7dd093 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ db.sqlite3 dist/ app_media/ .env +venv +.idea \ No newline at end of file diff --git a/AUTHORS b/AUTHORS index 4d5a420..6cff3b5 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,9 +1,8 @@ -Current or previous core committers +Contributors (in alphabetical order): -Oleksandr Polyeno (polyenoom@gmail.com) -Yaroslav Klyuyev (imposeren@gmail.com) Alex Vykalyuk (alekzvik@gmail.com) - -Contributors (in alphabetical order) +Oleksandr Polieno (polyenoom@gmail.com) +Saurabh Kumar (saurabh@saurabh-kumar.com) +Yaroslav Klyuyev (imposeren@gmail.com) * Your name could stand here :) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 15e052d..57566ff 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -9,3 +9,9 @@ - niceEdit options can now be set in widget init method - added example of admin widget usage - updated js code + +==== 0.24 === + +- docs improvements +- support for django 1.6 +- updated AUTHORS \ No newline at end of file diff --git a/README.rst b/README.rst index 9f44ff1..e87bb01 100644 --- a/README.rst +++ b/README.rst @@ -5,7 +5,12 @@ NicEdit widget for django with image upload feature. NicEdit home: `http://nicedit.com/ `__ -Blog post: `http://nanvel.com/b/1377388800 `__ +Blog post: `NicEdit widget for Django `__ + +Versions +-------- + +0.24 - use with Django==1.6 Installation ------------ @@ -27,8 +32,7 @@ Add ``nicedit`` to your ``INSTALLED_APPS`` .. code-block:: python INSTALLED_APPS = ( - ..., - 'south', + ... 'nicedit', ) @@ -78,7 +82,8 @@ forms.py: class MessageForm(forms.Form): message = forms.CharField( - widget=NicEditWidget(attrs={'style': 'width: 800px;'})) + widget=NicEditWidget(attrs={'style': 'width: 800px;'}) + ) views.py: @@ -99,18 +104,18 @@ template: - - - NicEdit widget - {{ form.media }} - - -
- {% csrf_token %} - {{ form.message }} - -
- + + + NicEdit widget + {{ form.media }} + + +
+ {% csrf_token %} + {{ form.message }} + +
+ @@ -120,33 +125,35 @@ Usage in admin: .. code-block:: python - # -*- coding: utf-8 -*- + # -*- coding: utf-8 -*- from django import forms - from django.contrib import admin + from django.contrib import admin + + from nicedit.widgets import NicEditAdminWidget - from nicedit.widgets import NicEditAdminWidget + from .models import Item - from .models import Item - class ItemAdminForm(forms.ModelForm): + class ItemAdminForm(forms.ModelForm): - class Meta: - model = Item - widgets = { + class Meta: + model = Item + widgets = { 'text': NicEditAdminWidget( attrs={'style': 'width: 610px;'}, js_options={"buttonList": [ 'save', 'bold', 'italic', 'underline', 'left', 'center', 'right', 'justify', 'ol', 'ul', 'fontSize', # 'fontFamily', 'fontFormat', 'indent', 'outdent', 'image', 'upload', 'link', - 'unlink', 'forecolor', 'bgcolor', 'xhtml']} - ), + 'unlink', 'forecolor', 'bgcolor', 'xhtml'] + } + ) } - class ItemAdmin(admin.ModelAdmin): + class ItemAdmin(admin.ModelAdmin): - form = ItemAdminForm + form = ItemAdminForm Contribute diff --git a/nicedit/__init__.py b/nicedit/__init__.py index 31e65f4..4db7e82 100644 --- a/nicedit/__init__.py +++ b/nicedit/__init__.py @@ -1,2 +1,2 @@ # -*- coding: utf-8 -*- -__version__ = '0.23' +__version__ = '0.24' diff --git a/test_requirements.txt b/test_requirements.txt index 3cfd160..af65fc1 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -1,3 +1,3 @@ -Django>=1.4,<1.6 +Django>=1.4,<1.7 South Pillow diff --git a/testproject/requirements.txt b/testproject/requirements.txt index 645d735..a9b5da4 100644 --- a/testproject/requirements.txt +++ b/testproject/requirements.txt @@ -1,3 +1,3 @@ -Django +Django==1.6 South PIL \ No newline at end of file