Thanks Cameron,
Just got lucky yesterday and found a resource at my end to help me out.
Thank you
On Tue, 2 Apr 2019 at 04:31, Cameron Simpson wrote:
>
> On 29Mar2019 21:18, nitin chandra wrote:
> >Hi Everyone,
> >I need some guidance / corrections to my code.
> >I hosted a demo site on pythonanywhere.com and to test the initial
> >pages I wrote some test code.
> [...]
>
> Hi Nitin,
>
> I looks like nobody has replied; this probably means that nobody has the
> required specialty expertise to help you. (I don't.)
>
> >Good news, put in 10 hrs, tried so many suggestion given on the net,
> >yet non worked. So finally mailing the list.
>
> Might I suggest that you ask on the django-users mailing list, here:
>
> https://www.djangoproject.com/community/
>
> You want the "Using Django" list there.
>
> There's a guideline to posting here:
>
> https://code.djangoproject.com/wiki/UsingTheMailingList
>
> but your post looks fairly good on the face of it.
>
> Hoping this helps,
> Cameron Simpson
>
> >
> >Objective : display main page with multiple links to other pages. Use
> >jQuery plugins, click the link on main page and open other pages.
> >
> >The following path and pages are posted below.
> >
> >Thanks
> >
> >Nitin Chandra
> >
> >
> >ERROR
> >When I click on 'Table' link on 'home' page, the following error is displayed
> >
> >http://selftech.pythonanywhere.com/table.html
> >Page not found (404)
> >
> >Request Method:GET
> >Request URL:http://selftech.pythonanywhere.com/table.html
> >
> >Using the URLconf defined in eduinfra.urls, Django tried these URL
> >patterns, in this order:
> >
> >admin/
> >[name='home.html']
> >
> >The current path, table.html, didn't match any of these.
> >
> >You're seeing this error because you have DEBUG = True in your Django
> >settings file. Change that to False, and Django will display a
> >standard 404 page.
> >
> >+++
> >
> >/home/selfTech/edu/tech/
> >
> > __init__.py
> > admin.py
> > apps.py
> > models.py
> > tests.py
> > urls.py
> > views.py
> >
> >/home/selfTech/edu/tech/templates/
> >
> > base.html
> > home.html
> > table.html
> >***
> >our 'base.html' code below (test code, gets rendered correctly)
> >
> >
> > Navbar
> > >data-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02"
> >aria-expanded="false" aria-label="Toggle navigation">
> >
> >
> >
> >
> >
> >
> >Home >class="sr-only">(current)
> >
> >
> >Link
> >
> >
> >Table
> >
> >
> > >aria-disabled="true">Disabled
> >
> >
> >
> >
> > >type="submit">Search
> >
> >
> >
> > *
> >home.html
> >
> >{% extends 'base.html' %}
> >
> >{% block content%}
> >Hello TEAM :)
> >{% endblock %}
> >***
> >table.html (gives ERROR 404)
> >
> >
> >
> >
> >Name
> >
> >
> >
> >
> >*
> >/home/selfTech/edu/tech/
> >
> >urls.py
> >
> >from django.urls import path
> >from . import views
> >
> >urlpatterns = [
> >path('', views.home, name='home'),
> >path('table/', views.table, name='table') ## various combo did not work
> > # path (' ', views.table, name='table') ## nope
> > # path (' ', views.table, name='table.html') # nope
> >]
> >
> >*///
> >views.py
> >
> >from django.shortcuts import render
> >from django.http import HttpResponse
> ># Create your views here.
> >
> >def home (request): /// correctly renders
> >return render (request, "home.html",{})
> >
> >def table (request): gives error
> >return HttpResponse ('This is a test Page')
> ># Tried the below code, nada
> ># return render (request, "table.html",{})
> >
> >*\
> >___
> >Tutor maillist - Tutor@python.org
> >To unsubscribe or change subscription options:
> >https://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor