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.
Simple Django Blog app using Markdown
Add the following apps to your INSTALLED_APPS in settings.py
INSTALLED_APPS += [
'django.contrib.sitemaps',
'dj_markdown',
'simplemde',
'django.contrib.humanize',
'djcms_blog',
]
Add django.middleware.locale.LocaleMiddleware
to MIDDLEWARE
MIDDLEWARE += [
'django.middleware.locale.LocaleMiddleware',
]
Define default language and supported languages.
LANGUAGE_CODE = 'en'
LANGUAGES = [
('es', 'ES'),
('en', 'EN'),
]
Update your urls.py
adding blog urls.
from django.conf.urls.i18n import i18n_patterns
from django.contrib.sitemaps.views import sitemap
from djcms_blog.sitemaps import PostsSitemap
sitemaps = {
'blog': PostsSitemap,
}
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^sitemap\.xml$', sitemap, {'sitemaps': sitemaps}, name='sitemap'),
]
urlpatterns += i18n_patterns(
url(r'^', include('djcms_blog.urls')),
)
You can define the following blog settings in your settings.
DEFAULT_BLOG_ID Define the default blog id to be used in the urls and links.
DEFAULT_URL URL to open the blog
BLOG_TITLE HTML title
ROOT_TITLE Title for links
DJCMS_BLOG_CACHE_TIME Cache time used in public views.
MARKDOWN_CODE_CSS_THEME Code theme for markdown code in the blog.
DEFAULT_COVER_IMAGE Cover image used in blog
DEFAULT_NAVBAR_IMAGE Image used as icon in navigation
In settings.py
# Blog config
DJCMS_BLOG_CACHE_TIME = 0
DEFAULT_BLOG_ID = 1
Install dev dependencies
pip install -r requirements_dev.txt
Run tests
pytest . --cov=. --cov-report=term-missing
Static Analysis
flake8 .
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage
project template.
FAQs
Simple Django Blog app using Markdown
We found that djcms-blog 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.