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

WL-307: correct FAVICON_PATH setting for comprehensive theming #11494

Merged
merged 1 commit into from
Feb 16, 2016

Conversation

saleem-latif
Copy link
Contributor

Hi @ziafazal , @asadiqbal08

Kindly review this PR, it contains changes for WL-307,

Description of Changes:
Comprehensive theming sets FAVICON_PATH setting to a custom favicon but the value being set is not correct.
Code here overrides FAVICON_PATH setting to the path of favicon in comprehensive theming directory.
But instead of setting a relative path of the file it sets its absolute path. e.g. for a theme named stanford-style the FAVICON_PATH setting will be overridden by the following value.
/edx/app/edxapp/edx-platform/themes/stanford-style/lms/static/images/favicon.ico
instead of
images/favicon.ico

cc: @mattdrayer

@@ -47,7 +47,7 @@ def comprehensive_theme_changes(theme_dir):

favicon = component_dir / "static" / "images" / "favicon.ico"
if favicon.isfile():
changes['settings']['FAVICON_PATH'] = str(favicon)
changes['settings']['FAVICON_PATH'] = "images/favicon.ico"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saleem-latif I think overriding FAVICON_PATH setting in comprehensive theming does not make sense at all since we already have settings.FAVICON_PATH'] = "images/favicon.ico" in env/common.py. Themed directory has precedence over default static files path so it would look for images/favicon.ico in themed directory first before falling back to default static files directory. I think we should remove this favicon logic here.

@saleem-latif
Copy link
Contributor Author

@ziafazal I have removed favicon logic, kindly take a look

@ziafazal
Copy link
Contributor

LGTM 👍

@mattdrayer
Copy link
Contributor

Is it possible to include a test with this changeset?

@saleem-latif
Copy link
Contributor Author

@mattdrayer I have added tests for change set, kindly take a look

@mattdrayer
Copy link
Contributor

LGTM! thanks very much for adding the test -- 👍

saleem-latif added a commit that referenced this pull request Feb 16, 2016
WL-307: correct FAVICON_PATH setting for comprehensive theming
@saleem-latif saleem-latif merged commit cd101d5 into master Feb 16, 2016
@saleem-latif saleem-latif deleted the saleem-latif/WL-307 branch July 27, 2016 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants