Hello,
I do get an iteration over non sequence error. If I make a normal <for i in thelist> in python code everything works as assumed, but I if let django iterate over <thelist>, it says iteration over.... The weird thing is, that it worked sometime ago, but I can't recall whats the difference between know and the time it worked :-(. Apart from that, if i can iterate over the list in python directly, it should work in the template environment too (the iteration), - a list is a list. So does anyone have a general clue what's going on here? The template looks something like that: ... <div id="netzdata"> {% for ndata in ndatas %} <--- iteration over nonsequence <fieldset id="netzdata_{{ forloop.counter0 }}"> <legend>Netzdaten</legend> <label class="fil-label" for="mac_{{ forloop.counter0 }}">Ethernet-Adresse:*</label> <input class="fil-input" name="mac_{{ forloop.counter0 }}" id="mac_{{ forloop.counter0 }}" type="text" value="{{ ndata.get_mac_addr }}" /> <br/> <br/> <label class="fil-label" for="dhcp_{{ forloop.counter0 }}">DHCP aktivieren ?:*</label> <select class="fil-input" name="dhcp_{{ forloop.counter0 }}" id="dhcp_{{ forloop.counter0 }}" size="1"> {% for doption in dhcpoptions %} {% ifequal doption.get_val ndata.get_mac_dhcp_eintrag %} <option selected value="{{ doption.get_val }}">{{ doption.get_name }}</option> {% else %} <option value="{{ doption.get_val }}">{{ doption.get_name }}</option> {% endifequal %} {% endfor %} ... Another thing is the usage of the python logging module. I have a class that does the general configuration for the logging. Momentarily it is merely the example provided by the library-doc from python. So I have a class: class Dlogger(object): def __init__(self,app=''): self.__logger = logging.getLogger('blax'+app) self.__hdlr = logging.FileHandler(<location>) self.__formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s') self.__hdlr.setFormatter(self.__formatter) self.__logger.addHandler(self.__hdlr) self.__logger.setLevel(logging.DEBUG)
From everywhere I want to use it, I instantiate a Dlogger-Object with a
unique app-string. This seems to work, but if I use the browser-back-button and post the form again, i get a 'string accelerator'. So every time I do this, the output of a string is incremented by one like this DEBUG login-session-info blah DEBUG login-session-info blah instead of DEBUG login-session-info blah. P.S. I have to admit, that right now I have read the documentation not very painstakingly, but I assume this has something to do with the mod_python/django/cache ?... thx. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---