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

any way to generate fake user data to populate test database? #88

Open
kevinmachstudio opened this issue Nov 14, 2020 · 3 comments
Open

Comments

@kevinmachstudio
Copy link

kevinmachstudio commented Nov 14, 2020

Is there an example of how django-seed can generate fake users to populate test database?

I have a django app called trainers in which I implement login / logout API's, and inside this app I created a serializer for the User model imported from django.contrib.auth.models

When I ran python manage.py seed trainers --number=15, I get django_seed.exceptions.SeederException: No classed found. Did you add entities to the Seeder? Is there an entity step I'm missing to be able to generate data for Django's User model? If so, how would one go about adding this entity to the Seeder?

@deepakmishra
Copy link

@kevinmachstudio did you find anyway to seed auth.User model?

@AngelOnFira
Copy link
Collaborator

@kevinmachstudio Can you post some more information about the trainers app? Seeing the models file would be helpful.

@GomesMarcos
Copy link

I got it with:
./manage.py seed manager --number=100 --seeder "User.is_staff" 0 but I don't know yet how to set other fields using CLI.

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

4 participants