Skip to main content

Django Markdown Model

Django Markdown Model is a Python project that provides a simple way to integrate a Markdown field into your Django models. This package allows you to store and render Markdown content effortlessly, making it ideal for applications that require rich text input from users.

Features

  • MarkdownField: Easily store and manage Markdown content in your Django models.
  • Simple Integration: Quick setup and integration into existing Django projects.
  • Flexible Rendering: Supports various Markdown renderers for displaying content.

Installation

You can install this package via pip:

pip install django-markdown-model

Usage

To use this package in your Django project, follow these steps:

  1. Add django_markdown_model to your INSTALLED_APPS in your Django settings:
INSTALLED_APPS = [
...
'django_markdown_model',
]
  1. Create your models using MarkdownField:
from django.db import models
from django_markdown_model.fields import MarkdownField

class MyModel(models.Model):
title = models.CharField(max_length=200)
content = MarkdownField()

       def __str__(self):
           return self.title
  1. Use Abstract Model MarkdownModel:
from django.db import models
from django_markdown_model.fields import MarkdownField

class MyModel(MarkdownModel):
pass
  1. Render Markdown in your templates:

    Use a Markdown renderer (like markdown2 or mistune) to display the content:

<h1>{{ my_model.title }}</h1>
<div>{{ my_model.content|safe }}</div>

Example

See the examples/ directory for a complete example of how to use this package in a Django project.

Running Tests

Tests are under development.

Contributing

Contributions are welcome! Please submit a pull request or open an issue.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for django-markdown-model 1.0

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-markdown-model 1.0
File Size Uploaded Provenance Actions
django-markdown-model-1.0.tar.gz 4.1 kB Without provenance Details for django-markdown-model-1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-markdown-model 1.0
File Interpreter ABI Platform Actions
django_markdown_model-1.0-py3-none-any.whl Python 3 none any Details for django_markdown_model-1.0-py3-none-any.whl

Total release size: 8.8 kB

Release files / django-markdown-model-1.0.tar.gz

Download URL django-markdown-model-1.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
984b81552d0b23ee8ec00eeea8707ac2ba9ceec60858ac75cd1cea382962078e
BLAKE2b-256 checksum
How to use checksums
f8a09c6e3e2fd5e4e3c2630db721fd85e2fdef8db3cf9f881d15cc4af23853c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.10

Release files / django_markdown_model-1.0-py3-none-any.whl

Download URL django_markdown_model-1.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43e27c3b0a2723ad0a8df49a7e94164cfd1109bef8a9a3cc6b4e819e8d75e55a
BLAKE2b-256 checksum
How to use checksums
e506ce762faf11e4e3b5ac6c74f6a713213d5253c0857fbe0363dc2c6eb0b792
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.10

Security for django-markdown-model 1.0

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

1.0 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