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

Each provider must contain metadata for internal usage #621

Closed
lk-geimfari opened this issue Jan 30, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@lk-geimfari
Copy link
Owner

commented Jan 30, 2019

Each provider must contain metadata for internal usage. We currently use such data on creating a custom provider, but we need to add Meta for all providers.

It will look like this:

class MyProvider(BaseProvider):
    class Meta:
        name = 'my_provider'
    
    def hi():
        return 'Hi'

To use it in the schema and generic like this:

>>> generic.add_provider(MyProvider)
>>> generic.my_provider.hi()

Related issue: #619

@lk-geimfari lk-geimfari self-assigned this Jan 30, 2019

@lk-geimfari lk-geimfari added this to the Version 4.0.0 milestone Mar 16, 2019

@lk-geimfari

This comment has been minimized.

Copy link
Owner Author

commented Mar 17, 2019

Fixed, 8d2b7ca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.