Skip to main content

Requirements

Django 1.3 or later

Installation

$ pip install django-jquery

Setup

Just add 'django.contrib.staticfiles' and 'jquery' to INSTALLED_APPS in your settings.py:

INSTALLED_APPS = (
    # ...

    'django.contrib.staticfiles',
    'jquery',

    # ...
)

Refer to Django static files documentation to configure and deploy static files.

Usage

You can refer to jquery in your template with:

{{ STATIC_URL }}js/jquery.js

Admin template customization:

{% extends "admin/base_site.html" %}

{% block extrahead %}
    <script type="text/javascript" src="{{ STATIC_URL }}js/jquery.js" />
{% endblock %}

Custom widget:

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

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

Release files for django-jquery 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-jquery 3.1.0
File Size Uploaded
django-jquery-3.1.0.tar.gz 33.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-jquery 3.1.0
File Interpreter ABI Platform
django_jquery-3.1.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 67.4 kB

Release files / django-jquery-3.1.0.tar.gz

Download URL django-jquery-3.1.0.tar.gz
Size 33.4 kB
Tags Source
SHA-256 checksum
How to use checksums
414ac1083708ac71cc771612e7287702c939d06cd357fd53bb1271a4f6255115
BLAKE2b-256 checksum
How to use checksums
76bebc377f2d9406f9e2e0b483fc69df04fe5a7780802b42fb64b8f2a9cc52e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_jquery-3.1.0-py2.py3-none-any.whl

Download URL django_jquery-3.1.0-py2.py3-none-any.whl
Size 33.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e7e2ac14234bac26be937e448d94efd6d37ee2f3cdbaa2def3c8e74c2afb2b9a
BLAKE2b-256 checksum
How to use checksums
ea893c3ebe3190ee00222a34588ac0383702f0d91ebb2983408cf906c0236671
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

3.1.0 This release

2 release files

2.2.4

2 release files

1.12.4

2 release files

1.12.3

2 release files

1.12.2

2 release files

1.11.3

1 release file

1.10.2

1 release file

1.9.1

1 release file

1.9.0

1 release file

1.8.3

1 release file

1.8.2

1 release file

1.8.1

1 release file

1.8.0

1 release file

1.7.2

1 release file

1.7.1

1 release file

1.7

1 release file

1.6.4

1 release file

1.5.2

1 release file

1.4

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page