Skip to content

Commit

Permalink
Merge pull request #2 from adamhaney/master
Browse files Browse the repository at this point in the history
Fixing import for pip >= 10
  • Loading branch information
Nekmo authored Jun 4, 2018
2 parents 418967b + 5e31221 commit 602fdfc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions admin_auto_tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

from autofixture import AutoFixture
from django.contrib.auth import get_user_model
from django.core.urlresolvers import reverse
try:
from django.core.urlresolvers import reverse
except:
from django.urls import reverse

from django.forms import model_to_dict
from django.test import TestCase

Expand Down Expand Up @@ -139,4 +143,4 @@ class AdminTestCase(AdminTestMixIn, TestCase):

class ModelAdminTestCase(ModelAdminTestMixIn, TestCase):
pass
ModelAdminTestCase = test_base_class(ModelAdminTestCase)
ModelAdminTestCase = test_base_class(ModelAdminTestCase)
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
"""Package description
"""
from setuptools import setup, find_packages
from pip.req import parse_requirements
from distutils.util import convert_path
from fnmatch import fnmatchcase
import os
import sys
import uuid

try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements

###############################
# Configuración del paquete #
###############################
Expand Down

0 comments on commit 602fdfc

Please sign in to comment.