I'm creating a Blog with Django and I need to insert images on the posts. As far as I know, the best package for that is django-adminfiles
The installation guide is pretty simple but I don't understand the 3rd step(because of my bad English level :S):
Make the contents of the adminfiles/static/adminfiles directory available at STATIC_URL/adminfiles. This can be done by through your webserver configuration, via an app such as django.contrib.staticfiles, or by copying the files or making a symlink.
I have run collecstatic, copy the files of adminfiles/static/adminfiles to my static directory and nothing seems to work. When I write a post, it should appear like in this video but the image thumbmails and "All uploads images","Upload","Refresh".... doesn't appear. I'm pretty new to Django and I'm a bit lost with this silly question. ¿Does someone know what i have to do here?
My environment
Step
Install
'adminfiles' :
pip install django-adminfiles==1.0.1
'sorl-thumbnail' :
pip install sorl-thumbnail==12.2
Prerequisites for 'pillow' :
yum install libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel -y
'pillow' :
pip install pillow==2.8.1
Use adminfiles
I have created a django project named 'demo', it has only one app 'trial'.
To use adminfiles in the 'demo' project we must do the following:Add 'adminfiles', 'sorl.thumbnail' to INSTALLED_APPS tuple of demo/settings.py file.
Add adminfiles url to the urlatterns list of demo/urls.py file.
Modify admin of trial/admin.py file.
(Note: Article is a model defined in trial/models.py, it has a TextField field named 'text')
python manage.py migrate
Set MEDIA_URL and MEDIA_ROOT.
demo/settings.py :
demo/urls.py :
After the above settings, the upload files will be stored in '/data/media/adminfiles/' dir.