Socket
Socket
Sign inDemoInstall

django-easy-blog

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-easy-blog

Django package to make blog creation easier


Maintainers
1

==================== Package 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.

.. image:: https://raw.githubusercontent.com/Aristofane1/blog_package/main/screenshot1.PNG :alt: django admin custom

Quick Start

  1. Add post in your INSTALLED_APPS and update settings

.. code:: bash

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

2. update your project url

.. code:: bash

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)

3. Migrate your project and collect static

.. code:: bash

python manage.py makemigrations post
python manage.py migrate
python manage.py collectstatic

4. Create super user, run your app and go to admin to create your blog post

  1. Use post_list tag to get all posts list on your template

.. code:: html

{% 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>

FAQs


Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc