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).

I was wondering how to iterate over a dictionnary where I could have
from 0 to n keys, without having to hard code the iteration
(preferably).
And then for each key I need again to retrieve the content of the list
to iterate over it.

I have tried many different code approach but I seem to not be able to
dynamically fetch the list from the dictionnary.

I would like to at least be able to do something like this ...

=================================================
{% extends "Base.html" %}

{% block title %}Show Acronyme{% endblock %}

{% block content %}

<h1>List of deployments for {{ acronym.letters }}</h1>
      <h2>DV</h2>
      <ol>
        {% for status in app_deployed_status_lst['dv'] %}
          <li> {{ status }} </li>
        {% endfor %}
      </ol>
{% endblock %}
=================================================

Otherwize I will have to create N-temp variable status_lst_dev,
status_lst_test, status_lst_acpt, status_lst_prd to pass to the html-
template.

Any idea or example to help keep the code short.

Tx,

\T,





--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to