Use css to customize article content widget

This commit is contained in:
Gabriel Augendre 2020-08-28 21:55:34 +02:00
parent 6898bb22a5
commit 1eb72f45ef
No known key found for this signature in database
GPG key ID: 1E693F4CE4AEE7B4
2 changed files with 2 additions and 5 deletions

View file

@ -1,8 +1,6 @@
from django import forms
from django.contrib import admin, messages
from django.contrib.admin import register
from django.contrib.auth.admin import UserAdmin
from django.db import models
from django.shortcuts import redirect
from .models import Article, Comment, Page, User
@ -46,9 +44,6 @@ class ArticleAdmin(admin.ModelAdmin):
"status",
"published_at",
]
formfield_overrides = {
models.TextField: {"widget": forms.Textarea(attrs={"style": "width: 98%"})},
}
prepopulated_fields = {"slug": ("title",)}
change_form_template = "articles/article_change_form.html"

View file

@ -1,5 +1,7 @@
#id_content {
font-family: "JetBrains Mono", monospace;
width: calc(100% - 1em);
resize: vertical;
}
label[for=id_content] {