Skip to content

Commit b88c11c

Browse files
authored
Addon code alignments (#58)
* added cleaned up files * added isort * added missing import
1 parent e7349d8 commit b88c11c

19 files changed

+136
-27
lines changed

.gitignore

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
1-
*.pyc
1+
*.py[cod]
2+
*$py.class
23
*.egg-info
4+
*.log
5+
*.pot
36
.DS_Store
7+
.coverage/
8+
.eggs/
49
.idea/
10+
.project/
11+
.pydevproject/
12+
.settings/
513
.tox/
6-
.eggs/
7-
dist/
14+
__pycache__/
815
build/
16+
dist/
17+
env/
18+
19+
/~
20+
/node_modules
21+
.sass-cache
22+
*.css.map
23+
npm-debug.log
24+
package-lock.json
25+
26+
local.sqlite

.travis.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,28 @@ matrix:
66
include:
77
- python: 3.5
88
env: TOX_ENV='flake8'
9-
# Django 1.11
9+
- python: 3.5
10+
env: TOX_ENV='isort'
11+
# Django 1.11
1012
- python: 2.7
1113
env: DJANGO='dj111' CMS='cms34'
12-
- python: 3.5
14+
- python: 3.4
1315
env: DJANGO='dj111' CMS='cms35'
1416
- python: 3.5
1517
env: DJANGO='dj111' CMS='cms36'
1618
# Django 2.0
1719
- python: 3.5
1820
env: DJANGO='dj20' CMS='cms36'
1921
# Django 2.1
20-
- python: 3.5
22+
- python: 3.6
2123
env: DJANGO='dj21' CMS='cms36'
2224

2325
install:
24-
- pip install tox coverage
26+
- pip install coverage isort tox
2527
- "if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then export PY_VER=py27; fi"
28+
- "if [[ $TRAVIS_PYTHON_VERSION == '3.4' ]]; then export PY_VER=py34; fi"
2629
- "if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then export PY_VER=py35; fi"
30+
- "if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then export PY_VER=py36; fi"
2731
- "if [[ ${DJANGO}z != 'z' ]]; then export TOX_ENV=$PY_VER-$DJANGO-$CMS; fi"
2832

2933
script:

CHANGELOG.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
Changelog
33
=========
44

5+
56
2.1.1 (unreleased)
67
==================
78

8-
* Fixed test matrix
9+
* Extended test matrix
10+
* Added isort and adapted imports
11+
* Adapted code base to align with other supported addons
912
* Exclude ``tests`` folder from release build
1013

1114

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ include LICENSE.txt
22
include README.rst
33
recursive-include djangocms_snippet/locale *
44
recursive-include djangocms_snippet/templates *
5-
recursive-exclude * *.pyc
5+
recursive-exclude * *.py[co]

README.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
django CMS Snippet
33
==================
44

5-
65
|pypi| |build| |coverage|
76

87

@@ -33,6 +32,10 @@ feedback in the form of issues and pull requests. Before submitting your
3332
pull request, please review our `contribution guidelines
3433
<http://docs.django-cms.org/en/latest/contributing/index.html>`_.
3534

35+
We're grateful to all contributors who have helped create and maintain this package.
36+
Contributors are listed at the `contributors <https://github.com/divio/djangocms-snippet/graphs/contributors>`_
37+
section.
38+
3639
One of the easiest contributions you can make is helping to translate this addon on
3740
`Transifex <https://www.transifex.com/projects/p/djangocms-snippet/>`_.
3841

@@ -43,8 +46,7 @@ Documentation
4346
See ``REQUIREMENTS`` in the `setup.py <https://github.com/divio/djangocms-snippet/blob/master/setup.py>`_
4447
file for additional dependencies:
4548

46-
* Python 2.7, 3.4 or higher
47-
* Django 1.11 or higher
49+
|python| |django| |djangocms|
4850

4951

5052
Installation
@@ -112,3 +114,10 @@ You can run tests by executing::
112114
:target: https://travis-ci.org/divio/djangocms-snippet
113115
.. |coverage| image:: https://codecov.io/gh/divio/djangocms-snippet/branch/master/graph/badge.svg
114116
:target: https://codecov.io/gh/divio/djangocms-snippet
117+
118+
.. |python| image:: https://img.shields.io/badge/python-2.7%20%7C%203.4+-blue.svg
119+
:target: https://pypi.org/project/djangocms-snippet/
120+
.. |django| image:: https://img.shields.io/badge/django-1.11%20%7C%202.0%20%7C%202.1-blue.svg
121+
:target: https://www.djangoproject.com/
122+
.. |djangocms| image:: https://img.shields.io/badge/django%20CMS-3.4%2B-blue.svg
123+
:target: https://www.django-cms.org/

djangocms_snippet/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
2-
from django.contrib import admin
32
from django.conf import settings
3+
from django.contrib import admin
44
from django.db import models
55
from django.forms import Textarea
66

djangocms_snippet/migrations/0001_initial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from __future__ import unicode_literals
33

44
import django.db.models.deletion
5-
from django.db import models, migrations
5+
from django.db import migrations, models
66

77

88
class Migration(migrations.Migration):

djangocms_snippet/migrations/0002_snippet_slug.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import unicode_literals
33

4-
from django.db import models, migrations
4+
from django.db import migrations, models
55

66

77
class Migration(migrations.Migration):

djangocms_snippet/migrations/0003_auto_data_fill_slug.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import unicode_literals
3+
34
from collections import Counter
45

5-
from django.db import models, migrations
6+
from django.db import migrations, models
67
from django.utils.text import slugify
78

89

djangocms_snippet/migrations/0004_auto_alter_slug_unique.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import unicode_literals
33

4-
from django.db import models, migrations
4+
from django.db import migrations, models
55

66

77
class Migration(migrations.Migration):

0 commit comments

Comments
 (0)