Skip to main content

No project description provided

Project description

========= django-picsum

django-picsum is a library which helps you in rendering placeholder or actual images

in your Djangp Template without much of hassle

.. image:: https://coveralls.io/repos/github/zostera/django-fa/badge.svg?branch=master :target: https://coveralls.io/github/zostera/django-fa?branch=master

.. image:: https://travis-ci.org/zostera/django-fa.svg?branch=master :target: https://travis-ci.org/zostera/django-fa

Installation

  1. Install using pip:

    pip install django-picsum

  2. Add to INSTALLED_APPS in your settings.py:

    'image_wrapper',

Example template

.. code:: Django

{% load image_wrapper %}

# Loads the tag

{% pic_rand height=300 width=400 %}

# A random image with a height of 300 and width of 400

{% pic_rand width=300 %}

# A random image with a height and width of 300 (300* 300 ) image 

 {% pix_image q="hi" min_width=100 %}

# A image from Pixabay 

{% pic_rand width=500  class="avatar__img" %} 

# You can pass class and id to the image to control it in your CSS it is completely optional

 To  use images from Pixabay declare your API Key in settings.py INSTALLED_APPS

 PIXABAY_KEY =<YOUR KEY>

Requirements

Django >= 2.0 and a matching Python version

Bugs and requests

If you have found a bug or if you have a request for additional functionality, please use the issue tracker on GitHub.

https://github.com/VarthanV/django-picsum/issues

License

You can use this under the MIT License. See LICENSE <LICENSE>_ file for details.

Author

Developed and maintained by Vishnu Varthan Rao <https://zostera.nl/>_.

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-picsum-1.2.tar.gz (5.3 kB view details)

Uploaded Source

File details

Details for the file django-picsum-1.2.tar.gz.

File metadata

  • Download URL: django-picsum-1.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.1

File hashes

Hashes for django-picsum-1.2.tar.gz
Algorithm Hash digest
SHA256 58c889cf91085d205852c3d23dfa41d92e01491de4a59bc0b5020e999184308a
MD5 49f6a4987995469367702ef4f9fb4534
BLAKE2b-256 6cdcfdc04dad5307bddbf7922ab4038233f98abca565584a7914cf1d208c47f7

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