Introduce placeholder pages for home and write_article

This commit is contained in:
Théophile Bastian 2017-09-22 13:44:36 +02:00
parent 32d4bd061c
commit 31c4b046fc
5 changed files with 24 additions and 2 deletions

View file

@ -0,0 +1,5 @@
{% extends "base.html" %}
{% block content %}
<h1>Imma website!</h1>
{% endblock content %}

View file

@ -0,0 +1,5 @@
{% extends "base.html" %}
{% block content %}
<h1>Plz send articlez!</h1>
{% endblock content %}

View file

@ -1,13 +1,13 @@
<div id="sidebar" class="col-sm-3 col-md-2 sidebar collapse"> <div id="sidebar" class="col-sm-3 col-md-2 sidebar collapse">
<ul class="nav nav-sidebar"> <ul class="nav nav-sidebar">
<li> <li>
<a href="#"> <a href="{% url "homepage" %}">
<i class="fa fa-home" aria-hidden="true"></i> Accueil <i class="fa fa-home" aria-hidden="true"></i> Accueil
</a> </a>
</li> </li>
<li> <li>
<a href="#"> <a href="{% url "write_article" %}">
<i class="fa fa-pencil" aria-hidden="true"></i> Écrire un article <i class="fa fa-pencil" aria-hidden="true"></i> Écrire un article
</a> </a>
</li> </li>

View file

@ -4,6 +4,8 @@ from . import views
app_name = 'manisite' app_name = 'manisite'
urlpatterns = [ urlpatterns = [
url(r'^$', views.HomeView.as_view(), name='homepage'),
url(r'^ecrire$', views.WriteArticleView.as_view(), name='write_article'),
url(r'^(?P<year>\d{4})-(?P<nYear>\d{4})/', url(r'^(?P<year>\d{4})-(?P<nYear>\d{4})/',
views.YearView.as_view(), name='year_view'), views.YearView.as_view(), name='year_view'),
] ]

View file

@ -7,6 +7,16 @@ from datetime import date
from mainsite.models import Publication from mainsite.models import Publication
class HomeView(TemplateView):
''' Website's homepage '''
template_name = 'mainsite/homepage.html'
class WriteArticleView(TemplateView):
''' Tell the readers how they can contribute to the BOcal '''
template_name = 'mainsite/write_article.html'
class YearView(TemplateView): class YearView(TemplateView):
''' Display a year worth of BOcals ''' ''' Display a year worth of BOcals '''
template_name = 'mainsite/year_view.html' template_name = 'mainsite/year_view.html'