-
Notifications
You must be signed in to change notification settings - Fork 11
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
Change the the entity_type kwarg to table_name #111
Comments
Or should we change it to |
Yea that’s a very valid observation. But for the work involved I’m not sure it’s worth the effort at the moment, to change just a prefix of an existing kwarg. I have had some complaints from devs looking at this library and not understanding what “entity” represents... Maybe we should change the method name and therefore also change the Kwarg to table_name. I'm wondering if this would make more sense? edit: Current situation: we derive the Sent with GitHawk |
yes at first I also couldn't understood what @joegasewicz after your edit to the last comment. |
Ok, thats much better. Let's go with I also need to update the other public method name to |
@kousikmitra Let's go with table_name as the kwarg and register_model as the method name. |
@joegasewicz can we derive the table name from the model name? Then the user can just pass the model_name to the function and we can get the table_name from there. Since when people use Models they don't give much attention to table_name(own perspective) |
The problem is, is that we have to handle multiple models , so we have to know which model the user wants to append to Flask's global context.
|
Okay I will look into the code and will revert back to you. or we will go with the |
@kousikmitra Im going to close this issue and open a few new ones tomorrow to carry out this work, I have to go out now to play some music but will be back in the morning UK time. |
@kousikmitra I've reopened & updated this issue if you still want to work on it. |
**Release 0.0.25** - 2019-12-10 - Replaced the the `entity_type` kwarg to `table_name` in the public method `register_entity` [Issue #111](#111) - Renamed the `update_entity` public method to be called `update_token` [Issue #114](#114) - Renamed the `register_entity` public method to be called `create_token` [Issue #113](#113) - Add Models to JWTRoutes class & init_app method [Issue #119](#119)
Our API has 2 public methods, one of which is
register_entity
. This currently requires a kwarg ofentity_type
to donate the table name, which is confusing to the user.Change
register_entity
method's kwarg ofentity_type
totable_name
. This may result in updating other parts of the codebase, docs, README, blog and tests.The text was updated successfully, but these errors were encountered: