Skip to content

Commit

Permalink
Add django>=1.11 to requirements
Browse files Browse the repository at this point in the history
Update CI config
Remove doc build support
Add sorting guidance for 3rd-party app imports
Improve documentation markup
  • Loading branch information
grahamu committed Jan 17, 2018
1 parent 5f5c2b7 commit dcbc382
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 34 deletions.
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ common: &common
- restore_cache:
keys:
- v2-deps-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
- v2-deps-
- run:
name: install dependencies
command: pip install --user tox
Expand Down Expand Up @@ -35,7 +34,7 @@ jobs:
lint:
<<: *common
docker:
- image: circleci/python:3.6.1
- image: circleci/python:3.6
environment:
- TOXENV=checkqa
- UPLOAD_COVERAGE=0
Expand Down
3 changes: 2 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Patrick Altman
Brian Rosner
Brian Rosner
Katherine “Kati” Michel
Graham Ullrich
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
all: init docs test
all: init test

init:
python setup.py develop
pip install detox coverage mkdocs
pip install detox coverage

test:
coverage erase
detox
coverage html

docs:
mkdocs build

.PHONY: docs
29 changes: 22 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,26 @@ Django \ Python | 2.7 | 3.4 | 3.5 | 3.6

To install pinax-events:

pip install pinax-events
```commandline
$ pip install pinax-events
```

Add `pinax-events` to your `INSTALLED_APPS` setting:

```python
INSTALLED_APPS = (
...
INSTALLED_APPS = [
# other apps
"imagekit",
"pinax.events",
...
)
]
```

You will need either `PIL` or `Pillow` installed for `imagekit` to work. We
recommend `Pillow`:

pip install Pillow
```commandline
$ pip install Pillow
```

### Settings

Expand All @@ -93,15 +96,19 @@ In your template where you want to display events:

First, load the template tags:

```djangotemplate
{% load pinax_events_tags %}
```

Then:

```djangotemplate
{% events as event_items %}
```

And here is an example that how you can show the events:

```html
```djangotemplate
<section class="event-list">
{% for event in event_items %}
<article class="event" style="{% if event.secondary_image_thumb %}background-image:url({% static event.secondary_image_thumb.url %});{% endif %}">
Expand Down Expand Up @@ -136,6 +143,14 @@ Add and manage events via the Django admin.

## Change Log

### 2.0.3

* Add django>=1.11 to requirements
* Update CI config
* Remove doc build support
* Add sorting guidance for 3rd-party app imports
* Improve documentation markup

### 2.0.2

* fix setup.py LONG_DESCRIPTION for PyPi
Expand Down
9 changes: 0 additions & 9 deletions mkdocs.yml

This file was deleted.

1 change: 0 additions & 1 deletion runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"pinax.events",
"pinax.events.tests"
],
MIDDLEWARE_CLASSES=[],
DATABASES={
"default": {
"ENGINE": "django.db.backends.sqlite3",
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from setuptools import find_packages, setup

VERSION = "2.0.3"
LONG_DESCRIPTION = """
.. image:: http://pinaxproject.com/pinax-design/patches/pinax-events.svg
:target: https://pypi.python.org/pypi/pinax-events/
Expand Down Expand Up @@ -54,7 +55,7 @@
description="a simple app for publishing events on your site",
name="pinax-events",
long_description=LONG_DESCRIPTION,
version="2.0.2",
version=VERSION,
url="http://github.com/pinax/pinax-events/",
license="MIT",
packages=find_packages(),
Expand All @@ -66,8 +67,9 @@
"Pillow"
],
install_requires=[
"django>=1.11",
"django-imagekit>=3.3",
"Markdown>=2.6.6"
"Markdown>=2.6.6",
],
classifiers=[
"Development Status :: 5 - Production/Stable",
Expand Down
10 changes: 5 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
ignore = E265,E501
max-line-length = 100
max-complexity = 10
exclude = pinax/events/migrations/*
exclude = **/*/migrations/*
inline-quotes = double

[isort]
multi_line_output=3
known_django=django
known_third_party=pinax
known_third_party=imagekit,markdown,pinax
sections=FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
skip_glob=*/pinax/events/migrations/*
skip_glob=**/*/migrations/*

[coverage:run]
source = pinax
omit = pinax/events/conf.py,pinax/events/tests/*,pinax/events/migrations/*
omit = **/*/conf.py,**/*/tests/*,**/*/migrations/*
branch = true
data_file = .coverage

[coverage:report]
omit = pinax/events/conf.py,pinax/events/tests/*,pinax/events/migrations/*
omit = **/*/conf.py,**/*/tests/*,**/*/migrations/*
exclude_lines =
coverage: omit
show_missing = True
Expand Down

0 comments on commit dcbc382

Please sign in to comment.