Commit Graph

334 Commits

Author SHA1 Message Date
Nate Hardison
1001b315a3 Preprocess assets as Django management command
Rather than directly invoke command-line Python (and Mako) from the
assets Rakefile, or call an external Python script, use a Django
management command to preprocess all asset template files.

An "asset template file" is defined as a static asset file with a
file extension indicating that it needs to be run through a template
engine prior to Sass/CoffeeScript compilation or packaging with other
assets. The preprocess_assets management command will look through
all of the files listed in the `STATICFILES_DIRS`, preprocessing each
as needed. Preprocessing strips off the special template file
extension, creating a new file in the process.

Currently, the only variable accessible in an asset template file is
the `THEME_NAME`, defined in the settings.
2013-06-03 09:58:01 -07:00
Peter Fogg
6eeb12ad1c Add Lettuce tests for autoplay in Studio. 2013-05-30 11:34:15 -04:00
Chris Dodge
3fceb46953 Merge branch 'master' of github.com:edx/edx-platform into feature/cdodge/autoprovision-forums-master 2013-05-22 20:44:22 -04:00
Jason Bau
ce2cbb74a1 Merge pull request #2104 from edx/edx-West/enable-django-admin-site
add MITX Feature setting to enable django admin site
2013-05-22 12:43:45 -07:00
Nate Hardison
ea3506d2b9 Add general theming capabilities
This commit adds the requisite settings and startup features to
enable integration of themes into the edX platform. It does not
yet provide hooks in any of the templates, but it does cause the
main `lms/static/sass/application.scss` file to `@import` a theme's
base Sass. Template hooks will come down the road.

CHANGELOG
---------
Define a new `MITX_FEATURE`, `USE_CUSTOM_THEME`, that when enabled,
can be used in templates to determine whether or not custom theme
templates should be used instead of the defaults.

Also define a new setting, `THEME_NAME`, which will be used to
locate theme-specific files. Establish the convention that themes
will be stored outside of the `REPO_ROOT`, inside the `ENV_ROOT`,
in a directory named `themes/`. `themes/<THEME_NAME>` will store
the files for a particular theme.

Provide a function, `enable_theme`, that modifies the template and
static asset load paths appropriately to include the theme's files.

Move the main LMS Sass file to a Mako template that conditionally
`@import`s the theme's base Sass file when a theme is enabled.

Add logic to the assets Rakefile to properly preprocess any Sass/
Mako templates before compiling them.
2013-05-22 12:22:27 -07:00
Jason Bau
5fc8469a81 add example in lms/envs/common.py 2013-05-22 11:49:58 -07:00
Chris Dodge
9b88528b04 Merge branch 'master' of github.com:edx/edx-platform into feature/cdodge/autoprovision-forums-master 2013-05-22 13:20:49 -04:00
Calen Pennington
241ef68f4f Start linting envs files, add task to only pylint errors, and move pylintrc file to the correct location 2013-05-21 09:34:12 -04:00
Chris Dodge
fbbae44988 Merge branch 'master' of github.com:edx/edx-platform into feature/cdodge/autoprovision-forums-master
Conflicts:
	cms/djangoapps/contentstore/views/course.py
	lms/djangoapps/django_comment_client/base/views.py
	lms/djangoapps/django_comment_client/management/commands/show_permissions.py
	lms/djangoapps/django_comment_client/models.py
	lms/djangoapps/django_comment_client/tests/test_utils.py
	lms/envs/common.py
2013-05-20 10:22:36 -04:00
Greg Price
372084e0b6 Merge branch 'drupal-new'
Conflicts:
	lms/envs/common.py
2013-05-17 16:17:35 -04:00
Greg Price
de5b4d7d27 Merge branch 'master' into drupal-new 2013-05-17 16:10:56 -04:00
Carlos Andrés Rocha
35bd38d677 Add status app with simple view to check celery workers 2013-05-17 11:33:14 -04:00
Carlos Andrés Rocha
c05efbc31e Added base Celery settings 2013-05-17 11:33:14 -04:00
Ned Batchelder
f856b69ab5 Merge branch 'feature/ned/sandboxed-python' 2013-05-17 10:28:06 -04:00
Greg Price
362736c4d1 Merge pull request #2060 from edx/fix/gprice/marketing-links
Fix marketing links in password reset pages
2013-05-16 14:24:13 -07:00
Greg Price
4e95aa053f Fix marketing links in password reset pages 2013-05-16 16:57:56 -04:00
Diana Huang
1c2175304e Merge branch 'master' into drupal-new 2013-05-16 16:27:36 -04:00
Arthur Barrett
adcd1dd886 update annotator.min.css with change to fix adder button and serve the minified one. 2013-05-16 14:48:06 -04:00
Arthur Barrett
52e5fe223c update annotator.js library and fix the annotator-adder button hover state in courseware. 2013-05-16 14:27:21 -04:00
Ned Batchelder
e947218285 Merge master to here. 2013-05-16 14:21:51 -04:00
Arthur Barrett
1fbe43a650 Merge branch 'master' into feature/abarrett/lms-notes-app 2013-05-16 13:23:12 -04:00
Calen Pennington
0701e1a776 Use local node_modules as system_node_path if none is set 2013-05-15 15:25:42 -04:00
Ned Batchelder
b682e1c0d3 Put a feature flag around the staff-only debugging page. 2013-05-13 17:07:13 -04:00
Greg Price
a0fb4d6c85 Merge branch 'master' into drupal-new
Conflicts:
	lms/envs/aws.py
	lms/envs/common.py
	lms/static/sass/base/_base.scss
	lms/templates/forgot_password_modal.html
