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.

Files for django-buttons, version 0.9.2
Filename, size File type Python version Upload date Hashes
Filename, size django_buttons-0.9.2-py2.py3-none-any.whl (19.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size django-buttons-0.9.2.tar.gz (1.2 MB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page