Introduce placeholder pages for home and write_article
This commit is contained in:
parent
32d4bd061c
commit
31c4b046fc
5 changed files with 24 additions and 2 deletions
5
mainsite/templates/mainsite/homepage.html
Normal file
5
mainsite/templates/mainsite/homepage.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Imma website!</h1>
|
||||
{% endblock content %}
|
5
mainsite/templates/mainsite/write_article.html
Normal file
5
mainsite/templates/mainsite/write_article.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Plz send articlez!</h1>
|
||||
{% endblock content %}
|
|
@ -1,13 +1,13 @@
|
|||
<div id="sidebar" class="col-sm-3 col-md-2 sidebar collapse">
|
||||
<ul class="nav nav-sidebar">
|
||||
<li>
|
||||
<a href="#">
|
||||
<a href="{% url "homepage" %}">
|
||||
<i class="fa fa-home" aria-hidden="true"></i> Accueil
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#">
|
||||
<a href="{% url "write_article" %}">
|
||||
<i class="fa fa-pencil" aria-hidden="true"></i> Écrire un article
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -4,6 +4,8 @@ from . import views
|
|||
app_name = 'manisite'
|
||||
|
||||
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})/',
|
||||
views.YearView.as_view(), name='year_view'),
|
||||
]
|
||||
|
|
|
@ -7,6 +7,16 @@ from datetime import date
|
|||
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):
|
||||
''' Display a year worth of BOcals '''
|
||||
template_name = 'mainsite/year_view.html'
|
||||
|
|
Loading…
Reference in a new issue