@@ -49,17 +49,11 | |||||
49 | objProfile = Profile.objects.get(pk=profile_id) No newline at end of file |
|
49 | objProfile = Profile.objects.get(pk=profile_id) | |
50 | No newline at end of file |
|
50 | ||
51 | lsPatterns = objProfile.pattern_set.all() |
|
51 | lsPatterns = objProfile.pattern_set.all() | |
No newline at end of file |
|
52 | patternChoosen = objProfile.pattern_set.get(value=pattern_value) | ||
52 | patternChoosen = objProfile.pattern_set.filter(value=pattern_value) |
|
No newline at end of file | ||
No newline at end of file |
|
53 | objAntennaUp = patternChoosen.antennaup_set.get() | ||
53 | #print patternChoosen.value |
|
No newline at end of file | ||
No newline at end of file |
|
54 | objAntennaDown = patternChoosen.antennadown_set.get() No newline at end of file | ||
54 | #objAntennaUp = patternChoosen.antennaup_set.all()[0] |
|
|||
No newline at end of file |
|
||||
55 | #objAntennaDown = patternChoosen.antennadown_set.all()[0] No newline at end of file |
|
|||
56 |
|
55 | |||
No newline at end of file |
|
56 | return render_to_response('abscontrol/view.html', {'objProfile': objProfile, 'profile_list': profile_list, No newline at end of file | ||
57 | #objAntennaUp = AntennaUp.objects.get(pattern=patternChoosen.id) |
|
|||
No newline at end of file |
|
||||
58 | #objAntennaDown = AntennaDown.objects.get(pattern=patternChoosen.id) |
|
|||
No newline at end of file |
|
||||
59 | ''' |
|
|||
No newline at end of file |
|
||||
60 | return render_to_response('abscontrol/view.html', {'nameProfile': objProfile.name, 'profile_list': profile_list, No newline at end of file |
|
|||
61 | 'patternChoosen' : patternChoosen, 'lsPatterns' : lsPatterns, |
|
57 | 'patternChoosen' : patternChoosen, 'lsPatterns' : lsPatterns, | |
No newline at end of file |
|
58 | 'antennaUp' : objAntennaUp, 'antennaDown' : objAntennaDown, | ||
62 | 'antennaUp' : objAntennaUp, 'antennaDown' : objAntennaDown,}) |
|
No newline at end of file | ||
No newline at end of file |
|
59 | }) No newline at end of file | ||
63 | ''' |
|
|||
No newline at end of file |
|
||||
64 | return render_to_response('abscontrol/view.html', {'nameProfile': objProfile.name, 'profile_list': profile_list, |
|
|||
No newline at end of file |
|
||||
65 | 'patternChoosen' : patternChoosen, 'lsPatterns' : lsPatterns,}) No newline at end of file |
|
@@ -13,7 +13,15 | |||||
13 | <select name="lsProfiles"> No newline at end of file |
|
13 | <select name="lsProfiles"> | |
14 | <option>Choose ...</option> No newline at end of file |
|
14 | <option>Choose ...</option> | |
15 | {% for entry in profile_list %} No newline at end of file |
|
15 | {% for entry in profile_list %} | |
|
16 | {% if objProfile %} | |||
|
No newline at end of file | ||||
|
17 | {% if objProfile.id == entry.id %} | |||
|
No newline at end of file | ||||
|
18 | <option value="{{ entry.id }}" selected>{{ entry.name }}</option> | |||
|
No newline at end of file | ||||
|
19 | {% else %} No newline at end of file | |||
16 | <option value="{{ entry.id }}">{{ entry.name }}</option> No newline at end of file |
|
20 | <option value="{{ entry.id }}">{{ entry.name }}</option> | |
|
21 | {% endif %} | |||
|
No newline at end of file | ||||
|
22 | {% else %} | |||
|
No newline at end of file | ||||
|
23 | <option value="{{ entry.id }}">{{ entry.name }}</option> | |||
|
No newline at end of file | ||||
|
24 | {% endif %} No newline at end of file | |||
17 | {% endfor %} No newline at end of file |
|
25 | {% endfor %} | |
18 | </select> No newline at end of file |
|
26 | </select> | |
19 | {% else %} No newline at end of file |
|
27 | {% else %} |
@@ -1,12 +1,12 | |||||
1 | {% extends "abscontrol/index.html" %} |
|
1 | {% extends "abscontrol/index.html" %} | |
No newline at end of file |
|
2 | {% block title %}ABS CONTROL:::PROFILE:::{{ objProfile.name }}{% endblock %} No newline at end of file | ||
2 | {% block title %}ABS CONTROL:::PROFILE:::{{ nameProfile }}{% endblock %} No newline at end of file |
|
|||
3 | No newline at end of file |
|
3 | ||
4 | {% block maincolumn%} No newline at end of file |
|
4 | {% block maincolumn%} | |
5 | <div id="maincolumn"> No newline at end of file |
|
5 | <div id="maincolumn"> | |
6 | <form action="/abscontrol/save/" method="post"> No newline at end of file |
|
6 | <form action="/abscontrol/save/" method="post"> | |
7 | <div id="divProfile"> No newline at end of file |
|
7 | <div id="divProfile"> | |
8 | <label for="lblName">Profile:</label> |
|
8 | <label for="lblName">Profile:</label> | |
No newline at end of file |
|
9 | <label for="lblProfile">{{ objProfile.name }}</label> No newline at end of file | ||
9 | <label for="lblProfile">{{ nameProfile }}</label> No newline at end of file |
|
|||
10 | </div> No newline at end of file |
|
10 | </div> | |
11 | <div id="divPattern"> No newline at end of file |
|
11 | <div id="divPattern"> | |
12 | {% if patternChoosen %} No newline at end of file |
|
12 | {% if patternChoosen %} |
General Comments 0
You need to be logged in to leave comments.
Login now