Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Nicedit widget for django with image upload feature.

Project Description

NicEdit widget for django with image upload feature.

NicEdit home:

Blog post: NicEdit widget for Django


0.23 - use with Django<1.6

0.24 - use with Django==1.6

1.1 - use with Django>=1.7


To get the latest stable release from PyPi

$ pip install django-nicedit

To get the latest commit from GitHub

$ pip install -e git+git://

Add nicedit to your INSTALLED_APPS


Add the nicedit URLs to your

urlpatterns = patterns('',
    url(r'^nicedit/', include('nicedit.urls')),

Don’t forget to migrate your database

python migrate nicedit

MEDIA_ROOT should be specified, example:

MEDIA_ROOT = os.path.join(os.path.dirname('__file__'), '../media')
MEDIA_URL = '/media/'

Add to urls configuration:

from django.conf.urls.static import static
from django.conf import settings

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)


from django import forms

from nicedit.widgets import NicEditWidget

class MessageForm(forms.Form):
    message = forms.CharField(
        widget=NicEditWidget(attrs={'style': 'width: 800px;'})

from django.shortcuts import render

from .forms import MessageForm

def home(request):
    form = MessageForm()
    return render(request, 'home.html', {'form': form})


<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    <title>NicEdit widget</title>
    {{ }}
    <form action='.' method='post'>
      {% csrf_token %}
      {{ form.message }}
      <button type="submit">Submit</button>

See testproject for example.

Usage in admin:

# -*- coding: utf-8 -*-
from django import forms
from django.contrib import admin

from nicedit.widgets import NicEditAdminWidget

from .models import Item

class ItemAdminForm(forms.ModelForm):

    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']

class ItemAdmin(admin.ModelAdmin):

    form = ItemAdminForm


If you want to contribute to this project, please perform the following steps

# Fork this repository
# Clone your fork
$ virtualenv .env --no-site-packages
$ source .env/bin/activate
$ python install
$ pip install -r test_requirements.txt

$ git co -b feature_branch master
# Implement your feature and tests
$ git add . && git commit
$ git push -u origin feature_branch
# Send us a pull request for your feature branch

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(34.4 kB) Copy SHA256 Hash SHA256
Source None May 26, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Google Google Cloud Servers Fastly Fastly CDN StatusPage StatusPage Statuspage DigiCert DigiCert EV Certificate