Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

===================
Django Glitter News
===================


Adds easy to use News/Blog functionality to
`Glitter <https://github.com/developersociety/django-glitter/>`_.


Installation
============

Getting the code
----------------

You can get **django-glitter-news** by using **pip**:

.. code-block:: console

$ pip install django-glitter-news

Prerequisites
-------------

Make sure you add ``'glitter_news'``, ``'taggit'`` and ``'adminsortable'`` to your
``INSTALLED_APPS`` setting:

.. code-block:: python

INSTALLED_APPS = [
# ...
'glitter_news',
'taggit',
'adminsortable',
# ...
]

URLconf
-------

Add the Glitter News URLs to your project’s URLconf as follows:


.. code-block:: python

url(r'^news/', include('glitter_news.urls', namespace='glitter-news'))


Configuration
=============

The following options can be set in your project's `settings.py`:

GLITTER_NEWS_TAGS
-----------------

This setting enables tags for the model ``Post`` in your project.

Default is ``False``.

Example:

.. code-block:: python
GLITTER_NEWS_TAGS = True

NEWS_PER_PAGE
-------------

Set the number of news articles which will be displayed on a page.

Default is ``10``.

Example:

.. code-block:: python
NEWS_PER_PAGE = 10

NEWS_STICKY_ON_ALL
------------------

Disable the sticky posts functionality when displaying the list of all news.

Default is ``True``.

Example:

.. code-block:: python
NEWS_STICKY_ON_ALL = False


Developing
==========

Getting started on improving Django Glitter News is pretty straight forward. Presuming you're
using `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_ and
`The Developer Society Dev Tools <https://github.com/developersociety/tools>`_:

.. code-block:: console

$ dev-clone git@github.com:developersociety/django-glitter-news.git
$ make reset

Please remember to run ``make format`` before you commit, and ``tox`` before pushing the changes you
make:

.. code-block:: console

$ make format
$ git add .
$ git commit -m 'Made it do something awesome!'
$ tox
$ git push


Releasing
=========

Releasing a new version of the project to PyPi is fairly straight forward.

First, make sure you have the correct credentials for PyPi correctly configued on your machine.

Update and commit the Version History in the README.

Then, use ``bumpversion`` to increment the version numbers in the project. This will also create a
commit and a tag automatically for the new version. For example, to increment the version numbers
for a 'patch' release:

.. code-block:: console

$ bumpversion patch
$ git push --tags origin master

``bumpversion`` can increment 'patch', 'minor' or 'major' version numbers:

.. code-block:: console

$ bumpversion [patch | minor | major]

Then release the new version to PyPi:

.. code-block:: console

$ make release


Metadata

Release files for django-glitter-news 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-glitter-news 0.3.3
File Size Uploaded
django-glitter-news-0.3.3.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-glitter-news 0.3.3
File Interpreter ABI Platform
django_glitter_news-0.3.3-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 23.1 kB

Release files / django-glitter-news-0.3.3.tar.gz

Download URL django-glitter-news-0.3.3.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b1bd4d0121cd05433d046a40b1c3d6f4198722fd3386919d48de16c592a9a78e
BLAKE2b-256 checksum
How to use checksums
8e3e4f0bb21259b8f7996dcdbce9a2365656e6ed72ebd724045b02969daa300b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_glitter_news-0.3.3-py2.py3-none-any.whl

Download URL django_glitter_news-0.3.3-py2.py3-none-any.whl
Size 14.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
87e41a583cfbd9469e66aad1991f670e9bd2d1ee03ccf71d97398d3d2932a386
BLAKE2b-256 checksum
How to use checksums
6321e03cd7e3d0a2674d122cb9431cb8c50bf229f6f49fc71a5e7b744c121042
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page