Giter Site home page Giter Site logo

chubz / django-daguerre Goto Github PK

View Code? Open in Web Editor NEW

This project forked from melinath/django-daguerre

0.0 2.0 0.0 2.07 MB

On-the-fly image manipulation for Django.

Home Page: http://django-daguerre.readthedocs.org/

License: BSD 3-Clause "New" or "Revised" License

Python 79.97% CSS 0.74% JavaScript 19.29%

django-daguerre's Introduction

README

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/littleweaver/django-daguerre
docs:http://readthedocs.org/docs/django-daguerre/
build status:build-image

Requirements

  • Python 2.7+, 3.3+
  • Pillow
  • Django 1.7 โ€“ 1.11
  • 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/littleweaver/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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.