Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

jQuery Resize And Crop (jrac): visually resize an image and place a crop

Project Description

Requirements

Django 1.3 or later

Installation

$ pip install django-jquery

Setup

Add 'django.contrib.staticfiles', 'jquery', 'jquery_ui', and 'jrac' to INSTALLED_APPS in your settings.py:

INSTALLED_APPS = (
    # ...

    'django.contrib.staticfiles',
    'jquery',
    'jquery_ui'
    'jrac',

    # ...
)

Make sure you use 'collectstatic' to copy installed files to your static folder:

$ python setup.py collectstatic

Refer to Django static files documentation for additional information.

Usage

You can refer to jquery in your template with:

{{ STATIC_URL }}js/jquery.jrac.js

Custom widget:

class MyWidget(forms.TextInput):
    class Media:
        js = ('js/jquery.jrac.js',)

    def render(self, name, value, attrs=None):
        html = super(MyWidget, self).render(name, value, attrs=attrs)
        # ...
        return html

Deployment:

Use the minified jquery.jrac.min.js instead of jquery.jrac.js

Demo

Check out the demo.

Release History

Release History

This version
History Node

1.0.2.dev10

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-jrac-1.0.2.dev10.tar.gz (18.3 kB) Copy SHA256 Checksum SHA256 Source Apr 5, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting