Commit Graph

49 Commits

Author SHA1 Message Date
Matt Tuchfarber
486f9578b7 Merge pull request #16856 from open-craft/mtyaka/template-block-overrides
Allow theme template block overrides.
2017-12-22 09:14:02 -05:00
Chandrakant Gopalan
f6f29ca49e Allow theme template block overrides.
This allows an overridding template from a theme to inherit from the
same corresponding standard template.

This is useful when you only want to override one or more named blocks,
but otherwise make no modifications to the standard template.
2017-12-22 09:41:35 +01:00
Hasnain
1af7ee7433 WL-1282 | Created management command for automation of theme setup. 2017-12-14 17:24:39 +05:00
Jeremy Bowman
da8cf6b528 PLAT-1382 Populate ALLOWED_HOSTS for tests 2017-12-05 14:22:30 -05:00
Jeremy Bowman
103c723c6d PLAT-1801 Preserve new user login behavior under Django 1.10+ 2017-12-05 10:20:25 -05:00
Eric Fischer
2e3f871c12 Memoize common lookups during request
Prevents repeated memcached lookups on functions whose values should
remain static for the lifetime of a request.

EDUCATOR-1731
2017-12-04 11:54:50 -05:00
Jesse Zoldak
9c49c10b27 Revert "Allow theme template block override" 2017-11-30 17:09:13 -05:00
Uman Shahzad
37844fd927 Merge pull request #15947 from open-craft/allow-theme-template-block-override
Allow theme template block override
2017-11-29 22:25:27 +05:00
Ned Batchelder
a2e2aace82 Merge pull request #16650 from edx/nedbat/fix-unused-imports
Fix a number of unused-import pylint violations
2017-11-22 11:17:07 -05:00
Ned Batchelder
e23e3a0486 Fix a number of unused-import pylint violations 2017-11-21 19:57:06 -05:00
bmedx
048b609f87 Fix Django 1.11 startup 2017-11-21 11:58:38 -05:00
David Ormsbee
b03369579b Merge pull request #16477 from edx/ormsbee/consolidate_theme_js
Remove collection of JS bundles for themes.
2017-11-16 03:10:15 -05:00
David Ormsbee
255dc79254 Remove collection of JS bundles for themes.
Comprehensive themes used to allow you to override JS within one of the
bundles created for Studio and LMS (specified in the common.py env
files). So for instance, the bundle that becomes lms-base-application.js
is defined like this:

base_application_js = [
    'js/src/utility.js',
    'js/src/logger.js',
    'js/user_dropdown_v1.js',
    'js/dialog_tab_controls.js',
    'js/src/string_utils.js',
    'js/form.ext.js',
    'js/src/ie_shim.js',
    'js/src/accessibility_tools.js',
    'js/toggle_login_modal.js',
    'js/src/lang_edx.js',
]

You could not add a custom file to this list in your theme, but if you
created a themes/mytheme/lms/static/js/dialog_tab_controls.js, then your
theme's version of that file would be wrapped into the bundle, which
would be created at {staticfiles}/mytheme/js/lms-base-application.js

It doesn't appear that this functionality has seen much use in practice,
and it adds minutes to the compile time for sites compiling multiple
themes, so this commit removes this capability. It is still possible to
create and invoke custom JavaScript that is theme specific, and will
compile out to {staticfiles}/mytheme/js -- it's just not possible to
override a file that becomes part of the standard Studio/LMS bundles.
2017-11-15 13:29:30 -05:00
Gabe Mulley
b6e12224c6 move helper function to theming helpers 2017-11-15 12:58:09 -05:00
Troy Sankey
d11d7554c3 Move theming settings validation registration into ready method
This avoids premature registration of django checks which could break
django 1.11 startup.
2017-11-03 12:23:54 -04:00
John Eskew
b866f35620 Remove support for COMPREHENSIVE_THEME_DIR -
all dirs must now go into COMPREHENSIVE_THEME_DIRS.
Move comprehensive theming setup section out of startup.py and into
  settings files using new 'derived' functionality.
Add 'derive_settings' at the end of all top-level Django settings files.
Move validation of comprehensive theming settings into new apps.py
  theming file.
Split theming code into code safe to run before settings are initialized
  -and- after settings are initialized.
2017-10-30 14:36:06 -04:00
Andy Armstrong
ae1c760ea4 Use Bootstrap theme colors and fonts in old stylesheets
LEARNER-2977

Fixes
2017-10-29 22:22:08 -04:00
Chandrakant Gopalan
96e704e47c Allow theme template block override 2017-09-11 21:42:25 -04:00
Andy Armstrong
94add3a49f Provide a first class Open edX theme
LEARNER-2513
2017-09-07 13:44:02 -04:00
Andy Armstrong
0f808cec78 Implement theme admin UI to support previewing
LEARNER-2017
2017-07-27 17:24:31 -04:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Clinton Blackburn
9ab93d1fe2 Disabled system checks for the compile_sass management command
The system checks require database access, which is not available when building Docker images. This relaxes the check, allowing the command to execute without a database.

