Django package to make blog creation easier
Project description
Django easy blog post is a package that allows you to create blog posts with a text editor to customize the content of your publication.
Quick Start
Add post in your INSTALLED_APPS and update settings
INSTALLED_APPS = [
...
'ckeditor',
'ckeditor_uploader',
'post',
...
]
CKEDITOR_UPLOAD_PATH = "uploads/"
...
STATIC_URL = '/static/'
STATIC_ROOT = BASE_DIR / 'static'
MEDIA_URL = 'media/'
MEDIA_ROOT = BASE_DIR / 'media'
...
update your project url
from django.conf.urls.static import static
from . import settings
from django.urls import path, include
urlpatterns = [
...
path('ckeditor', include('ckeditor_uploader.urls')),
] +static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Migrate your project and collect static
python manage.py makemigrations post
python manage.py migrate
python manage.py collectstatic
Create super user, run your app and go to admin to create your blog post
Use post_list tag to get all posts list on your template
{% load post_tags %}
<!DOCTYPE html>
...
<body>
...
<p>My blogs</p>
<div>
{% for post in ''|post_list %}
<h2>{{post.title}}</h2>
<h2>{{post.content|safe}}</h2>
{% endfor %}
</div>
...
</body>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-easy-blog-1.0.3.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for django_easy_blog-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5840ef6f3c9e55e6663b27632730d0e27848d84754c4a096de0a75512bc9113 |
|
MD5 | 1ee34d4fcf0c650e0b38e01719f5e36a |
|
BLAKE2b-256 | 68bb24101c1a8649fb2585a000a5ffabbd49203abd9ee3893b66586e1b4eb23e |