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

Documentation is hard to understand #380

Open
mark0978 opened this issue Apr 27, 2017 · 4 comments
Open

Documentation is hard to understand #380

mark0978 opened this issue Apr 27, 2017 · 4 comments
Assignees
Labels

Comments

@mark0978
Copy link

classmethod _after_postgeneration(cls, obj, create, results=None)
Parameters:	
obj (object) – The object just generated
create (bool) – Whether the object was ‘built’ or ‘created’
results (dict) – Map of post-generation declaration name to call result
The _after_postgeneration() is called once post-generation declarations have been handled.

Its arguments allow to handle specifically some post-generation return values, for instance.

The circular loop in some of the docs makes it very hard to know how to customize factory boy. I'm sure in your mind it is all crystal clear and easily understood, but this kind of documentation just doesn't help.

I think part of the problem is I've never seen a good pipe line of factory boy model generation anywhere. so know what postgeneration is and after_postgeneration is really doesn't make sense to me.

Maybe I'm just stupid, or maybe the docs need to assume less of the reader.

@rbarrois
Copy link
Member

@mark0978 That's a good point; great docs are very hard to write.

A good starting point from us would be an example of what you'd consider "good documentation" for these features: should we add more context? provide an example project? a howto section?

@rbarrois rbarrois added the Doc label Jul 30, 2017
@mark0978
Copy link
Author

How about the overview of these two pages. Where they backup a few setps from the code to give the feel of what is going on?
https://docs.djangoproject.com/en/1.11/topics/http/views/
https://docs.djangoproject.com/en/1.11/topics/http/middleware/

By trial and error I have managed to get some more advanced things to work, but it really involved stepping thru the code in a debugger vs knowing what to expect and being able to write to that. There are some things that I'm not sure I have found the "right" way of doing it, but they work for me, so that is enough.

@rbarrois
Copy link
Member

rbarrois commented Aug 1, 2017

@mark0978 I've started work on this topic in a dedicated branch; would you mind providing some feedback on that? https://github.com/FactoryBoy/factory_boy/blob/cb92aa4d582f9a22a5e40ed757d203b35b6605c0/docs/walkthrough.rst

Thanks!

@rbarrois rbarrois self-assigned this Aug 1, 2017
@mark0978
Copy link
Author

mark0978 commented Aug 1, 2017 via email

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

No branches or pull requests

2 participants