ECOM-6634
2017-01-23 23:47:17 -05:00
J. Cliff Dyer
f33832a691 scoutrule: dedupe skip_unless_lms 2017-01-18 09:43:46 -05:00
noraiz-anwar
d632fa8672 removed bug related to theme assets 2016-11-29 14:25:59 +05:00
Hasnain
a29a2d4dbb Wl-613 | Removing the example theme. 2016-11-09 06:51:50 +00:00
Asad Iqbal
0b7ec75a3f Merge pull request #13492 from edx/asadiqbal08/WL-603-edx
WL-603 load locale paths for themes directories
2016-09-22 16:28:19 +05:00
asadiqbal
2833d1e9a5 WL-603 load locale paths for themes directories 2016-09-22 13:26:11 +05:00
Saleem Latif
b3def09383 check settings.DEFAULT_SITE_THEME to be not None before applying default theme 2016-09-19 12:57:50 +05:00
Saleem Latif
f974347dcb Update theming to have priority over microsites. 2016-09-01 14:57:52 +05:00
hasnain naveed
72581a08ce WL-474 | theme boilerplate 2016-08-19 09:18:52 -04:00
Ned Batchelder
8b1978ba6c Fix unused-import errors 2016-08-03 12:44:41 -04:00
Saleem Latif
6277bd27e6 Remove all usages of USE_CUSTOM_THEME and THEME_NAME from python files 2016-07-27 14:53:02 +05:00
Saleem Latif
8ae92901ef 1. Merge microsites into Comprehensive Theming
2. Add site configuration overrides to theming/helpers.py
3. Move microsite.get_value from theming/helpers to site_configuration/helpers
4. Move microsite_configuration.microsite.get_value usages to site_configuration.helpers.values
2016-07-27 13:55:14 +05:00
unawaz
5f8bb35f9d Account settings page
unawaz/ECOM-4787-account-settings-page-header
2016-07-20 20:18:53 +05:00
Saleem Latif
5ccc80b42f Fix footer test failures 2016-07-03 00:11:45 +05:00
Matt Drayer
68312bdd2d Revert "Revert "saleem-latif/WL-328: Multi-Site Comprehensive Theming""
2. Update COMPREHNSIVE_THEME_DIR to COMPREHENSIVE_THEME_DIRS
3. Update paver commands to support multi theme dirs
4. Updating template loaders
5. Add ENABLE_COMPREHENSIVE_THEMING flag to enable or disable theming via settings
6. Update tests
7. Add backward compatibility for COMPREHEHNSIVE_THEME_DIR
2016-06-30 15:19:51 +05:00
Michael Frey
6efc461fb6 mjfrey/micro-settings-merge: Override base dictionary keys with microsite configuration keys
* mattdrayer: Add helpers.get_value test
* mattdrayer: Change to simpler implementation, per @douglashall
* mattdrayer: Address quality violations and test failures
2016-06-21 23:28:36 -04:00
Hasnain
11454640da Added middleware to redirect the user from expired course page to all courses page. 2016-06-01 14:56:27 -04:00
Saleem Latif
75f17ecc8e correct FAVICON_PATH setting for comprehensive theming 2016-02-15 17:13:19 +05:00
Zia Fazal
06e38e1c24 added branding to 404 and 500 error pages
changes based on feedback

renamed a definition and added test coverage

fixed broken tests
2016-01-29 15:46:51 +05:00
Matjaz Gregoric
3259df5412 Merge pull request #11315 from open-craft/comprehensive-theme-on-django-templates
Make comprehensive theme work with django templates.
2016-01-29 08:17:23 +01:00
Matjaz Gregoric
9b89bd3245 Make comprehensive theme work with django templates.
Comprehensive theming did not work with django templates (used by course wiki).

The reason it didn't work was that in order for the theme to work, theme template folder
has to be added to django template dirs setting *before* django startup.
After django startup, modifying `settings.DEFAULT_TEMPLATE_ENGINE['DIRS']` has no effect,
because at that point the template engine is already initialized with a copy of the
template dirs list.

Instead of running the theme startup code as an autostartup hook, we manually run it
*before* `django.setup()`. This is fine because theme startup code doesn't have to do
anything else besides modifying some settings and doesn't actually need django to be
initialized.
2016-01-25 08:45:52 +01:00
Zia Fazal
c0648ab164 moved IS_EDX_DOMAIN dependent feature to edx.org theme 2016-01-22 15:32:19 -05:00
Saleem Latif
2d83449240 Remove microsite_configuration/microsite.py references from individual templates
* mattdrayer: Updated get_themed_template_path
2016-01-22 14:27:58 -05:00
Saleem Latif
6c8c67cad5 Remove microsite_configuration/templatetags/microsite.py references from individual templates. 2016-01-20 14:36:07 +05:00
David Baumgold
58daa365cd re-enable edx.org comprehensive theme 2015-12-03 17:18:55 -05:00
Usman Khalid
6cb62f2697 Rebase upgrade Django to v1.8.5
Please note that this is a squshed commit and the work of:
Symbolist, macdiesel, nedbat, doctoryes, muzaffaryousaf and muhammad-ammar
2015-11-10 15:00:19 -05:00
Ned Batchelder
5d64f9a80b Minor changes, responding to pull request comments 2015-09-17 15:39:03 -04:00
David Baumgold
6ebf2515f4 Comprehensive theming
This is a squash of 38 commits ending with
5b080f979d692804452400ac5bed9b17c50b001e
2015-09-17 15:39:03 -04:00