:( ============================================================= 1 {% extends "Base.html" %} 2 3 {% block title %}Show Acronyme{% endblock %} 4 5 {% block content %} 6 7 <h1>List of deployments for {{ acronym.letters }}</h1> 8 9 {% for env, statuses in app_deployed_status_lst.items() %} 10 <h2>{{ env }}</h2> 11 <ol> 12 {% for status in statuses %} 13 <li> {{ status.version }} : {{ status.last_action }} --> {{ status.last_action_time}}</li> 14 {% endfor %} 15 </ol> 16 {% endfor %} 17 {% endblock %} ===============================================
Traceback: File "C:\Python25\Lib\site-packages\django\core\handlers\base.py" in get_response 86. response = callback(request, *callback_args, **callback_kwargs) File "C:\Projects\mwb\tools\XXXXXX\..\de_post\follow_deploys\views.py" in viewDeployed 44. return render_to_response('follow_deploys/viewDeployed.html', locals()) File "C:\Python25\lib\site-packages\django\shortcuts\__init__.py" in render_to_response 18. return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs) File "C:\Python25\Lib\site-packages\django\template\loader.py" in render_to_string 102. t = get_template(template_name) File "C:\Python25\Lib\site-packages\django\template\loader.py" in get_template 81. template = get_template_from_string(source, origin, template_name) File "C:\Python25\Lib\site-packages\django\template\loader.py" in get_template_from_string 89. return Template(source, origin, name) File "C:\Python25\Lib\site-packages\django\template\__init__.py" in __init__ 166. self.nodelist = compile_string(template_string, origin) File "C:\Python25\Lib\site-packages\django\template\__init__.py" in compile_string 187. return parser.parse() File "C:\Python25\Lib\site-packages\django\template\__init__.py" in parse 283. compiled_result = compile_func(self, token) File "C:\Python25\Lib\site-packages\django\template\loader_tags.py" in do_extends 169. nodelist = parser.parse() File "C:\Python25\Lib\site-packages\django\template\__init__.py" in parse 283. compiled_result = compile_func(self, token) File "C:\Python25\Lib\site-packages\django\template\loader_tags.py" in do_block 147. nodelist = parser.parse(('endblock', 'endblock %s' % block_name)) File "C:\Python25\Lib\site-packages\django\template\__init__.py" in parse 283. compiled_result = compile_func(self, token) File "C:\Python25\Lib\site-packages\django\template\defaulttags.py" in do_for 648. sequence = parser.compile_filter(bits[in_index+1]) File "C:\Python25\Lib\site-packages\django\template\__init__.py" in compile_filter 356. return FilterExpression(token, self) File "C:\Python25\Lib\site-packages\django\template\__init__.py" in __init__ 529. raise TemplateSyntaxError("Could not parse the remainder: '%s' from '%s'" % (token[upto:], token)) Exception Type: TemplateSyntaxError at /followDeploys/viewDeployed/xxx Exception Value: Could not parse the remainder: '()' from 'app_deployed_status_lst.items()' But if you remove the (), it seems to go further : {% for env, statuses in app_deployed_status_lst.items %} <-- Can be parsed \T, On Oct 3, 10:06 pm, "David Durham, Jr." <[EMAIL PROTECTED]> wrote: > On Fri, Oct 3, 2008 at 12:13 PM, tsmets <[EMAIL PROTECTED]> wrote: > > I have an application that records the status of an applications. > > Basically something like : > > _ started-request > > _ started > > _ stop-requested > > _ stopped > > + some technical informations (version, host, URL, ...) > > > I thought having a page that display per environment : dev, test, > > acceptance, prod the status for one application. > > I can easilly build a dictionnary where the keys is for that specific > > environment the last 5 status change (named in my code : > > app_deployed_status_lst). > > If I have you correctly, your data looks something like: > > env_history = { dev : [ > {'started' : 'x', 'stopped' : 'y', 'version' : 'z'}, > ... ], > test : [ > .... ], > .. > > } > > so you can do something like: > > {% for env, statuses in env_history.items() %} > {{ env }} > {% for status in statuses %} > {{ status.version }} {{ status.started }} to {{ status.stopped > }} > {% endfor %} > {% endfor %} > > -Dave --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---