-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update resource description field to a WYSIWYG editor in the admin. #241
Conversation
@@ -357,3 +358,5 @@ def __init__(self, tz_name=None): | |||
|
|||
# Contact us Email | |||
CONTACT_US_EMAILS = os.getenv("CONTACT_US_EMAILS", "forwardjustice-team@caktusgroup.com").split(":") | |||
|
|||
CKEDITOR_BASEPATH = "/static/ckeditor/ckeditor/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check if the deployment runs collectstatic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copelco Is hard coding the path to static
ok in prod? I see the Dockerfile sets a UWSGI_STATIC_MAP
to something different. Or is that totally unrelated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
@@ -70,6 +80,7 @@ class ResourceAdmin(admin.ModelAdmin): | |||
filter_horizontal = ("agencies",) | |||
inlines = [InlineResourceFile] | |||
readonly_fields = ("created_date",) | |||
form = ResourceForm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formfield_overrides
might work here, but not required!
@@ -357,3 +358,5 @@ def __init__(self, tz_name=None): | |||
|
|||
# Contact us Email | |||
CONTACT_US_EMAILS = os.getenv("CONTACT_US_EMAILS", "forwardjustice-team@caktusgroup.com").split(":") | |||
|
|||
CKEDITOR_BASEPATH = "/static/ckeditor/ckeditor/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should work!
What's changed:
django-ckeditor
package and update requirementsResourceAdmin
class with form that usesCKEditorWidget
for the description fieldPreview:
