Skip to content

Conversation

@vrde
Copy link

@vrde vrde commented Sep 13, 2011

Template __init__ now accepts the dictionary partials.
If partials is defined, templates will be loaded using the dictionary instead of the regular "file loader".
Those changes should be retro compatible.

I also added a command line utility to test/render templates.

Synopsis

usage: pystache [-h] template context

Render a mustache template with the given context.

positional arguments:
  template    A filename or a template code.
  context     A filename or a JSON string

optional arguments:
  -h, --help  show this help message and exit

@cjerdonek
Copy link
Collaborator

I'm going to create a second issue for passing partials as a dictionary so that it can be treated separately from the command-line utility part.

cjerdonek added a commit that referenced this pull request Dec 13, 2011
…lates..."

From: vrde@7667a95
Into: issue_31

Adds command-line script: pystache/commands.py
cjerdonek added a commit that referenced this pull request Dec 13, 2011
From: vrde@4c22f13
Into: issue_31

Added entry point to setup.py.  Skipped changes related to "partials can be passed
as a dictionary" because that was addressed as part of issue #47.

Conflicts:
	setup.py
cjerdonek added a commit that referenced this pull request Dec 14, 2011
@cjerdonek cjerdonek closed this Dec 14, 2011
cjerdonek added a commit that referenced this pull request Jan 9, 2012
The two test cases test, respectively, (1) context precedence and
(2) that section output not be rendered.  The two test cases were
originally proposed for inclusion in the Mustache spec test cases
in mustache/spec issues #31 and #32:

* mustache/spec#31
* mustache/spec#32
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.

2 participants