Socket
Socket
Sign inDemoInstall

django-buttons

Package Overview
Dependencies
3
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-buttons

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


Maintainers
1

Readme

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 !

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc