##// END OF EJS Templates
- Arregalado el estilo para la presentacion del formulario newProfile.
jsalyrosas -
r132:133
parent child
Show More
@@ -1,59 +1,107
1 1 from django.shortcuts import render_to_response, redirect No newline at end of file
2 2 from abscontrol.models import Profile, AntennaDown, AntennaUp No newline at end of file
3 3 No newline at end of file
4 4 def index(request): No newline at end of file
5 5 #latest_poll_list = profileAntenna.objects.all().order_by('-pub_date')[:5] No newline at end of file
6 6 profile_list = Profile.objects.all() No newline at end of file
7 7 return render_to_response('abscontrol/index.html', {'profile_list': profile_list}) No newline at end of file
8 8 No newline at end of file
9 9 def new(request): No newline at end of file
10 10 profile_list = Profile.objects.all()
11 No newline at end of file
11 return render_to_response('abscontrol/new.html', {'profile_list': profile_list}) No newline at end of file
No newline at end of file
12 "[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]," \
No newline at end of file
13 "[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]," \
No newline at end of file
14 "[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]," \
No newline at end of file
15 "[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]," \
No newline at end of file
16 "[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]," \
No newline at end of file
17 "[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]," \
No newline at end of file
18 "[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]]"
No newline at end of file
19 txtTxUp = "[[1,1,1,1,1,1,1,1]," \
No newline at end of file
20 "[1,1,1,1,1,1,1,1]," \
No newline at end of file
21 "[1,1,1,1,1,1,1,1]," \
No newline at end of file
22 "[1,1,1,1,1,1,1,1]," \
No newline at end of file
23 "[1,1,1,1,1,1,1,1]," \
No newline at end of file
24 "[1,1,1,1,1,1,1,1]," \
No newline at end of file
25 "[1,1,1,1,1,1,1,1]," \
No newline at end of file
26 "[1,1,1,1,1,1,1,1]]"
No newline at end of file
27 txtTxDown = "[[1,1,1,1,0,0,0,0]," \
No newline at end of file
28 "[1,1,1,1,0,0,0,0]," \
No newline at end of file
29 "[1,1,1,1,0,0,0,0]," \
No newline at end of file
30 "[1,1,1,1,0,0,0,0]," \
No newline at end of file
31 "[0,0,0,0,1,1,1,1]," \
No newline at end of file
32 "[0,0,0,0,1,1,1,1]," \
No newline at end of file
33 "[0,0,0,0,1,1,1,1]," \
No newline at end of file
34 "[0,0,0,0,1,1,1,1]]"
No newline at end of file
35 txtRxUp = "[[0,0,0,0,1,1,1,1]," \
No newline at end of file
36 "[0,0,0,0,1,1,1,1]," \
No newline at end of file
37 "[0,0,0,0,1,1,1,1]," \
No newline at end of file
38 "[0,0,0,0,1,1,1,1]," \
No newline at end of file
39 "[1,1,1,1,1,1,1,1]," \
No newline at end of file
40 "[1,1,1,1,1,1,1,1]," \
No newline at end of file
41 "[1,1,1,1,1,1,1,1]," \
No newline at end of file
42 "[1,1,1,1,1,1,1,1]]"
No newline at end of file
43 txtRxDown = "[[1,1,1,1,1,1,1,1]," \
No newline at end of file
44 "[1,1,1,1,1,1,1,1]," \
No newline at end of file
45 "[1,1,1,1,1,1,1,1]," \
No newline at end of file
46 "[1,1,1,1,1,1,1,1]," \
No newline at end of file
47 "[1,1,1,1,1,1,1,1]," \
No newline at end of file
48 "[1,1,1,1,1,1,1,1]," \
No newline at end of file
49 "[1,1,1,1,1,1,1,1]," \
No newline at end of file
50 "[1,1,1,1,1,1,1,1]]"
No newline at end of file
51
No newline at end of file
52 txtUes = "[0.533333,0.00000,1.06667,0.00000]"
No newline at end of file
53
No newline at end of file
54 return render_to_response('abscontrol/new.html', {'profile_list': profile_list,
No newline at end of file
55 'txtAntenna' : txtAntenna,
No newline at end of file
56 'txtUes' : txtUes, 'txtTxUp' : txtTxUp,
No newline at end of file
57 'txtTxDown' : txtTxDown, 'txtRxUp' : txtRxUp,
No newline at end of file
58 'txtRxDown' : txtRxDown,
No newline at end of file
59 }) No newline at end of file
12 60 No newline at end of file
13 61 def save(request): No newline at end of file
14 62 No newline at end of file
15 63 txtProfile = request.POST["txtProfile"] No newline at end of file
16 64 No newline at end of file
17 65 txtAntennaUp = request.POST["txtAntennaUp"] No newline at end of file
18 66 txtTxUp = request.POST["txtTxUp"] No newline at end of file
19 67 txtRxUp = request.POST["txtRxUp"] No newline at end of file
20 68 txtUesUp = request.POST["txtUesUp"] No newline at end of file
21 69 No newline at end of file
22 70 txtAntennaDown = request.POST["txtAntennaDown"] No newline at end of file
23 71 txtTxDown = request.POST["txtTxDown"] No newline at end of file
24 72 txtRxDown = request.POST["txtRxDown"] No newline at end of file
25 73 txtUesDown = request.POST["txtUesDown"] No newline at end of file
26 74 No newline at end of file
27 75 newprofile = Profile(name=txtProfile) No newline at end of file
28 76 newprofile.save() No newline at end of file
29 77 No newline at end of file
30 78 newpattern = newprofile.pattern_set.create(value=1) No newline at end of file
31 79 newpattern.antennaup_set.create(value=txtAntennaUp, No newline at end of file
32 80 tx=txtTxUp,rx=txtRxUp, No newline at end of file
33 81 ues=txtUesUp) No newline at end of file
34 82 newpattern.antennadown_set.create(value=txtAntennaDown, No newline at end of file
35 83 tx=txtTxDown,rx=txtRxDown, No newline at end of file
36 84 ues=txtUesDown) No newline at end of file
37 85 No newline at end of file
38 86 newurl = '/abscontrol/view/%d' % newprofile.id No newline at end of file
39 87 #return redirect('/abscontrol/') No newline at end of file
40 88 return redirect(newurl) No newline at end of file
41 89 No newline at end of file
42 90 def view(request, profile_id): No newline at end of file
43 91 if request.method == 'GET' and 'pattern' in request.GET: No newline at end of file
44 92 pattern_value = request.GET["pattern"] No newline at end of file
45 93 else: No newline at end of file
46 94 pattern_value = 1 No newline at end of file
47 95 No newline at end of file
48 96 profile_list = Profile.objects.all() No newline at end of file
49 97 objProfile = Profile.objects.get(pk=profile_id) No newline at end of file
50 98 No newline at end of file
51 99 lsPatterns = objProfile.pattern_set.all() No newline at end of file
52 100 patternChoosen = objProfile.pattern_set.get(value=pattern_value) No newline at end of file
53 101 objAntennaUp = patternChoosen.antennaup_set.get() No newline at end of file
54 102 objAntennaDown = patternChoosen.antennadown_set.get() No newline at end of file
55 103 No newline at end of file
56 104 return render_to_response('abscontrol/view.html', {'objProfile': objProfile, 'profile_list': profile_list, No newline at end of file
57 105 'patternChoosen' : patternChoosen, 'lsPatterns' : lsPatterns, No newline at end of file
58 106 'antennaUp' : objAntennaUp, 'antennaDown' : objAntennaDown, No newline at end of file
59 107 }) No newline at end of file
@@ -1,97 +1,103
1 1 @font-face { No newline at end of file
2 2 font-family: 'Open Sans'; No newline at end of file
3 3 font-style: normal; No newline at end of file
4 4 font-weight: 300; No newline at end of file
5 5 src: local('Open Sans Light'), local('OpenSans-Light'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format('woff'); No newline at end of file
6 6 } No newline at end of file
7 7 @font-face { No newline at end of file
8 8 font-family: 'Open Sans'; No newline at end of file
9 9 font-style: normal; No newline at end of file
10 10 font-weight: 400; No newline at end of file
11 11 src: local('Open Sans'), local('OpenSans'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff'); No newline at end of file
12 12 } No newline at end of file
13 13 @font-face { No newline at end of file
14 14 font-family: 'Open Sans'; No newline at end of file
15 15 font-style: normal; No newline at end of file
16 16 font-weight: 600; No newline at end of file
17 17 src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/MTP_ySUJH_bn48VBG8sNSnhCUOGz7vYGh680lGh-uXM.woff) format('woff'); No newline at end of file
18 18 } No newline at end of file
19 19 @font-face { No newline at end of file
20 20 font-family: 'Open Sans'; No newline at end of file
21 21 font-style: normal; No newline at end of file
22 22 font-weight: 700; No newline at end of file
23 23 src: local('Open Sans Bold'), local('OpenSans-Bold'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff'); No newline at end of file
24 24 } No newline at end of file
25 25 @font-face { No newline at end of file
26 26 font-family: 'Open Sans'; No newline at end of file
27 27 font-style: normal; No newline at end of file
28 28 font-weight: 800; No newline at end of file
29 29 src: local('Open Sans Extrabold'), local('OpenSans-Extrabold'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/EInbV5DfGHOiMmvb1Xr-hnhCUOGz7vYGh680lGh-uXM.woff) format('woff'); No newline at end of file
30 30 } No newline at end of file
31 31 @font-face { No newline at end of file
32 32 font-family: 'Open Sans'; No newline at end of file
33 33 font-style: italic; No newline at end of file
34 34 font-weight: 300; No newline at end of file
35 35 src: local('Open Sans Light Italic'), local('OpenSansLight-Italic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxh_xHqYgAV9Bl_ZQbYUxnQU.woff) format('woff'); No newline at end of file
36 36 } No newline at end of file
37 37 @font-face { No newline at end of file
38 38 font-family: 'Open Sans'; No newline at end of file
39 39 font-style: italic; No newline at end of file
40 40 font-weight: 400; No newline at end of file
41 41 src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff'); No newline at end of file
42 42 } No newline at end of file
43 43 @font-face { No newline at end of file
44 44 font-family: 'Open Sans'; No newline at end of file
45 45 font-style: italic; No newline at end of file
46 46 font-weight: 600; No newline at end of file
47 47 src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxn5HxGBcBvicCpTp6spHfNo.woff) format('woff'); No newline at end of file
48 48 } No newline at end of file
49 49 @font-face { No newline at end of file
50 50 font-family: 'Open Sans'; No newline at end of file
51 51 font-style: italic; No newline at end of file
52 52 font-weight: 700; No newline at end of file
53 53 src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxjqR_3kx9_hJXbbyU8S6IN0.woff) format('woff'); No newline at end of file
54 54 } No newline at end of file
55 55 @font-face { No newline at end of file
56 56 font-family: 'Open Sans'; No newline at end of file
57 57 font-style: italic; No newline at end of file
58 58 font-weight: 800; No newline at end of file
59 59 src: local('Open Sans Extrabold Italic'), local('OpenSans-ExtraboldItalic'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxkCDe67GEgBv_HnyvHTfdew.woff) format('woff'); No newline at end of file
60 60 } No newline at end of file
61 61 No newline at end of file
62 62 body {font-size: 11px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif} No newline at end of file
63 63 article, aside, figure, footer, header, hgroup, nav, section { display:block; } No newline at end of file
64 64 header {border: 1px solid #fcc; font-size: 2em; height: 50px; text-align: center; line-height: 50px} No newline at end of file
65 65 #schema {margin: 0 auto; width: 980px; border: 1px solid #f00; padding: 10px 10px 10px 10px} No newline at end of file
66 66 #content {border: 1px solid #1cc; margin-top: 5px; margin-bottom: 5px} No newline at end of file
67 67 #content #leftcolumn {float: left;border: 1px solid #c55; width: 150px; font-family: Monaco;} No newline at end of file
68 68 #content #maincolumn {float: left; border: 1px solid #000; width: 800px; padding-left: 20px;} No newline at end of file
69 69 footer {border: 1px solid #200; font-size: 0.9em; height: 30px; text-align: center; line-height: 20px} No newline at end of file
70 70 No newline at end of file
71 71 .cleardivs {clear: both; border: 1px solid #400; height: 0px} No newline at end of file
72 72 No newline at end of file
73 73 No newline at end of file
74 74 /****************************************************************************************/ No newline at end of file
75 75 /****** MENU DE NAVEGACION DE PERFILES **********************************/ No newline at end of file
76 76 /****************************************************************************************/ No newline at end of file
77 77 #content #infoProfiles {border: 1px solid #d00; width: 140px; margin: 0px; padding-top: 2px; padding-bottom: 2px} No newline at end of file
78 78 .lblInfo {padding-left: 12px; line-height: 20px;} No newline at end of file
79 79 #infoProfiles select {padding-left: 12px; line-height: 20px;margin-left: 12px} No newline at end of file
80 80 #content nav {border: 1px solid #c55; width: 140px; margin: 0px; font-family: Monaco; font-size: 1.2em;} No newline at end of file
81 81 #content nav ul{list-style: none; list-style-type: none; margin: 15px 15px 15px 15px; padding-left: 20px; border: 0px solid #eee} No newline at end of file
82 82 #content nav ul li{line-height: 20px} No newline at end of file
83 83 No newline at end of file
84 84 /****************************************************************************************/ No newline at end of file
85 85 /******** FORMULARIO DE PERFILES *************************************/ No newline at end of file
86 86 /****************************************************************************************/ No newline at end of file
87 87 #divProfile {border: 0px solid #dff; margin: 10px 0px; padding: 10px 10px; width: 500px} No newline at end of file
88 88 .flsAntenna {margin: 10px 0px; width: 750px; padding: 10px 10px} No newline at end of file
89 89 #divPattern textarea,input[type=text],label {font-family: Monaco; font-size: inherit;}
90 No newline at end of file
90 #divPattern input[type=text] {width: 200px} No newline at end of file
91 91 #divPattern textarea {resize: none; overflow: hidden}
92 No newline at end of file
92 .divAntenna {float: left; margin: 10px; height: 150px} No newline at end of file
No newline at end of file
93 .divAntenna {float: left; margin: 10px; height: 160px; border: 1px solid #fcc !important; width: 260px} No newline at end of file
93 94 .divAntenna label {display: block} No newline at end of file
95 .txtAntenna {max-width: 250px; max-height: 125px; width: 250px; height: 125px}
No newline at end of file
96 No newline at end of file
94 97 .divTx {display: block; float: left; margin: 10px; height: 150px} No newline at end of file
95 98 .divTx label {display: block} No newline at end of file
99 .divTx textarea {width: 135px; max-width: 135px; height: 125px; max-height: 125px; text-align: justify}
No newline at end of file
100 No newline at end of file
96 101 .divUes {display: block; margin: 10px}
102 No newline at end of file
97 .txtAntenna {max-width: 200px; max-height: 120px} No newline at end of file
No newline at end of file
103 No newline at end of file
@@ -1,60 +1,60
1 1 {% extends "abscontrol/index.html" %} No newline at end of file
2 2 {% block title %}ABS CONTROL:::::NEW PROFILE{% endblock %} No newline at end of file
3 3 No newline at end of file
4 4 {% block maincolumn%} No newline at end of file
5 5 <div id="maincolumn"> No newline at end of file
6 6 <form action="/abscontrol/save/" method="post"> No newline at end of file
7 7 <div id="divProfile"> No newline at end of file
8 8 <label for="lblName">Profile:</label> No newline at end of file
9 9 <input type="text" name="txtProfile" id="" value="" /> No newline at end of file
10 10 <input type="submit" value="Save" /> No newline at end of file
11 11 </div> No newline at end of file
12 12 <div id="divPattern"> No newline at end of file
13 13 <div id="antennaUp"> No newline at end of file
14 14 <fieldset class="flsAntenna"> No newline at end of file
15 15 <legend>UP</legend> No newline at end of file
16 16 <div class="divAntenna"> No newline at end of file
17 17 <label for="lblAntenna">Antenna</label>
18 No newline at end of file
18 <textarea name="txtAntennaUp" class="txtAntenna" cols="38" rows="8"></textarea> No newline at end of file
19 19 </div> No newline at end of file
20 20 <div class="divTx"> No newline at end of file
21 21 <label for="lblTx">Tx</label>
22 No newline at end of file
22 <textarea name="txtTxUp" class="txtTR" cols="20" rows="8"></textarea> No newline at end of file
23 23 </div> No newline at end of file
24 24 <div class="divTx"> No newline at end of file
25 25 <label for="lblRx">Rx</label>
26 No newline at end of file
26 <textarea name="txtRxUp" class="txtTR" cols="20" rows="8"></textarea> No newline at end of file
27 27 </div> No newline at end of file
28 28 <div class="cleardivs"></div> No newline at end of file
29 29 <div class="divUes"> No newline at end of file
30 30 <label for="lblUes">Ues:</label>
31 No newline at end of file
31 <input type="text" name="txtUesUp" value="" /> No newline at end of file
32 32 </div> No newline at end of file
33 33 </fieldset> No newline at end of file
34 34 </div> No newline at end of file
35 35 <div id="antennaDown"> No newline at end of file
36 36 <fieldset class="flsAntenna"> No newline at end of file
37 37 <legend>DOWN</legend> No newline at end of file
38 38 <div class="divAntenna"> No newline at end of file
39 39 <label for="lblAntenna">Antenna</label>
40 No newline at end of file
40 <textarea name="txtAntennaDown" class="txtAntenna" cols="38" rows="8"></textarea> No newline at end of file
41 41 </div> No newline at end of file
42 42 <div class="divTx"> No newline at end of file
43 43 <label for="lblTx">Tx</label>
44 No newline at end of file
44 <textarea name="txtTxDown" class="txtTR" cols="20" rows="8"></textarea> No newline at end of file
45 45 </div> No newline at end of file
46 46 <div class="divTx"> No newline at end of file
47 47 <label for="lblRx">Rx</label>
48 No newline at end of file
48 <textarea name="txtRxDown" class="txtTR" cols="20" rows="8"></textarea> No newline at end of file
49 49 </div> No newline at end of file
50 50 <div class="cleardivs"></div> No newline at end of file
51 51 <div class="divUes"> No newline at end of file
52 52 <label for="lblUes">Ues:</label>
53 No newline at end of file
53 <input type="text" name="txtUesDown" value="" /> No newline at end of file
54 54 </div> No newline at end of file
55 55 </fieldset> No newline at end of file
56 56 </div> No newline at end of file
57 57 </div> No newline at end of file
58 58 </form> No newline at end of file
59 59 </div> No newline at end of file
60 60 {% endblock %} No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now