Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

Solo Group / iso8583-web

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • iso8583-web
  • iso8583_web
  • tools
  • deform.py
  • Owo Sugiana's avatar
    Kali pertama · 1f950e88
    Owo Sugiana committed Feb 12, 2019
    1f950e88
deform.py 455 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# items = request.POST.items()
def to_dict(items):
    d = dict()
    values = None
    for item in items:
        print(item)
        key, value = item
        if key == '__start__':
            fieldname = value
            values = []
        elif key == '__end__':
            d[fieldname] = values
            values = None
        elif isinstance(values, list):
            values.append(value)
        else:
            d[key] = value
    return d