A full-featured blogging application for your Django site
Project description
django-xblog
Blogging application for your Django site
Build Status
Installation
Install from PyPi:
pip install django-xblog
Using git:
mkdir blog_project
cd blog_project
virtualenv .
. bin/activate
git clone git@github.com:rubeon/django-xblog.git
cd django-xblog
python setup install
This will install xblog and its requirements.
Creating a Site
After the above, go through the usual process:
django-admin startproject mysite
cd mysite/
vi mysite/settings
Add the dependencies to INSTALLED_APPS:
INSTALLED_APPS = [
...
# following are for xblog
'django.contrib.sites',
'markdown_deux',
'xblog',
'django_xmlrpc_dx',
]
# Define a site, if not done already!
SITE_ID=1
MIDDLEWARE = [
# add sites middleware
# ...
'django.contrib.sites.middleware.CurrentSiteMiddleware',
]
./manage.py migrate
./manage.py createsuperuser --username=admin --email=admin@example.com
Password:
Password (again):
Superuser created successfully.
./manage.py runserver
URL Setup
Add a place to your site's root urls.py reach your blog, and don't forget to
add the xblog namespace:
from django.urls import path, include
import xblog.urls
urlpatterns = [
path('admin/', admin.site.urls),
path('blog/', include(xblog.urls, namespace="xblog"),
]
Creating users
XBlog uses the Django authentication framework to keep track of users. Users
are linked to Authors, which can serve as the User profile model.
Author profiles are created automatically in the User model's post_save
signal. See xblog/models.py:create_profile for reference.
Adding to your templates
XBlog defines the following content blocks:
-
maincontent- the main Blog content with archives, posts, etc. -
rightnav- Blog roll, archive links, etc. -
leftnav- navigation block including ...(FIXME: whut?) -
extrahead- adds meta tags depending on the content being shown:
<title>subcritical.org::{% block subpagetitle %}top{% endblock %}</title>
{% block extrahead %}{% endblock %}
subpagetitle- returns title of article or archive
<title>subcritical.org::{% block subpagetitle %}top{% endblock %}</title>
pagestyle- can be placed inbodytag for CSS styling:
<body class="{% block pagestyle}{% endblock %}">
-
<title>subcritical.org::{% block subpagetitle %}top{% endblock %}</title> {% block extrahead %}{% endblock %}blogheaders- Returns metadata about blog, such as EditURI, author, etc., for you HTML<head>section -
navigation- Can be pulled into your navigation block to allow blog-specific navigation elements:
<nav>
<ul>
<li>Top</li>
{% block navigation %}{% endblock %}
</ul>
</nav>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_xblog-0.3.1.tar.gz.
File metadata
- Download URL: django_xblog-0.3.1.tar.gz
- Upload date:
- Size: 148.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42ab119383a98e10fe14e60050e45123ab26a62d3a2c98edafcb14524fdf83dd
|
|
| MD5 |
5b74a0d959126879ab9366b2313393bd
|
|
| BLAKE2b-256 |
13f684e076249d50c077ea915ce70cf67f00dbc2b6066a046cbf6396a9f65889
|
Provenance
The following attestation bundles were made for django_xblog-0.3.1.tar.gz:
Publisher:
python-publish.yml on rubeon/django-xblog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_xblog-0.3.1.tar.gz -
Subject digest:
42ab119383a98e10fe14e60050e45123ab26a62d3a2c98edafcb14524fdf83dd - Sigstore transparency entry: 203519167
- Sigstore integration time:
-
Permalink:
rubeon/django-xblog@6c818ed215aa21208a63eb3dc8ca922c4c5d36a7 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/rubeon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@6c818ed215aa21208a63eb3dc8ca922c4c5d36a7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_xblog-0.3.1-py3-none-any.whl.
File metadata
- Download URL: django_xblog-0.3.1-py3-none-any.whl
- Upload date:
- Size: 191.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f34a7a6afb12ca845492aea10e9418865682ff16ad97890159224de39a33a462
|
|
| MD5 |
f0623ddb50fa9fdd832cb0a8ed5f0b16
|
|
| BLAKE2b-256 |
9099489cc2d969794b35ba6031dcc2aca7cccf328d55d504459104bc27ac1997
|
Provenance
The following attestation bundles were made for django_xblog-0.3.1-py3-none-any.whl:
Publisher:
python-publish.yml on rubeon/django-xblog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_xblog-0.3.1-py3-none-any.whl -
Subject digest:
f34a7a6afb12ca845492aea10e9418865682ff16ad97890159224de39a33a462 - Sigstore transparency entry: 203519171
- Sigstore integration time:
-
Permalink:
rubeon/django-xblog@6c818ed215aa21208a63eb3dc8ca922c4c5d36a7 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/rubeon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@6c818ed215aa21208a63eb3dc8ca922c4c5d36a7 -
Trigger Event:
push
-
Statement type: