Refactor templates

This commit is contained in:
Vincent Jacques
2012-05-04 13:47:37 +02:00
parent ce0aa9f34f
commit 3468e9ea1e
7 changed files with 59 additions and 59 deletions
@@ -0,0 +1,22 @@
{% if method.request.post_parameters %}
post_parameters = {
{% for parameter in method.mandatory_parameters %}
"{{ parameter.name }}": {{ parameter.name }},
{% endfor %}
}
{% for parameter in method.optional_parameters %}
if {{ parameter.name }} is not None:
post_parameters[ "{{ parameter.name }}" ] = {{ parameter.name }}
{% endfor %}
{% endif %}
result = self.__github._{{ method.request.information }}Request(
"{{ method.request.verb }}",
{% include "GithubObject.Concatenation.py" with concatenation=method.request.url only %},
None,
{% if method.request.post_parameters %}
post_parameters
{% else %}
None
{% endif %}
)