Skip to content

How does context in relation to django-components work? #226

Answered by JuroOravec
timothyis asked this question in Q&A
Discussion options

You must be logged in to vote

For anyone who comes across this thread, this has now been revamped in v0.70 (preferably use v0.72 or higher)

We now support both of the approaches above, as described by @timothyis and @EmilStenstrom.

For @timothyis's approach, in Django settings, set:

COMPONENTS = {
	"context_behavior": "isolated",
}

For @EmilStenstrom's approach, in Django settings, set:

COMPONENTS = {
	"context_behavior": "django",
}

For more info, see https://github.com/EmilStenstrom/django-components/blob/085c60a8c96442d9fd4f72d66a7eb295e7cfb2d9/README.md#context-behavior

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
9 replies
@timothyis
Comment options

@EmilStenstrom
Comment options

@timothyis
Comment options

@EmilStenstrom
Comment options

@timothyis
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by JuroOravec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants