I need to link to link two django templates with a button on my index page,what would be the best way of doing it? I need to link bis.html. This is how I have things set up.
urls.py
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^$', HomeView.as_view()),
url(r'^$/bis', BisView.as_view()),
]
views.py
class HomeView(TemplateView):
template_name = 'index.html'
class BisView(TemplateView):
template_name = 'bis.html'
index.html
...
<li><a href="/bis">Bisection</a></li>
...
Aucun commentaire:
Enregistrer un commentaire