Skip to content

The Aristotle Glossary extension provides a mechanism for defining a collection of reusable terms and definitions and the rich text plugins for inserting these into object definitions.

GigiusB/aristotle-glossary

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aristotle Glossary Extensions

image

image

The Aristotle Glossary Extension provides additional models for defining reusable terms and a rich text plugins for inserting references into object definitions.

Quick start

  1. Add "aristotle_glossary" to your INSTALLED_APPS setting:

    INSTALLED_APPS = (
        ...
        'aristotle_mdr',
        'aristotle_glossary',
        ...
    )
  2. Include the glossary URL definitions in your Django URLconf file. The glossary URLs Must exist at /glossary/ for the glossary definition popovers to work.:

    url(r'^glossary/', include('aristotle_glossary.urls')),
  3. Include links in your HTML to ensure the javascript and CSS are loaded for the popovers. This can be done by creating a new local template for your project based on the aristotle_mdr/scripts.py template. More information on how to override files in the Aristotle Metadata Registry documentation on customisation :

    <script src="{% static 'aristotle_glossary/aristotle.glossary.js' %}" type="text/javascript"></script>
    <link rel="stylesheet" href="{% static 'aristotle_glossary/aristotle.glossary.css' %}" />
  4. Update the CONTENT_EXTENSIONS list in the ARISTOTLE_SETTINGS dictionary in your settings.py file to let the registry know of the additional model. For example:

    ARISTOTLE_SETTINGS['CONTENT_EXTENSIONS'] = [
            'aristotle_glossary',
            # ... other models here based on your requirements
        ]
  5. (Optional) Override the CKEDITOR_CONFIGS configuration dictionary to include a button in the rich text editor for in inserting links to glossary items. This can be done either by using the default Aristotle glossary configuration:

    from aristotle_glossary.settings import CKEDITOR_CONFIGS

    or manually by:

    CKEDITOR_CONFIGS = {
        'default': {
            'toolbar' : [
                    # ... other configuration options
                   { 'name': 'aristotletoolbar', 'items': [ 'Glossary' ] },
            ],
            'extraPlugins' : 'aristotle_glossary',
        },
    }

    For more information on customising the CKeditor toolbar consult the Django-CKEditor documentation.

  6. Run python manage.py migrate to update the database to include the models for the glossary.

Screenshots

A complete glossary

image

Inserting a term into an existing description:

image

When inserted into an item, hovering gives a brief description:

image

Clicking the link then takes a user to the complete glossary term:

image

About

The Aristotle Glossary extension provides a mechanism for defining a collection of reusable terms and definitions and the rich text plugins for inserting these into object definitions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 71.1%
  • JavaScript 15.3%
  • HTML 11.2%
  • CSS 2.4%