Skip to main content

django-markupfield-helpers

django-markupfield-helpers is a set of Django helpers that make it easier to get up and running quickly with django-markupfield.

Source code is available on GitHub at mfcovington/django-markupfield-helpers. Information about django-markupfield is available on GitHub.

Installation

PyPI

pip install django-markupfield-helpers

GitHub (development branch)

pip install git+http://github.com/mfcovington/django-markupfield-helpers.git@develop

Configuration

Add markupfield_helpers to INSTALLED_APPS in settings.py:

INSTALLED_APPS = (
    ...
    'markupfield_helpers',
)

Add a link to the CSS file for syntax highlighting in base.html or in a specific template.

{% load staticfiles %}

<link rel="stylesheet" type="text/css" href="{% static 'markupfield_helpers/css/syntax-highlighting.css' %}">

markupfield_helpers can be left out of INSTALLED_APPS if the provided CSS for syntax highlighting is not needed.

Helpers

MarkupField

The MarkupField class from markupfield_helpers can be used in place of the class of the same name from markupfield.

The markupfield_helpers version comes with four markup types defined:

  • Markdown (Default): Markdown 2 with extras (code-friendly, cuddled-lists, fenced-code-blocks, footnotes, and tables)

  • Markdown Basic: Markdown 2 without extras

  • Plain Text

  • reStructuredText

Here is a basic example of how to use the markupfield_helpers version of MarkupField:

from django.db import models
from markupfield_helpers.helpers import MarkupField

class Article(models.Model):
    title = models.CharField(max_length=100)
    slug = models.SlugField(max_length=100)
    body = MarkupField()

MARKUP_FIELD_TYPES

Alternatively, MARKUP_FIELD_TYPES can be imported from markupfield_helpers.helpers and used as-is or modified. This is equivalent to the code above:

from django.db import models
from markupfield.fields import MarkupField
from markupfield_helpers.helpers import MARKUP_FIELD_TYPES


class Article(models.Model):
    title = models.CharField(max_length=100)
    slug = models.SlugField(max_length=100)
    body = MarkupField(
        default_markup_type='Markdown',
        markup_choices=MARKUP_FIELD_TYPES,
    )

Issues

If you experience any problems or would like to request a feature, please create an issue on GitHub.

Version 0.1.1

Revision History

0.1.0 2018-12-01

  • A set of Django helpers that make it easier to get up and running quickly with django-markupfield

0.1.1 2018-12-01

  • Fix manifest to include static CSS file

Metadata

Release files for django-markupfield-helpers 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-markupfield-helpers 0.1.1
File Size Uploaded Provenance Actions
django-markupfield-helpers-0.1.1.tar.gz 5.6 kB Without provenance Details for django-markupfield-helpers-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-markupfield-helpers 0.1.1
File Interpreter ABI Platform Actions
django_markupfield_helpers-0.1.1-py33-none-any.whl Python 3.3 none any Details for django_markupfield_helpers-0.1.1-py33-none-any.whl

Total release size: 12.4 kB

Release files / django-markupfield-helpers-0.1.1.tar.gz

Download URL django-markupfield-helpers-0.1.1.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
970c5bb6187640c6c281879b9da087d326ef56a2347e8d9652396f9d5194cdca
BLAKE2b-256 checksum
How to use checksums
76b6bed8efeb81ec2941a3603ffdbf5883c92fc7ef6078e09d7ab1b2b507828b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

Release files / django_markupfield_helpers-0.1.1-py33-none-any.whl

Download URL django_markupfield_helpers-0.1.1-py33-none-any.whl
Size 6.8 kB
Tags Python 3.3
SHA-256 checksum
How to use checksums
517bb696443658ca06982e84f821e87756c8d3ab907cd39f1bc1ee035076f1cd
BLAKE2b-256 checksum
How to use checksums
fe7c820aa70f584e407c63bd3c4d9bc116eadeac9298bb30ef92865a022c1fb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

Security for django-markupfield-helpers 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page