Metadata-Version: 2.1
Name: django-easy-blog
Version: 1.0.3
Summary: Django package to make blog creation easier
Author: Aristofane
Author-email: aristofanesmithloko@gmail.com
Maintainer: Aristofane
Maintainer-email: aristofanesmithloko@gmail.com
License: MIT
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 3
Classifier: Framework :: Django :: 3.2
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/x-rst
License-File: LICENSE

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


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



