美文网首页
Always use the magic List

Always use the magic List

作者: 彩虹金刚_Q | 来源:发表于2018-09-02 21:44 被阅读0次

Yes i need to record this historical moment that I have solved the data transfer method problem with Python~

def home(request):

line ='[{"dut_id":"100","nickname":"Frontier","sku_id":"600WW"},{"dut_id":"101","nickname":"FRT_Gateway","sku_id":"600WW"},{"dut_id":"102","nickname":"ANT","sku_id":"600WW"},{"dut_id":"200","nickname":"Equator","sku_id":"600WW"},{"dut_id":"300","nickname":"Core2","sku_id":"600WW"},{"dut_id":"400","nickname":"Danube","sku_id":"600WW"},{"dut_id":"500","nickname":"PDA","sku_id":"600CN"}]'

    obj = json.loads(line)

nickname =list()

i =0

    while i

nickname.append(obj[i]['nickname'])

i = i+1

    return render(request, 'home.html', {'nickname': nickname})

After several investigation I found "select"/"option" is still a better choice than menu

And sadly found it is hard to change option appearance

And I still need to do some local storage as there are some matching relationships of those data

So tomorrow's task is to understand "Get" "Post" method and how to get ride of the "unique" value issue and avoid rewrite each object each time opening Home

相关文章

网友评论

      本文标题:Always use the magic List

      本文链接:https://www.haomeiwen.com/subject/keemwftx.html