2013-05-10 10:30:10 -04:00
Chris Dodge
51809965fe Merge branch 'master' of github.com:edx/mitx into feature/cdodge/autoprovision-forums-master 2013-05-10 10:01:53 -04:00
Arthur Barrett
c7197cd567 Merge branch 'master' into feature/abarrett/lms-notes-app 2013-05-08 18:04:24 -04:00
Jason Bau
1354cd412a Set SERVER_EMAIL so that mail_admins works 2013-05-08 14:16:20 -07:00
Greg Price
e190dc00d6 Remove marketing URLs from common.py
The MKTG_URLS dictionary is overwritten completely in aws.py anyway, and we
shouldn't be trying to keep both the production config and LMS code in sync
with changes to the marketing site.
2013-05-08 11:06:02 -04:00
Greg Price
7143749d7b Fix links to honor code, ToS, and privacy policy for marketing site 2013-05-07 17:54:32 -04:00
Arthur Barrett
cd4bec8750 merged master branch into feature/abarrett/lms-notes-app 2013-05-07 12:32:22 -04:00
Diana Huang
13d29b8e72 Fix indentation of settings dictionaries. 2013-05-06 16:49:10 -04:00
Chris Dodge
a92910db20 update lms to reflect where comment models.py is now in common 2013-05-06 16:23:32 -04:00
Arthur Barrett
ceefdf0161 user must be authenticated to view notes tab 2013-05-06 15:52:32 -04:00
Diana Huang
6110b54ca8 Address code review feedback
* Fix indentation/line break issues
* Handle marketing root URL as a separate case in marketing_link
* Move link map to its own setting.
2013-05-06 14:56:06 -04:00
Arthur Barrett
04e75485ba merged master branch into feature/abarrett/lms-notes-app. resolved conflicts in lms/envs/common.py and lms/templates/static_htmlbook.html. 2013-05-06 13:40:38 -04:00
Greg Price
87072a9a58 Add an endpoint for submission of Zendesk tickets by end users
This functionality requires the Zendesk URL, user, and API key to be specified
in django.conf.settings. Also, add a flag to MITX_FEATURES (enabled by default)
to control the endpoint and the front-end feature (yet to be added).
2013-05-06 13:35:51 -04:00
Diana Huang
a8ea201b6a Move the link map to the settings. 2013-05-06 12:55:42 -04:00
Ned Batchelder
686eb64949 An example of how to set the CPU limit for codejail. 2013-05-06 11:39:21 -04:00
Ned Batchelder
d8c22dbeb3 Add a Django setting for course allowed to run unsafe code. 2013-05-06 11:39:21 -04:00
Ned Batchelder
ec7a04fdb3 A /debug/run_python endpoint for staff to test the sandboxing of Python code. 2013-05-06 11:39:17 -04:00
Ned Batchelder
5d4b61c7f5 Better configuration for codejail. 2013-05-06 10:55:05 -04:00
Diana Huang
e4e6c0dd7b Add new URLS to MKTG_URLS. 2013-05-03 15:05:03 -04:00
Diana Huang
1d42df8cb1 Add MKTG_URLS to settings for new footer and header links. 2013-05-03 09:31:47 -04:00
Diana Huang
45baf013fe Merge branch 'master' into drupal-new 2013-05-02 17:04:39 -04:00
Calen Pennington
dfd369b9e9 Make ordering of js bundles during jasmine tests consistant 2013-04-30 14:09:17 -04:00
Calen Pennington
9d94adbd1f Merge pull request #1871 from MITx/feature/cale/fast-dev-server
Speed up local development
2013-04-24 12:12:05 -07:00
Calen Pennington
729daf5cbf Move xmodule asset gathering out of server startup
This allows us to a) compile the coffeescript and sass from xmodules
using the new out-of-band method and b) reload xmodule static content
whenever it changes, which should make devs much happier.
2013-04-18 15:19:19 -04:00
Calen Pennington
346aee8863 Make django-pipeline only work with raw js and css 2013-04-18 07:18:36 -04:00
ichuang
3b4093ab7b url and mitx_settings for masquerade 2013-04-13 22:47:04 -04:00
Brian Talbot
78079d1ca7 Merge branch 'master' into drupal-new 2013-04-08 22:35:29 -04:00