What you need is {{ image.image.url }}
& {{ image.image.path }}
, while {{ image }}
– just an Image object, instance of the defined model and {{ image.image }}
gets us to the field which is ImageField
object and provides all the specified attributes.
More Related Contents:
- Does the django-rest-framework provide an admin site to manage models?
- Django dynamic model fields
- How to convert JSON data into a Python object?
- Django set default form values
- Django filter queryset __in for *every* item in list
- How to execute a Python script from the Django shell?
- Django, creating a custom 500/404 error page
- How do I force Django to ignore any caches and reload data?
- ImproperlyConfigured: You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings
- Django model “doesn’t declare an explicit app_label”
- Django: Adding “NULLS LAST” to query
- Serving dynamically generated ZIP archives in Django
- Django Admin – change header ‘Django administration’ text
- How can I save my secret keys and password securely in my version control system?
- get request data in Django form
- Access request in django custom template tags
- How to install virtualenv without using sudo?
- Django Many-to-Many (m2m) Relation to same model
- Heroku fails to install pywin32 library
- Running django tutorial tests fail – No module named polls.tests
- Simple approach to launching background task in Django
- django-cors-headers not work
- How does the order of mixins affect the derived class?
- Django 1.9 deprecation warnings app_label
- What is the difference between static files and media files in Django?
- Django 1.9 ImportError for import_module
- PyCharm hangs on ‘scanning files to index’ background task
- How to redirect from a view to another view In Django
- Static media images are not displaying in Django
- How to delete a record in Django models?