Skip to content

Commit

Permalink
Reflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Nov 21, 2023
1 parent ebd8db0 commit 5b104e7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions docs/core-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,7 @@ def middleware(request):

# Use a factory to keep the service lazy. If the view never asks for a
# connection, we never connect -- or set a user.
container.register_local_factory(
ConnectionWithUserID,
set_user_id,
)
container.register_local_factory(ConnectionWithUserID, set_user_id)
```

Now the type name expresses the purpose of the object and it doesn't matter if there's already a non-user-aware `Connection` in the global registry.
Expand Down

0 comments on commit 5b104e7

Please sign in to comment.