Skip to main content

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.

django admin custom

Quick Start

  1. 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'
...
  1. 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)
  1. Migrate your project and collect static

python manage.py makemigrations post
python manage.py migrate
python manage.py collectstatic
  1. Create super user, run your app and go to admin to create your blog post

  2. 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


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)

Uploaded Source

Built Distribution

django_easy_blog-1.0.3-py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page