
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
django-imperavi-widget
Advanced tools
A django admin widget to render a text field as beautiful Imperavi WYSIWYG editor http://redactorjs.com/
Supports Django >=1.8 and Python 2/3
pip install git+https://github.com/dzaytsev91/django-imperavi-widget.git
Add imperavi
to your INSTALLED_APPS
setting.
Add imperavi URL include to your project's urls.py
file::
url(r'^imperavi/', include('imperavi.urls')),
cd example/
python manage.py migrate
./manage.py shell -c "from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'admin@example.com', 'admin')"
python manage.py runserver
Then go to http://127.0.0.1:8000/admin/ and try to create post instance
login: admin password: admin
The quickest way to add rich text editing capabilities to your admin is to use the included ImperaviAdmin
class. For example::
from .models import Category
from imperavi.admin import ImperaviAdmin
class CategotyAdmin(ImperaviAdmin):
pass
admin.site.register(Category, CategotyAdmin)
If you want to use it with inline admin models you need to use ImperaviStackedInlineAdmin
class::
from .models import Post
from imperavi.admin import ImperaviStackedInlineAdmin
class PostInline(ImperaviStackedInlineAdmin):
model = Post
extra = 1
Add a IMPERAVI_CUSTOM_SETTINGS
variable to your settings.py
with custom config::
IMPERAVI_CUSTOM_SETTINGS = {
'resize': true
}
Full list of settings is here. http://redactorjs.com/docs/settings/
You can also customize the URL that django-imperavi-widget will look for the Editor media at by adding IMPERAVI_UPLOAD_PATH
to your settings.py
file like this::
IMPERAVI_UPLOAD_PATH = 'imperavi-uploads/'
The default value is 'imperavi/'
.
If you want to serve unique media content for specific model you can add unique_media = True
to your admin class::
from .models import Category
from imperavi.admin import ImperaviAdmin
class CategotyAdmin(ImperaviAdmin):
unique_media = True
admin.site.register(Category, CategotyAdmin)
FAQs
A django admin widget to render a text field as beautiful Imperavi WYSIWYG editor http://redactorjs.com/
We found that django-imperavi-widget 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.