Skip to main content

An application providing some template-tags to add buttons to pages

Project description

django-buttons

This application provides some simple template tags to insert buttons into templates.

Installation

Install application with pypi:

$ pip install django-buttons                # Does not installs any fontawesome -- Must be installed manually
$ pip install django-buttons[fontawesome4]  # Installs django-fontawesome
$ pip install django-buttons[fontawesome5]  # Installs django-fontawesome5

Add application to your INSTALLED_APPS:

INSTALLED_APPS = [
   ...
   'buttons',
   ...
]

BUTTONS_FONTAWESOME_VERSION = 4 # Use 5 ti use fontawesome-5 as icon library

Use buttons in your templates

 {% load buttons_tags %}
 ...
 {% btn_home %}

Buttons can have some parameters :

  • url: target url
  • title: displayed text
  • icon: fa aware name, ie. 'home' for fa-home
  • icon_position: Position of the icon, 'right', 'left' or 'none' (no icon displayed) ...

Enjoy !

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-buttons-0.9.2.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

django_buttons-0.9.2-py2.py3-none-any.whl (19.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-buttons-0.9.2.tar.gz.

File metadata

  • Download URL: django-buttons-0.9.2.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.10

File hashes

Hashes for django-buttons-0.9.2.tar.gz
Algorithm Hash digest
SHA256 e27bfb8486dc226c18e227c2c21d3cebf016091c00bf35777efa4effade50062
MD5 3af49d5ab348a5165ad366e5fbec980d
BLAKE2b-256 b1a83e3c0f06ac534f964a199094d2a7043318aa5ea51ced60a40088b83d84ba

See more details on using hashes here.

File details

Details for the file django_buttons-0.9.2-py2.py3-none-any.whl.

File metadata

  • Download URL: django_buttons-0.9.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.10

File hashes

Hashes for django_buttons-0.9.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f878e6bee07ca242b8aef34c363d5b5eb6cdeb019b50f8e0456b90a5ac2b9dda
MD5 765ecfb8c8166f46f1499f18b8a30686
BLAKE2b-256 ce660f95796bc311475f9f73b78d53cf1d3eef2d3a69ca4278891a9d28397f0c

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