fixed issue of customizing the themes without editing #304

merged 2 commits into from Mar 30, 2012


None yet
4 participants

sebinthomas commented Mar 26, 2012

providing a {{'{"":"color1","Splash":"color2","Spark":"color3"}'|get_colors}} in the template override file would let you edit the template colors within the template override .

The Module simplejson has been used . Do notify me if there are any compatibility issues


jmoldow commented Mar 26, 2012

We use simplejson elsewhere, so compatibility won't be an issue.

Currently, it looks like this code doesn't support adding additional themes. The get_colors() function loops through the keys of the default theme dictionary. If I add a new theme to my template override, it will be ignored. For example, {{ '{ "Spork":"color1",}'|get_colors}} will not do anything, since "Spork" is not a key in theme.


sebinthomas commented Mar 27, 2012

@jmoldow I'm so sorry ! I assumed you would be using only those themes mentioned in the theme variable . I have edited the code and I believe it works now .

Thank you for pointing out the issue .


gkanwar commented Mar 29, 2012


@jmoldow is this good to merge? If so you should probably do so, since you've had the most experience with this pull request.


jmoldow commented Mar 29, 2012

It looks good to me, but I would actually like to get Mike's opinions before merging. I've never set up a new chapter site, or done any theme customizations. Mike has done most of this, so he would know if this is good to go, or if we need anything else.

@pricem pricem added a commit that referenced this pull request Mar 30, 2012

@pricem pricem Merge pull request #304 from stc043/patch-1
fixed issue of customizing the themes without editing

@pricem pricem merged commit 7f29986 into learning-unlimited:main Mar 30, 2012


pricem commented Mar 30, 2012

Sorry for not looking at this earlier! I tried these changes out on my dev server and they worked great, so I merged them. I also came up with a change that allows you to supply the color configuration string as an argument to the extract_theme template filter we've been using on the MIT-themed sites. I'm not sure we want this so I put it up at pricem/ESP-Website@6dfe9a6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment