And let me know wether it worked or not.
On Thursday, June 25, 2020, ratnadeep ray <ratnadeep9@gmail.com> wrote:
On Thursday, June 25, 2020, ratnadeep ray <ratnadeep9@gmail.com> wrote:
Hi Ogunsanya,--Now I added the same as per your suggestion. Following is my urls.py contnentfrom django.urls import path
from fusioncharts import views
app_name = 'fusioncharts'
urlpatterns = [
path('push-data/', views.push_data, name='push-data'),
path('home/', views.home, name='home'),
path('display_data/<str:component>' , views.display_data, name='display_data'),
path('index/', views.index, name=''),
path('process_data/<str:ver>', views.process_data, name='process_data'),
]And my template content (process_data.py)is as follows:<html lang="en">
<head>
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8">
<title>Home</title>
</head>
<body>
<center>
<h3>Index page</h3>
<table align='center'>
<tr><td>Select the version to compare with</td><td>
<select name="version" id="version" onchange="location = this.value;">
<option>Select version to compare with</option>
{%for ver in version_list%}
<option value={{ver}} href="{% url 'fusioncharts:process_data' ver %}">{{ver}}</option>
{% endfor %}
</select>
</td></tr>
<tr><td>The current version</td><td>{{version}}</td>
</tr>
</table>
<br><br><br>
</body>
</html>But now I am getting the following error:Page not found (404)
Request Method: GET Request URL: http://127.0.0.1:8000/index/ 11.5.1.18900-96
http://127.0.0.1:8000/index/11.5.1.18900-97
Using the URLconf defined in Piechart_Excel.urls, Django tried these URL patterns, in this order:
admin/
push-data/ [name='push-data']
home/ [name='home']
display_data/<str:component> [name='display_data']
index/
process_data/<str:ver> [name='process_data']
The current path, index/11.5.1.18900-96, didn't match any of these.
Can you suggest now what's going wrong ?
On Thursday, 25 June 2020 12:08:12 UTC+5:30, Ogunsanya Opeyemi wrote:Also include in your URL before your urlpatternsapp_name=yourappnameAnd in your template URL write{% url 'yourappname:process_data' ver %}And if you still have issues send the update you made and let me check.
On Thursday, June 25, 2020, ratnadeep ray <ratna...@gmail.com> wrote:Hi Ogunsanya,--I have added that line of code but still getting the same error.So what can be done next ?
On Thursday, 25 June 2020 00:25:17 UTC+5:30, Ogunsanya Opeyemi wrote:
Yes
On Wednesday, June 24, 2020, ratnadeep ray <ratna...@gmail.com> wrote:So I need to add this also:
urlpatterns = [
...
...
path('process_data/', views.process_data, name='process_data'),
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5c62826f-a652 .-43c3-a89e-29cf1855a9f8o%40goo glegroups.com
--OGUNSANYA OPEYEMI
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bb999e9e-5fd9 .-45ec-9a59-86e3ed9b6454o%40goo glegroups.com
--OGUNSANYA OPEYEMI
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/14aca6b8- .8bc9-455a-b3c6-de0c8740a9a7o% 40googlegroups.com
--
OGUNSANYA OPEYEMI
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABJxPrFiYvmQRZ68VRPZ2Xio2mbfJ4UChDy6Aw9snko8SXhegA%40mail.gmail.com.
No comments:
Post a Comment