-
Notifications
You must be signed in to change notification settings - Fork 37
Django support
Django is a very popular web framework in the python development community. Being so, libthumbor will try to support it as much as possible.
In Django settings you can configure the URL for your thumbor server and security key as such:
- THUMBOR_SECURITY_KEY (defaults to 'my-security-key')
- THUMBOR_SERVER (defaults to 'http://localhost:8888/')
This view returns a thumbor encrypted URL and is a very good fit for client (Javascript) code that needs to create thumbor URLs. It uses the settings above to generate the URLs.
This view only responds to the GET method and takes the same arguments of the generate method (Usage) in the form of the querystring parameters.
Thumbor also comes with an URL module that you can just include in your django project, like this:
from django.urls import include, path
urlpatterns = [
path("", include("libthumbor.django.urls")),
]
That way your project gets the following urls:
Template tag support is available in the https://github.com/ricobl/django-thumbor lib.