Use css to customize article content widget
This commit is contained in:
parent
6898bb22a5
commit
1eb72f45ef
2 changed files with 2 additions and 5 deletions
|
@ -1,8 +1,6 @@
|
||||||
from django import forms
|
|
||||||
from django.contrib import admin, messages
|
from django.contrib import admin, messages
|
||||||
from django.contrib.admin import register
|
from django.contrib.admin import register
|
||||||
from django.contrib.auth.admin import UserAdmin
|
from django.contrib.auth.admin import UserAdmin
|
||||||
from django.db import models
|
|
||||||
from django.shortcuts import redirect
|
from django.shortcuts import redirect
|
||||||
|
|
||||||
from .models import Article, Comment, Page, User
|
from .models import Article, Comment, Page, User
|
||||||
|
@ -46,9 +44,6 @@ class ArticleAdmin(admin.ModelAdmin):
|
||||||
"status",
|
"status",
|
||||||
"published_at",
|
"published_at",
|
||||||
]
|
]
|
||||||
formfield_overrides = {
|
|
||||||
models.TextField: {"widget": forms.Textarea(attrs={"style": "width: 98%"})},
|
|
||||||
}
|
|
||||||
prepopulated_fields = {"slug": ("title",)}
|
prepopulated_fields = {"slug": ("title",)}
|
||||||
change_form_template = "articles/article_change_form.html"
|
change_form_template = "articles/article_change_form.html"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#id_content {
|
#id_content {
|
||||||
font-family: "JetBrains Mono", monospace;
|
font-family: "JetBrains Mono", monospace;
|
||||||
|
width: calc(100% - 1em);
|
||||||
|
resize: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
label[for=id_content] {
|
label[for=id_content] {
|
||||||
|
|
Reference in a new issue