Skip to content

Commit 5e20aff

Browse files
committed
Merge branch 'develop'
Completed error handling in subadd:addentry; this is polished enough for the first semi-useful rough alpha, at this point.
2 parents 255f7d4 + 6a79f86 commit 5e20aff

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

subadd/templates/subadd/add.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ <h2>Add Substance</h2>
4343

4444
<br>
4545

46-
<input type="submit" value="Add Substance" />
46+
{% if add_sub_form %}
4747

48+
<input type="submit" value="Add Substance" />
49+
50+
{% endif %}
51+
4852
</form>
4953

5054
</body>

subadd/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ def addentry(request):
6565

6666
except:
6767
context = {}
68-
context['error_message'] = "Please navigate to addentry only from here."
68+
context['error_message'] = "Please navigate to addentry (here) only from the links."
6969

70-
return render(request, 'subadd/add.html', context)
70+
return render(request, 'subadd/add.html', add_header_info(context))
7171

7272

7373
try:

0 commit comments

Comments
 (0)