Skip to content

Commit

Permalink
Update requirements and tox to fit django 2; few code fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberbudy committed Apr 14, 2018
1 parent 5712bc0 commit 7ae8509
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions report_builder/tests/test_utils.py
Expand Up @@ -18,7 +18,7 @@ def test_a_initial_rel_field_name(self):
correct
"""
field_name = (
Waiter.restaurant.field.rel.name
Waiter.restaurant.field.rel.field_name
if hasattr(Waiter.restaurant.field, 'rel')
else Waiter.restaurant.field.target_field.name
)
Expand All @@ -37,7 +37,7 @@ def test_get_relation_fields_from_model_does_not_change_field_name(self):
"""
get_relation_fields_from_model(Restaurant)
field_name = (
Waiter.restaurant.field.rel.name
Waiter.restaurant.field.rel.field_name
if hasattr(Waiter.restaurant.field, 'rel')
else Waiter.restaurant.field.target_field.name
)
Expand Down
9 changes: 5 additions & 4 deletions report_builder_demo/urls.py
@@ -1,14 +1,15 @@
from django.urls import path, include
from django.conf.urls import url, include

from django.conf import settings
from django.conf.urls.static import static

from django.contrib import admin
admin.autodiscover()

urlpatterns = [
path('admin/', admin.site.urls),
path('report_builder/', include('report_builder_scheduled.urls')),
path('report_builder/', include('report_builder.urls')),
url(r'^admin/', admin.site.urls),
url(r'^report_builder/', include('report_builder_scheduled.urls')),
url(r'^report_builder/', include('report_builder.urls')),
]
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
6 changes: 3 additions & 3 deletions requirements.txt
Expand Up @@ -5,10 +5,10 @@ Werkzeug
ipdb
celery[redis]
flake8
django-money==0.11
django-money==0.13.1
djangorestframework==3.8.2
django_celery_beat==1.0.1
coverage==4.4.1
django_celery_beat==1.1.1
coverage==4.5.1
tox
model_mommy
freezegun
Expand Down
7 changes: 3 additions & 4 deletions tox.ini
@@ -1,14 +1,13 @@
[tox]
toxworkdir={env:TOX_WORK_DIR:.tox}
envlist = py{36}-django{18,110,111}
envlist = py{36}-django{111,20}

[testenv]
passenv = *
install_command = pip install {opts} {packages}
deps =
django18: django>=1.8,<1.9
django110: django>=1.10,<1.11
django111: django>=1.11,<1.12
django20: django>=2.0,<2.1
-r{toxinidir}/requirements.txt
commands =
{envpython} {toxinidir}/manage.py test --noinput
{envpython} {toxinidir}/manage.py test --noinput

0 comments on commit 7ae8509

Please sign in to comment.