Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
django-markdown-model
Advanced tools
This package allows you to store and render Markdown content effortlessly, making it ideal for applications that require rich text input from users.
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.
You can install this package via pip:
pip install django-markdown-model
To use this package in your Django project, follow these steps:
INSTALLED_APPS = [
...
'django_markdown_model',
]
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
from django.db import models
from django_markdown_model.fields import MarkdownField
class MyModel(MarkdownModel):
pass
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>
See the examples/ directory for a complete example of how to use this package in a Django project.
Tests are under development.
Contributions are welcome! Please submit a pull request or open an issue.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
This package allows you to store and render Markdown content effortlessly, making it ideal for applications that require rich text input from users.
We found that django-markdown-model demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.