what is the best way to get for
number each time it runs?
Code:
fields = []
objects = otherobjects.all()
for object in objects
fields.append(('id_is_#', object))
I want to put an ID to # place. ID would be generated ++ way.
fields = []
objects = otherobjects.all()
for id, obj in enumerate(objects)
fields.append(('id_is_' + id, obj))