Skip to content

view_to_iframe component #188

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

Merged
merged 29 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7938867
`view_to_iframe` component
Archmonger Sep 19, 2023
0ab5822
add changelog
Archmonger Sep 19, 2023
40b846f
Merge remote-tracking branch 'upstream/main' into view-to-iframe
Archmonger Sep 21, 2023
79462f9
functional view_to_iframe
Archmonger Sep 22, 2023
68e15a0
ViewToIframeConstructor type
Archmonger Sep 22, 2023
46dc39e
temporarily remove section index plugin
Archmonger Sep 22, 2023
b508589
better API
Archmonger Sep 23, 2023
afe31ac
update docs
Archmonger Sep 23, 2023
1b46664
Auto height and width
Archmonger Sep 23, 2023
38799ce
interface docs
Archmonger Sep 23, 2023
b45f7a9
register_iframe function
Archmonger Sep 24, 2023
8ac3415
move error tests to their own URL
Archmonger Sep 24, 2023
89af32d
reorganize and fix type hints
Archmonger Sep 24, 2023
b296774
update component docs
Archmonger Sep 24, 2023
e8e8455
misc docs tweaks
Archmonger Sep 24, 2023
614b863
add test for ComponentNotRegisteredError
Archmonger Sep 24, 2023
b3f2548
misc doc tweaks
Archmonger Sep 24, 2023
9bb8dda
Register Iframe docs
Archmonger Sep 24, 2023
c55ee3b
add interface utils.md
Archmonger Sep 24, 2023
63e6c98
more obvious error
Archmonger Sep 24, 2023
39171d0
ViewNotRegisteredError and ViewDoesNotExistError
Archmonger Sep 24, 2023
2b66156
clean up register component example
Archmonger Sep 24, 2023
376f7b7
remove dead types
Archmonger Sep 24, 2023
0eb6e90
misc docs tweaks
Archmonger Sep 24, 2023
b52a400
remove thread sensitive
Archmonger Sep 24, 2023
ea067e0
Use .as_view() for CBVs
Archmonger Sep 24, 2023
cad5720
update changelog
Archmonger Sep 24, 2023
b702eea
fix broken example
Archmonger Sep 25, 2023
bf768e0
revert proper docs tests while `reactpy.html` type hints suck
Archmonger Sep 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove thread sensitive
  • Loading branch information
Archmonger committed Sep 24, 2023
commit b52a40094877552594190835397b56b763daf3f0
4 changes: 1 addition & 3 deletions src/reactpy_django/websocket/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ async def disconnect(self, code: int) -> None:
if self.component_session:
# Clean up expired component sessions
try:
await database_sync_to_async(
delete_expired_sessions, thread_sensitive=False
)()
await database_sync_to_async(delete_expired_sessions)()
except Exception:
await asyncio.to_thread(
_logger.exception,
Expand Down
6 changes: 3 additions & 3 deletions tests/test_app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def get(self, request, *args, **kwargs):

class ViewToComponentAsyncClass(View):
async def get(self, request, *args, **kwargs):
return await database_sync_to_async(render, thread_sensitive=False)(
return await database_sync_to_async(render)(
request,
"view_to_component.html",
{"test_name": self.__class__.__name__},
Expand All @@ -96,7 +96,7 @@ def view_to_component_sync_func_compatibility(request):


async def view_to_component_async_func_compatibility(request):
return await database_sync_to_async(render, thread_sensitive=False)(
return await database_sync_to_async(render)(
request,
"view_to_component.html",
{"test_name": inspect.currentframe().f_code.co_name}, # type:ignore
Expand All @@ -114,7 +114,7 @@ def get(self, request, *args, **kwargs):

class ViewToComponentAsyncClassCompatibility(View):
async def get(self, request, *args, **kwargs):
return await database_sync_to_async(render, thread_sensitive=False)(
return await database_sync_to_async(render)(
request,
"view_to_component.html",
{"test_name": self.__class__.__name__},
Expand Down