This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
============================
Welcome to django-highlightjs
============================

.. image:: https://travis-ci.org/MounirMesselmeni/django-highlightjs.png?branch=master
:target: https://travis-ci.org/MounirMesselmeni/django-highlightjs

.. image:: https://coveralls.io/repos/MounirMesselmeni/django-highlightjs/badge.png?branch=master
:target: https://coveralls.io/r/MounirMesselmeni/django-highlightjs?branch=master


.. image:: https://pypip.in/version/django-highlightjs/badge.svg
:target: https://pypi.python.org/pypi/django-highlightjs/
:alt: Latest Version


Use Highlight.js (https://highlightjs.org) in your Django templates, the Django way.


Installation
------------

1. Install using pip:

``pip install django-highlightjs``

Alternatively, you can install download or clone this repo and call ``pip install -e .``.

2. Add to INSTALLED_APPS in your ``settings.py``:

``'highlightjs',``

3. In your templates, load the ``highlightjs`` library and use the ``highlightjs_*`` tags:

Settings
--------

The django-highlightjs has some pre-configured settings.
They can be modified by adding a dict variable called ``HIGHLIGHTJS`` in your ``settings.py`` and customizing the values you want.
The ``HIGHLIGHTJS`` dict variable is contains these settings and defaults:

.. code:: Python

HIGHLIGHTJS = {
# The URL to the jQuery JavaScript file
'jquery_url': '//code.jquery.com/jquery.min.js'
# The highlight.js base URL
'base_url': '//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/highlight.min.js'
# The complete URL to the highlight.js CSS file
'css_url': '//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/styles/{}.min.css',
# Include jQuery with highlight.js JavaScript (affects django-highlightjs template tags)
'include_jquery': False,
# The default used style.
'style': 'monokai_sublime',
}


Usage in your `settings.py`:
.. code:: Python

HIGHLIGHTJS = {
'style': 'github',
}

All other styles available at https://github.com/isagalaev/highlight.js/tree/master/src/styles


Example template
----------------

.. code:: Django

{% load highlightjs %}
<html>
<head>
<link href="{% highlightjs_css_url %}" rel="stylesheet" type="text/css">
</head>
<body>
{# Highlight Syntax using Highlightjs #}

{% highlightjs_this code_to_highlight %}
{% highlightjs_this code_to_highlight 'python' %}

{% highlightjs_javascript jquery=1 %}
</body>
</html>


Requirements
------------

- Python 2.6, 2.7, 3.2 or 3.3
- Django >= 1.4

Contributions and pull requests for other Django and Python versions are welcome.


Bugs and requests
-----------------

If you have found a bug or if you have a request for additional functionality, please use the issue tracker on GitHub.

https://github.com/MounirMesselmeni/django-highlightjs/issues


License
-------

You can use this under MIT See `LICENSE
<license>`_ file for details.


Author
------

My name is Mounir Messelmeni, you can reach me at messelmeni.mounir@gmail.com .
Release History

Release History

0.2.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-highlightjs-0.2.2.tar.gz (6.5 kB) Copy SHA256 Checksum SHA256 Source Nov 7, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting