Skip to main content

On-the-fly image manipulation for Django 1.7+.

Project description

Django Daguerre makes it easy to adjust images on-the-fly without slowing down your templates and without needing to generate everything ahead of time with a cron job. You don’t need to make any changes to your models; it Just Works.

{% load daguerre %}
<img src="{% adjust my_model.image "fill" width=200 height=400 %}" />

{% adjust_bulk my_queryset "method.image" "fill" width=200 height=400 as adjusted_list %}
{% for my_model, image in adjusted_list %}
  <img src="{{ image }}" />
{% endfor %}
code:

http://github.com/melinath/django-daguerre

docs:

http://readthedocs.org/docs/django-daguerre/

build status:

build-image

Requirements

  • Python 2.7+, 3.5+

  • Pillow

  • Django 1.7 – 2.2

  • Six 1.10.0+

Daguerre may work with earlier or later versions of these packages, but they are not officially supported.

Installation

You can install the latest version of Daguerre using pip:

$ pip install django-daguerre

You can clone the repository yourself at https://github.com/melinath/django-daguerre.

Setup

Ensure that 'daguerre' is in your project’s INSTALLED_APPS:

INSTALLED_APPS = (
    'daguerre',
    ...
)

Add the following or similar anywhere in your URLconf:

urlpatterns = patterns('',
    url(r'^daguerre/', include('daguerre.urls')),
    ...
)

Run the migration command to create the database models:

python manage.py migrate daguerre

Testing

We recommend running tox from the repository’s root directory, but you can also run test_project/manage.py test daguerre.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-daguerre-2.3.0.tar.gz (584.3 kB view details)

Uploaded Source

File details

Details for the file django-daguerre-2.3.0.tar.gz.

File metadata

  • Download URL: django-daguerre-2.3.0.tar.gz
  • Upload date:
  • Size: 584.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for django-daguerre-2.3.0.tar.gz
Algorithm Hash digest
SHA256 172d2a6fc52ab51aa3874ab8add80f92adb0611d5e14f8c3bd11affaf97e35a7
MD5 e9ab4d75ad2bdc35197cc7259ea9d70c
BLAKE2b-256 457eae5f20c0b6e25672ac6bc47ecf332c33e74d105288fd6e3052e210450be7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page