Commit Graph

35 Commits

Author SHA1 Message Date
Jason Bau
bc32899c1b actually, just remove the revision 2013-11-08 15:16:26 -08:00
Jason Bau
2627db13a0 make edxapp work when not run from a git repo 2013-11-08 12:49:52 -08:00
David Baumgold
d97921e6e2 Convert Studio JS to use require.js 2013-10-04 13:43:50 -04:00
Calen Pennington
1255ab7514 Add mitxmako.middleware to fix workers
If mitxmako.middleware has ever been imported, then render_to_string
works correctly (which is why we didn't see this in the rest of
edx-platform). However, if it hasn't (like in a celery worker), then
using mitxmako.middleware errors out.

[LMS-1085]
2013-09-09 11:13:50 -04:00
Calen Pennington
7d79f4fe37 Move mitxmako initialization to a startup module, called by lms.startup and cms.startup for both management commands and when run via wsgi
[DEVPAIN-7]
2013-08-28 10:56:07 -04:00
David Baumgold
97fb08ab08 Make mitxmako.render_to_response not require a dictionary argument 2013-07-29 14:28:55 -04:00
David Baumgold
a6f349dab9 Studio i18n 2013-07-12 16:25:39 -04:00
Ned Batchelder
181b1e979b Remove unused imports from common, as reported by pylint. 2013-06-19 16:56:34 -04:00
Calen Pennington
6c24694a7c Fix tests that vary urls.py
Create a mixin class that can be used for tests that customize urls.py
to force django to reload it, so that they don't break other tests.
2013-06-10 10:56:50 -04:00
Jay Zoldak
1f284c56c1 Skip a test that is causing intermittent failures due to the way it is overriding urls 2013-06-05 18:15:16 -04:00
Nate Hardison
4031c193a1 Adjust available routes based on theme presence
Themes do not necessarily want all of the available LMS routes, such
as `/jobs` and `/university_profiles`. This change splits up the
`lms/urls.py` file and selectively enables/disables routes based on
whether or not a theme is enabled. This is a naive solution for now;
a better solution gives themes a way to selectively overrides such
routes.

Additionally, with the `MKTG_URL_LINK_MAP` setting that hits certain
routes immediately on each page render (whenever the `marketing_link`
helper function is called), themes may crash if they don't leave
all marketing link routes present in `lms/urls.py`. This change also
provides the ability to override the `MKTG_URL_LINK_MAP` in the
settings.

Finally, modify the mitxmako marketing URL middleware to not try to
reverse disabled URLs, which are those keys in the map whose values
are `None`.
2013-06-05 10:55:12 -07:00
Nate Hardison
b606d7ce56 Merge pull request #53 from edx/nate/fix-mako-templ-encoding
Specify UTF-8 encoding when loading Mako template
2013-06-04 13:02:05 -07:00
Nate Hardison
7bccce4e9c Add comment to dynamically-generated asset files
To avoid confusion about where these files come from, add a header
comment upon preprocessing that warns people to not modify the
generated files directly, and points them to the appropriate
template file.
2013-06-04 11:14:02 -07:00
Nate Hardison
64a85e19e7 Specify UTF-8 encoding when loading Mako template
When loading a Mako template from a Django template, the file
encoding of the Mako template was left unspecified. In some cases,
this would cause the Mako template to be interpreted as an ASCII
template, resulting in blowups if the template was encoded in
UTF-8 (e.g., lms/templates/footer.html).

Now, both the input and output encodings are specified as UTF-8.
2013-06-03 17:19:33 -07:00
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
James Tauber
d38f266153 updated mitxmako README to clarify license and origin 2013-05-28 15:14:47 -04:00
Diana Huang
15a5e6c1ac Fix test so that it works with both CMS and LMS settings 2013-05-17 13:18:10 -04:00
Diana Huang
ba983d5f49 Merge pull request #2062 from edx/diana/drupal/lettuce-tests
Fix Lettuce Tests for Drupal site
2013-05-17 08:56:11 -07:00
Diana Huang
2b80b358ed Add in a test for the marketing_link function in mitxmako 2013-05-17 10:51:37 -04:00
Greg Price
4e95aa053f Fix marketing links in password reset pages 2013-05-16 16:57:56 -04:00
Diana Huang
2947ce246f Better error handling for when marketing urls are missing from the settings. 2013-05-07 13:17:30 -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
Diana Huang
a8ea201b6a Move the link map to the settings. 2013-05-06 12:55:42 -04:00
Diana Huang
5b3f5a47de Add marketing_link to the Template context dictionary.
Pep8 fixes
2013-05-06 10:03:00 -04:00
Diana Huang
c9a6fe18f0 Create new marketing_link function to abstract link generation
and use it for the new marketing site links.
2013-05-03 15:06:24 -04:00
Ned Batchelder
c3b571bf9b Make sure temp directories are properly cleaned up so running tests doesn't leave them behind. 2013-02-21 11:38:45 -05:00
Calen Pennington
cfae1cdf62 Pep8 autofixes 2013-02-06 11:13:50 -05:00
Brian Wilson
cde20758f8 cosmetic cleanup 2012-12-04 13:25:04 -05:00
Brian Wilson
dfb9913100 clean up lms tests, and fix export/import 2012-12-04 11:52:35 -05:00
Brian Wilson
4ebd70dcc4 add support for utf8 in sequences, verticals and custom modules. 2012-12-04 03:54:36 -05:00
Brian Wilson
1d44ebb10c Add more non-ascii characters to full dataset, and make fixes in xmodule code. 2012-12-03 16:22:25 -05:00
Brian Wilson
6a24ecebe7 decode utf-8 when reading html, and encode when writing. 2012-11-28 17:54:18 -05:00
Arjun Singh
a7f1e7c147 use the request's hostname rather than settings.SITE_NAME for activation emails 2012-08-23 11:37:46 -07:00
Bridger Maxwell
0fbfaf612f Merge remote-tracking branch 'origin/master' into feature/bridger/new_wiki 2012-08-17 17:52:22 -04:00
Calen Pennington
3b36fbf914 Move mitxmako out of common lib, and pass template rendering function into MongoModuleStore 2012-08-16 12:49:42 -04:00