Simple Django Blog app using Markdown
* Free software: MIT license
* Documentation: https://djcms-blog.readthedocs.io.
## Features
* Works on pure Django
* Markdown blog post format
* Built-in template
* Multiple languages support
* SEO tags supported to customize
## Usage
### Install
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')),
)
```
## Configuration
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
### Example
In `settings.py`
```
# Blog config
DJCMS_BLOG_CACHE_TIME = 0
DEFAULT_BLOG_ID = 1
```
## Contributing
Install dev dependencies
```
pip install -r requirements_dev.txt
```
Run tests
```
pytest . --cov=. --cov-report=term-missing
```
Static Analysis
```
flake8 .
```
## Credits
This package was created with **Cookiecutter** and the `audreyr/cookiecutter-pypackage` project template.
# History
0.1.0 (2018-06-05)
------------------
* First release on PyPI.
0.2.4 (2019-03-03)
------------------
* Fix issue at blogs with slugs eg."test-blog".
* Added support to custom nav image.
Metadata
Release files for djcms-blog 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| djcms_blog-0.2.4.tar.gz | 1.4 MB | Without provenance | Details for djcms_blog-0.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| djcms_blog-0.2.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for djcms_blog-0.2.4-py2.py3-none-any.whl |
Total release size: 2.9 MB
Release files / djcms_blog-0.2.4.tar.gz
| Download URL | djcms_blog-0.2.4.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b4f6fb8764e9983fcbd9b2a4f4b756a14633607a5531397af3e9f0987e5e6f4
|
|
BLAKE2b-256 checksum How to use checksums |
cc6a22db6bb7f7392fcb5b6d36db7707986224599ed8c105fb174db6eab98c2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/38.5.2 requests-toolbelt/0.8.0 tqdm/4.20.0 CPython/3.6.4
|
Release files / djcms_blog-0.2.4-py2.py3-none-any.whl
| Download URL | djcms_blog-0.2.4-py2.py3-none-any.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
12e99660553d0ae8577bcde3735d7806d37e7698fe201fa29648099ad9988542
|
|
BLAKE2b-256 checksum How to use checksums |
edd95b82f2d892c12f02958dfd8d065d2f8d27fe1e486d2b1c37bfa6540a3329
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
|
Security for djcms-blog 0.2.4
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.