Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For foreignkey fields get error with 'rel' attribute #27

Open
clikman007 opened this issue Feb 7, 2018 · 1 comment
Open

For foreignkey fields get error with 'rel' attribute #27

clikman007 opened this issue Feb 7, 2018 · 1 comment

Comments

@clikman007
Copy link

clikman007 commented Feb 7, 2018

Use djnago 2.0, rel attr depricated since version 1.9

$ populator.addEntity(Patient, 2)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/user/www/virt_env/lib/python3.5/site-packages/django_faker/populator.py", line 138, in addEntity
    model.fieldFormatters = model.guessFieldFormatters( self.generator )
  File "/home/user/www/virt_env/lib/python3.5/site-packages/django_faker/populator.py", line 65, in guessFieldFormatters
    relatedModel = field.rel.to
AttributeError: 'ForeignKey' object has no attribute 'rel'
@david-wizzili
Copy link

I've fixed this in a separate branch for now (https://github.com/david-wizzili/django-faker)

@joke2k , please feel free to pull what's there if it's OK with you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants