Skip to content
This repository has been archived by the owner on Apr 2, 2019. It is now read-only.

Manageable bootstrap tooltips

Notifications You must be signed in to change notification settings

serinus42/django-tooltips

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-tooltips

Manageable bootstrap tooltips

Requirements

  • Django (duh)
  • Bootstrap
  • Jquery

Installation

Install the app via pip:

$ pip install django-tooltips

Add tooltips to your installated apps:

INSTALLED_APPS = (
    ...
    'tooltips',
    ...

Add the processor to your TEMPLATE_CONTEXT_PROCESSORS:

TEMPLATE_CONTEXT_PROCESSORS = (
    ...
    'tooltips.processors.tooltips',
)

Include this in your templates (eg, base.html):

{% include "tooltips/tooltips.html" %}

And run the migrations:

$ manage.py migrate tooltips

Now, whenever you add a tooltip via the admin, it will appear on your pages just after the element you provided via the javascript selector:

Preview

Clientside:

adming

Admin:

adming

Caveats

As the selectors are plain javascript selectors, you can use all the magic you want. But don't use very wide selectors like div or div:contains(""), those will probably bring your browser to a standstil :) YMMV

About

Manageable bootstrap tooltips

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 87.0%
  • HTML 13.0%