I've added Django summernote to my post model and it's working perfectly in localhost. However, the summernote field is not showing up in the server. I am using DJango+Gunicorn+Nginx in Linode.
settings.py
X_FRAME_OPTIONS = 'SAMEORIGIN'
SUMMERNOTE_THEME = 'bs4' # Show summernote with Bootstrap4
urls.py
path('summernote/', include('django_summernote.urls')),
admin.py
class BlogAdmin(SummernoteModelAdmin): # instead of ModelAdmin
summernote_fields = ('content','blog_post',)
admin.site.register(Blog, BlogAdmin)
I am quite not sure what am I doing wrong? Localhost summernote admin summernote
This is how my nginx file looks like.
server {
listen 80;
server_name pinkgiraffemarketing.com www.pinkgiraffemarketing.com; # such as: 121.21.21.65 dev.mywebsite.com
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
alias /home/ubuntu/pinkgiraffemarketing/staticfiles/;
}
location /static/admin/ {
alias /home/ubuntu/pinkgiraffemarketing/venv/lib/python3.10/site-packages/django/contrib/admin/static/admin/;
}
location /media/ {
alias /home/ubuntu/pinkgiraffemarketing/staticfiles/images/;
}
location / {
include proxy_params;
proxy_pass http://unix:/run/gunicorn.sock;
}
}
Any guidance will be appreciated. Thank you in advance.
I tried all the possible solution on the internet and none worked so far.