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

Passing CRUD now optional, Custom updated_at Column name #17

Merged
merged 6 commits into from
Feb 11, 2024
Merged

Conversation

igorbenav
Copy link
Owner

@igorbenav igorbenav commented Feb 11, 2024

Passing CRUD now optional, Custom updated_at Column name

Added

  • custom updated_at column name
  • passing crud to crud_router and EndpointCreator now optional
  • exceptions in http_exceptions now also in exceptions module

Detailed


Passing custom updated_at column

You can also customize your `updated_at` column:

```python hl_lines="9"
app.include_router(endpoint_creator(
    session=async_session,
    model=MyModel,
    create_schema=CreateMyModelSchema,
    update_schema=UpdateMyModelSchema,
    delete_schema=DeleteMyModelSchema,
    path="/mymodel",
    tags=["MyModel"],
    updated_at_column='date_updated'
))

@igorbenav igorbenav added the enhancement New feature or request label Feb 11, 2024
@igorbenav igorbenav self-assigned this Feb 11, 2024
@igorbenav igorbenav merged commit 648b0bd into main Feb 11, 2024
10 checks passed
@igorbenav igorbenav deleted the updates branch February 11, 2024 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant