joke2k / django-faker

Django-faker uses fake-factory to generate test data for Django models and templates
MIT License
245 stars 48 forks source link

Feature/fix install #29

Open rosscdh opened 6 years ago

rosscdh commented 6 years ago

hi thanks for the great project(s)!

found a small issue with this project;

if the user has not got django installed yet. django-faker will fail also pip install django django-faker will not succeed.

 pip install django django-faker
Collecting django
  Downloading https://files.pythonhosted.org/packages/25/4d/c8228419346a0e84aec202a43e181afc6572b861d38f8a0306dbce6abef0/Django-1.11.13-py2.py3-none-any.whl (6.9MB)
    100% |████████████████████████████████| 7.0MB 3.1MB/s
Collecting django-faker
  Downloading https://files.pythonhosted.org/packages/01/5a/c901e3cbdee2355d37ae74aeeaec15750756e35c62d44a233cc89486dcd8/django-faker-0.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/zz/whp5pkgj495b36b65d8k9wydzzk2rp/T/pip-install-sB9oPL/django-faker/setup.py", line 17, in <module>
        version=__import__('django_faker').__version__,
      File "django_faker/__init__.py", line 6, in <module>
        from django.conf import settings
    ImportError: No module named django.conf

in order to fix this. I've

  1. moved version into version.py
  2. modified the setup.py to import from there.