
Security News
The Nightmare Before Deployment
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.
django-ace-widget
Advanced tools
Django admin widget using ACE editor for TextField.
pip install django-ace-widget
app/admin.py
from django.db import models
from django.contrib import admin
from django_ace_widget.widgets import ace_widget
from .models import Page
from .models import Block
class BlockInline(admin.TabularInline):
model = Block
extra = 0
formfield_overrides = {
models.TextField: {
# inline模式下,使用100%显示不友好,请使用px指定宽度。
"widget": ace_widget("java", width="800px"),
},
}
class PageAdmin(admin.ModelAdmin):
list_display = ["title"]
formfield_overrides = {
models.TextField: {
"widget": ace_widget("python"),
},
}
inlines = [
BlockInline,
]
admin.site.register(Page, PageAdmin)
def ace_widget(
language,
theme="xcode",
width="100%",
minLines=15,
maxLines=15,
):
"""创建AceWidget类。
参数:
language: 语言,如:html, java, python等。
theme: 编辑器皮肤。默认为:xcode。
width: 编辑器宽度。默认为:100%。可以设置为800px等。
minLines: 初始行数。默认为:15。
maxLines: 最大行数。默认为:15。
返回值:
AceWidget类
"""
FAQs
Django admin widget using ACE editor for TextField.
We found that django-ace-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.

Security News
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.

Research
/Security News
Impostor NuGet package Tracer.Fody.NLog typosquats Tracer.Fody and its author, using homoglyph tricks, and exfiltrates Stratis wallet JSON/passwords to a Russian IP address.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.