Skip to main content

django-remdow

Simple Django app for static files (img files):

  • Download external images
  • To center images
  • Lazy load images

Install

pip install django_remdow

Add 'django_remdow', to INSTALLED_APPS:

INSTALLED_APPS = [
    ...
    'django_remdow',
    ...
]

Usage

remdow app contains different filters and tags. You can activate them with line in your template:

# example.html

{% load remdow %}

Download external images

If you have model with HTML content which contains external images, you can download external images to local folder and receive static with help nginx:

Use filter img_local:

{{ '<img src="http://placehold.it/350x150"><img src="http://placehold.it/350x150">'|img_local }}

This filter parse HTML code, finds img tag, parses urls and then downloads image to local folder, and finally, replaces img url to local url.

Lazy images

You can use layzr.js for lazy loading images.

Load lazy script:

{% lazy_script_include %}

And use filter img_lazy:

{{ '<img src="http://placehold.it/350x150">'|img_lazy }}

Center images with Bootstrap

Filter img_center centers all images

{{ '<img src="http://placehold.it/350x150">'|img_center }}

Filter adds class center-block to all img tags

Image responsive with Bootstrap

Filter img-responsive responsives all images

{{ '<img src="http://placehold.it/350x150">'|img_responsive }}

Filter adds class img-responsive to all img tags

Metadata

Release files for django-remdow 0.0.9

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-remdow 0.0.9
File Size Uploaded
django-remdow-0.0.9.tar.gz 5.0 kB Details

Built distribution (wheel)

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

Total release size: 9.9 kB

Release files / django-remdow-0.0.9.tar.gz

Download URL django-remdow-0.0.9.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f6600e32296da29ca7716f8e572b5470fdfe1bbb702d815fc47b9b889e76ab24
BLAKE2b-256 checksum
How to use checksums
fcc240295d9b93d8e9f904549915b33ac5636ab81cf5c0e05d96c5ac5cb90ca6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.6

Release files / django_remdow-0.0.9-py2.py3-none-any.whl

Download URL django_remdow-0.0.9-py2.py3-none-any.whl
Size 4.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
32ffe76a2da3c1dbd716abc24d38a68bcb4eb01a1bfd8f92c028d157be3d3e62
BLAKE2b-256 checksum
How to use checksums
58bb1570c28914ba9e491d5ec82d7f095d64ea93e33e769d7e6d4d85877c0d9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.0.9 This release

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

1 release file

0.0.5

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