Skip to content

Commit

Permalink
Merge branch 'release/1.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
bashu committed Nov 5, 2021
2 parents 7a720cb + 8043bdc commit 9e41aef
Show file tree
Hide file tree
Showing 28 changed files with 143 additions and 58 deletions.
81 changes: 72 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
venv/
build/
develop-eggs/
dist/
Expand All @@ -20,9 +19,13 @@ lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
Expand All @@ -37,29 +40,89 @@ pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
*.db
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# PyCharm
.idea
# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Mac stuff
.DS_Store
# Pyre type checker
.pyre/
36 changes: 22 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,46 @@ dist: xenial
language: python
matrix:
include:
- env: TOXENV=py36-dj20
python: 3.6
- env: TOXENV=py36-dj21
python: 3.6
- env: TOXENV=py36-dj22
python: 3.6
- env: TOXENV=py36-dj30
python: 3.6
- env: TOXENV=py37-dj20
python: 3.7
- env: TOXENV=py37-dj21
python: 3.7
- env: TOXENV=py36-dj31
python: 3.6
- env: TOXENV=py36-dj32
python: 3.6
- env: TOXENV=py37-dj22
python: 3.7
- env: TOXENV=py37-dj30
python: 3.7
- env: TOXENV=py38-dj20
python: 3.8
- env: TOXENV=py38-dj21
python: 3.8
- env: TOXENV=py37-dj31
python: 3.7
- env: TOXENV=py37-dj32
python: 3.7
- env: TOXENV=py38-dj22
python: 3.8
- env: TOXENV=py38-dj30
python: 3.8
- env: TOXENV=py38-dj31
python: 3.8
- env: TOXENV=py38-dj32
python: 3.8
- env: TOXENV=py39-dj22
python: 3.9
- env: TOXENV=py39-dj30
python: 3.9
- env: TOXENV=py39-dj31
python: 3.9
- env: TOXENV=py39-dj32
python: 3.9
- env: TOXENV=flake8
python: 3.7
before_install:
- curl -L https://github.com/docker/compose/releases/download/1.8.0/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
install:
- pip install tox
- pip install tox-travis
script:
- docker-compose -f tests/testapp/docker-compose.yaml up -d firefox hub
- tox
- tox
7 changes: 5 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
Changelog
=========

1.1.2 (unreleased)
1.1.2 (2021-11-05)
------------------

* Add Django 3.2 support. Drop Django <2.2 support.
* Add Wagtail 2.10-2.14 support.
* Add Python 3.9 to travis test matrix.
* Updated some docs.
* Fix circular imports.

1.1.1 (2020-06-13)
Expand Down
5 changes: 4 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ include AUTHORS
include LICENSE
include CHANGELOG
include README.rst
recursive-include puput *
recursive-exclude example *
recursive-include puput/static *.css *.js *.gif *.otf *.eot *.svg *.ttf *.woff
recursive-include puput/templates *.html *.xml
recursive-include puput/locale *.po *.mo
8 changes: 4 additions & 4 deletions docs/comments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Comments
Puput allows customize the comment system for your blog entries. Simply go to settings tab while editing blog properties
and add the required parameters depending on which system you want to use.

There is a :code:`PUPUT_COMMENTS_PROVIDER` setting that should point to the specific provider class. It defaults to :class:`DisqusProvider`.
There is a :code:`PUPUT_COMMENTS_PROVIDER` setting that should point to the specific provider class. It defaults to :class:`DisqusCommentsProvider`.

Disqus
------
Expand Down Expand Up @@ -35,7 +35,7 @@ In your :file:`settings.py` file:

.. code-block:: python
PUPUT_COMMENTS_PROVIDER = 'puput.comments.DjangoCommentsCommentsProvider'
PUPUT_COMMENTS_PROVIDER = 'puput.comments.DjangoCommentsProvider'
.. note::
Expand All @@ -57,7 +57,7 @@ method to return the path to your custom template.
Implement your own provider
---------------------------

To add your own comment provider you will need to subclass :class:`CommentProvider` and implement its methods:
To add your own comment provider you will need to subclass :class:`CommentsProvider` and implement its methods:

:code:`template`

Expand All @@ -69,4 +69,4 @@ return dictionary with data needed in your template

:code:`get_num_comments`

return number of comments for the entry page
return number of comments for the entry page
2 changes: 1 addition & 1 deletion docs/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ PUPUT_COMMENTS_PROVIDER

**Default value:** ``'puput.comments.DisqusCommentsProvider'``

String setting to define the class path for CommentProvider implementation. See :doc:`comments` for more details.
String setting to define the class path for ``CommentsProvider`` implementation. See :doc:`comments` for more details.
1 change: 1 addition & 0 deletions docs/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ If you are already referencing one of these apps in your :code:`INSTALLED_APPS`
INSTALLED_APPS = (
...
'wagtail.contrib.legacy.richtext',
'wagtail.core',
'wagtail.admin',
'wagtail.documents',
Expand Down
3 changes: 2 additions & 1 deletion puput/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
__author__ = "Marc Tudurí"
__email__ = "[email protected]"
__version__ = "1.1.1"
__version__ = "1.1.2"

PUPUT_APPS = (
# Wagtail apps
"wagtail.contrib.legacy.richtext",
"wagtail.core",
"wagtail.admin",
"wagtail.documents",
Expand Down
2 changes: 1 addition & 1 deletion puput/abstracts.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import datetime

from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from wagtail.admin.edit_handlers import FieldPanel, MultiFieldPanel, InlinePanel, PageChooserPanel
from wagtail.images.edit_handlers import ImageChooserPanel
Expand Down
1 change: 1 addition & 0 deletions puput/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
class PuputAppConfig(AppConfig):
name = 'puput'
verbose_name = 'Puput'
default_auto_field = 'django.db.models.AutoField'

def ready(self):
import puput.signals # noqa: F401
6 changes: 3 additions & 3 deletions puput/comments.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CommentProvider:
class CommentsProvider:
def __init__(self, blog_page, entry_page):
self.blog_page = blog_page
self.entry_page = entry_page
Expand All @@ -14,7 +14,7 @@ def get_num_comments(self):
raise NotImplementedError()


class DisqusCommentProvider(CommentProvider):
class DisqusCommentsProvider(CommentsProvider):

@property
def template(self):
Expand Down Expand Up @@ -46,7 +46,7 @@ def get_num_comments(self):
raise Exception('You need to install tapioca-disqus before using Disqus as comment system.')


class DjangoCommentsProvider(CommentProvider):
class DjangoCommentsProvider(CommentsProvider):

@property
def template(self):
Expand Down
Binary file added puput/locale/ar/LC_MESSAGES/django.mo
Binary file not shown.
Binary file added puput/locale/de/LC_MESSAGES/django.mo
Binary file not shown.
Binary file added puput/locale/en/LC_MESSAGES/django.mo
Binary file not shown.
Binary file added puput/locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
Binary file added puput/locale/nl/LC_MESSAGES/django.mo
Binary file not shown.
Binary file added puput/locale/pl/LC_MESSAGES/django.mo
Binary file not shown.
Binary file added puput/locale/pt_BR/LC_MESSAGES/django.mo
Binary file not shown.
Binary file added puput/locale/pt_PT/LC_MESSAGES/django.mo
Binary file not shown.
Binary file added puput/locale/ru/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit 9e41aef

Please sign in to comment.