Modification des urls, j'avais prévu plus mais c'est le depaps

This commit is contained in:
Yoann Pétri 2018-01-28 23:58:01 +01:00
parent 772cf3e5f6
commit d5cf119597
4 changed files with 10 additions and 4 deletions

View file

@ -22,4 +22,5 @@ urlpatterns = [
path('admin/', admin.site.urls),
path('', views.home),
path('content/', include('content.urls')),
path('vote/', include('vote.urls')),
]

View file

@ -25,7 +25,7 @@
<a href="{% url 'content:category-list' category_id=c.id %}">{{c.name}}
</a></li>
{% endfor %}
<li><a href="">Vote</a></li>
<li><a href="{% url 'vote:home' %}">Vote</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu">

View file

@ -1,2 +1,6 @@
Lol
{% extends 'base.html' %}
{% block content %}
<div class="container">
<h2>Votes disponibles</h2>
</div>
{% endblock %}

View file

@ -1,6 +1,7 @@
from django.urls import path
from . import views
app_name = 'vote'
urlpatterns = [
path('home', views.home)
path('home', views.home, name='home')
]