Skip to main content

A simple Django Blog app.

Project description

=====
Blog
=====

Blog is a simple Django Blog app.

Blogs can have tags, title, image, short description and a rich text blog.

Tags are created in Admin and Users can then add as many as they like.

Detailed documentation is needs writing.

Quick start
-----------

1. pip install hexia-blog

2. Add "blog" and dependencies to your INSTALLED_APPS setting like this::

INSTALLED_APPS = [
...
'ckeditor',
'ckeditor_uploader',
'blog',
]

3. Add "blog.context_processors.hexia_blog" to your context_processors::

'OPTIONS': {
'context_processors': [
...
'blog.context_processors.hexia_blog',
],
},


4. Include the polls URLconf in your project urls.py like this::

path('blog/', include('blog.urls')),

5. Run `python manage.py migrate` to create the polls models.

6. Start the development server and visit http://127.0.0.1:8000/admin/
to create a Tag (you'll need the Admin app enabled).

7. There are 3 URLs provided.

<a href="{% url 'blog:blog-detail' object.slug %}">Blog Detail</a> provides the detail of a specific blog.
Template: blog/blog_detail.html

<a href="{% url 'blog:blog-list' %}">Blog List</a> will list all blogs.
Template: blog/blog_list.html

There is a special case of list where 'tag' and/or 'search_string' get be set. When set, only blogs matching
these criteria will be returned. See blog/blog_list.html to see it implemented.

<a href="{% url 'blog:blog-create' %}">Blog Create</a> will allow you to create a new blog (or you can via admin)
Template: blog/blog_form.html

When using create you must set the blog auther to the user who it is associated with.

8. Visit http://127.0.0.1:8000/.


Settings
--------

Blog uses AUTH_USER_MODEL as the default user model. It will default to
the Django User model if AUTH_USER_MODEL is not set in settings.py

BLOG_PAGINATION:
The number of blogs shown on a single page when using listing.
Default = 20

Context Processors
------------------
There is a single context_processor provided, 'hexia_blog_tags', which provides a list of all Tags.
It is used in blog_list.html.

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

hexia-blog-1.0.2.tar.gz (7.2 kB view details)

Uploaded Source

File details

Details for the file hexia-blog-1.0.2.tar.gz.

File metadata

  • Download URL: hexia-blog-1.0.2.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for hexia-blog-1.0.2.tar.gz
Algorithm Hash digest
SHA256 264969b36181a780bb27792c87c76ed2d11cea1326e4b165686864d5cab53f09
MD5 43f50ceb7e48741e3bfa865fcee1ae6c
BLAKE2b-256 8b855a33a1474be4089d289bfc186d7332ad747852e848306e6243cd50b77fe0

See more details on using hashes here.

Supported by

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