We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using
get_next_value("orders", initial_value=100, reset_value=500)
I can easily tell what this function does and what values to expect, but if this sequence name was used in multiple files as
get_next_value("orders")
it wouldn't be obvious or it would be hard to figure out what the initial_value or the rest_value is.
initial_value
rest_value
My proposal is doing one of:
orders_sequence = DjangoSequence("orders", initial_value=100, reset_value=500) get_next_value(orders_sequence)
class DjangoSequences: ORDERS = DjangoSequence("orders", initial_value=100, reset_value=500) get_next_value(DjangoSequences.ORDERS)
My current usage is like the following:
orders_sequence = {"sequence_name": "orders", "initial_value": 100, "reset_value": 500} get_next_value(**orders_sequence)
The text was updated successfully, but these errors were encountered:
Search for "object-oriented API" in the README. I believe that it does what you want. If not, could you clarify why it doesn't?
Sorry, something went wrong.
Yes this is what I was looking for, I thought it was something else. I will give it a try. Thanks a lot.
No branches or pull requests
When using
I can easily tell what this function does and what values to expect, but if this sequence name was used in multiple files as
it wouldn't be obvious or it would be hard to figure out what the
initial_value
or therest_value
is.My proposal is doing one of:
My current usage is like the following:
The text was updated successfully, but these errors were encountered: