Skip to content

Commit

Permalink
Make django-admin-ordering a dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Feb 1, 2019
1 parent 6041214 commit ee53b6b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ matrix:
- env: REQ="https://github.com/django/django/archive/master.zip#egg=Django"
install:
- pip install -U pip wheel
- pip install $REQ FeinCMS django-mptt Pillow
- pip install $REQ FeinCMS django-admin-ordering django-mptt Pillow
- python setup.py install
script: cd tests && ./manage.py test -v2 testapp
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Change log
running linters and tests locally.
* Reformatted the project using `black
<https://black.readthedocs.io/>`__
* Made `django-admin-ordering
<https://github.com/matthiask/django-admin-ordering/>`__ a dependency.


0.12
----
Expand Down
13 changes: 2 additions & 11 deletions form_designer/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,9 @@
from django.utils.encoding import smart_text
from django.utils.translation import ugettext_lazy as _

from admin_ordering.admin import OrderableAdmin
from form_designer import models

try:
from admin_ordering.admin import OrderableAdmin

class Inline(OrderableAdmin, admin.TabularInline):
pass


except ImportError:
Inline = admin.TabularInline

if six.PY3:
UnicodeWriter = csv.writer
else:
Expand Down Expand Up @@ -146,7 +137,7 @@ def clean(self):
return data


class FormFieldAdmin(Inline):
class FormFieldAdmin(OrderableAdmin, admin.TabularInline):
extra = 0
model = models.FormField
prepopulated_fields = {"name": ("title",)}
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def read(filename):
platforms=["OS Independent"],
packages=find_packages(exclude=[]),
include_package_data=True,
install_requires=["django-admin-ordering"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ deps =
Django
Pillow
FeinCMS
django-admin-ordering
django-mptt
coverage
changedir = {toxinidir}
Expand Down

0 comments on commit ee53b6b

Please sign in to comment.