@@ -76,10 +76,12 def cgs_conf_write(request, id_conf): | |||
|
76 | 76 | f1 = conf.freq1 |
|
77 | 77 | f2 = conf.freq2 |
|
78 | 78 | f3 = conf.freq3 |
|
79 | ||
|
79 | headers = {'User-Agent': 'Mozilla/5.0'} | |
|
80 | 80 | post_data = {"f0":f0, "f1":f1, "f2":f2, "f3":f3} |
|
81 | 81 | route = "http://" + str(ip) + ":" + str(port) + "/frequencies/" |
|
82 | r = requests.post(route, post_data) | |
|
82 | session = requests.session() | |
|
83 | ||
|
84 | r = session.post(route, data= post_data,headers= headers) | |
|
83 | 85 | print r.url |
|
84 | 86 | print r.text |
|
85 | 87 | |
@@ -145,7 +147,7 def cgs_conf_read(request, id_conf): | |||
|
145 | 147 | 'freq3' : f3, |
|
146 | 148 | } |
|
147 | 149 | |
|
148 | form = CGSConfigurationForm(data) | |
|
150 | form = CGSConfigurationForm(initial = data) | |
|
149 | 151 | |
|
150 | 152 | kwargs = {} |
|
151 | 153 | kwargs['id_dev'] = conf.id |
General Comments 0
You need to be logged in to leave comments.
Login now