Thanks.
It may just be a Safari issue as Chrome has not duplicated the error.
Maybe this is just another varient on:
Broken Pipe Error in django dev server
That’s what’s odd, I’ve searched all the files, css, javascript, migrations, templates, views, urls, etc. and did not find a single reference to leadership.
The only thing I’ve noticed is sometimes the first time I click on an item I may get ther error, but the second time I do not.
For example, I wrap an object with an href and pass a specific vale to identify which one on the page was selected, which takes me to a view whose template renders a set of graph. The second time I click on it, no error.
Error in terminal:
32
[17/Nov/2024 15:41:28] "GET /ISO22301/drilldown/32 HTTP/1.1" 200 10000
[17/Nov/2024 15:41:28] "GET /static/css/styles.css HTTP/1.1" 304 0
Not Found: /ISO22301/leadership/
[17/Nov/2024 15:41:28] "GET /ISO22301/leadership/ HTTP/1.1" 404 4650
Not Found: /favicon.ico
[17/Nov/2024 15:41:29] "GET /favicon.ico HTTP/1.1" 404 2371
Not Found: /favicon.ico
[17/Nov/2024 15:41:29] "GET /favicon.ico HTTP/1.1" 404 2371
[17/Nov/2024 15:41:32] "GET /ISO22301/dashboard/? HTTP/1.1" 200 34675
[17/Nov/2024 15:41:32] "GET /static/css/styles.css HTTP/1.1" 304 0
[17/Nov/2024 15:41:32] "GET /static/images/favicon.png HTTP/1.1" 304 0
[17/Nov/2024 15:41:32] "GET /static/css/styles.css HTTP/1.1" 304 0
32
[17/Nov/2024 15:41:34] "GET /ISO22301/drilldown/32 HTTP/1.1" 200 10000
[17/Nov/2024 15:41:34] "GET /static/css/styles.css HTTP/1.1" 304 0
Template code that uses url (a_text.id is an integer, 32 in this case):
<a href="{% url 'drilldown' a_text.id %}" >
<div class="Objective" style= 'background-color:{{ a_text.objective_background }}' title='{{ a_text.objective_color }}' aria-label='Status is {{ a_text.objective_color }}'>
{{ a_text.objective_text|linebreaks}}</div>
<!-- Adds color as text in Objective if needed for color blind users
<span><div class="Objective" style= 'background-color:{{ a_text.objective_background }}' title='{{ a_text.objective_color }}' aria-label='{{ a_text.objective_color }}'>
{{ a_text.objective_text|linebreaks}}<c>{{ a_text.objective_color }}</b> </div></span>-->
</a>
views.drilldown:
def drilldown(request,id):
#create values to pass to eChart js to dynamically set chart data and options
chartdata = {'xlabels': ['Q1 23', 'Q2 23', 'Q3 23', 'Q4 23', 'Q1 24', 'Q2 24'], 'ydata1':[5, 20, 25, 10, 10, 20], 'ydata2':[5, 4, 3, 5, 10, 0],}
chartoptions = ['line', 'line', '']
print(id)
context = {
'id': id,
'chartdata': chartdata,
'chartoptions': chartoptions,
}
return render(request, 'ISO22301/drilldown.html', context)
urls.py:
urlpatterns = [
path('dataentry/', views.dataentry, name='dataentry'),
path('welcome/', views.welcome, name='welcome'),
path('dashboard/', views.dashboard, name='dashboard'),
path("bye/", bye, name="bye"),
path("login/", Login.as_view(), name="login"),
path("logout/", Logout.as_view(), name="logout"),
path('graphs/', views.graphs, name='graphs'),
path('drilldown/<int:id>', views.drilldown, name='drilldown'),
path('history/', views.history, name ='history'),
]