![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
http://github.com/TigorC/django-redactorjs
django-redactorjs is a reusable application for Django, using WYSIWYG editor http://redactorjs.com/
Django >= 1.3
# for static filesPillow
or PIL
# for image uploadpip install django-redactorjs
Add 'redactor'
to INSTALLED_APPS.
Add url(r'^redactor/', include('redactor.urls'))
, to urls.py
Add default config in settings.py (more settings see: http://imperavi.com/redactor/docs/settings/):
REDACTOR_OPTIONS = {'lang': 'ru'}
REDACTOR_UPLOAD = 'uploads/'
Config for redactor static
REDACTOR_CSS = {
'all': (
'imperavi/css/redactor.css',)
}
REDACTOR_JS = [
'http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js',
'imperavi/js/redactor.js',
'imperavi/js/ru.js',
]
You can also specify a function to modify the filename of uploaded files (for example to ensure the filename is unique).
import uuid
def make_unique_filename(filename):
ext = filename.split('.')[-1]
return "%s.%s" % (uuid.uuid4(), ext)
REDACTOR_GENERATE_FILENAME = make_unique_filename
from django.db import models
from redactor.fields import RedactorField
class Entry(models.Model):
title = models.CharField(max_length=250, verbose_name=u'Заголовок')
short_text = RedactorField(verbose_name=u'Краткий текст')
or use custom parametrs:
short_text = RedactorField(verbose_name=u'Краткий текст',
redactor_options={'lang': 'ru', 'focus': 'true'},
upload_to='tmp/')
from django import forms
from redactor.widgets import RedactorEditor
from blog.models import Entry
class EntryAdminForm(forms.ModelForm):
class Meta:
model = Entry
widgets = {
'short_text': RedactorEditor(),
}
class EntryAdmin(admin.ModelAdmin):
form = EntryAdminForm
RedactorEditor
takes the same parameters as RedactorField
FAQs
This reusable Django app using WYSIWYG editor redactorjs.com
We found that django-redactorjs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.