This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Allow specifying a directory to host a web client from #245
Merged
erikjohnston
merged 5 commits into
release-v0.10.0
from
erikj/configurable_client_location
Aug 25, 2015
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
86cef6a
Allow specifying a directory to host a web client from
erikjohnston d9088c9
Remove dependency on matrix-angular-sdk
erikjohnston 8b52fe4
Revert previous commit. Instead, always download matrix-angular-sdk a…
erikjohnston 37403ab
Update the log message
erikjohnston d33f31d
Print the correct pip install line when failing due to lack of matrix…
erikjohnston File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,9 +97,18 @@ def build_resource_for_federation(self): | |
return JsonResource(self) | ||
|
||
def build_resource_for_web_client(self): | ||
import syweb | ||
syweb_path = os.path.dirname(syweb.__file__) | ||
webclient_path = os.path.join(syweb_path, "webclient") | ||
webclient_path = self.get_config().web_client_location | ||
if not webclient_path: | ||
try: | ||
import syweb | ||
except ImportError: | ||
quit_with_error( | ||
"Could not find a webclient. Please either install syweb\n" | ||
"or configure the location of the source to server via\n" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "source to server" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shhh |
||
"the config option `web_client_location`" | ||
) | ||
syweb_path = os.path.dirname(syweb.__file__) | ||
webclient_path = os.path.join(syweb_path, "webclient") | ||
# GZip is disabled here due to | ||
# https://twistedmatrix.com/trac/ticket/7678 | ||
# (It can stay enabled for the API resources: they call | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be "matrix-angular-sdk" rather than syweb? Should we include specific instructions on how to pip install syweb.