Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
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
.. 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
.. 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
Django package to make blog creation easier
We found that django-easy-blog demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.