From 539f252a22d5844b4a16f9e6e456d7b8ef3c4844 Mon Sep 17 00:00:00 2001 From: lhark Date: Sat, 2 Jul 2016 00:38:12 +0200 Subject: [PATCH] Add minimal logs app and root index page --- logs/__init__.py | 0 logs/admin.py | 3 +++ logs/migrations/__init__.py | 0 logs/models.py | 3 +++ logs/templates/logs/index.html | 7 +++++++ logs/tests.py | 3 +++ logs/views.py | 4 ++++ re2o/urls.py | 3 +++ users/urls.py | 9 +++++---- 9 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 logs/__init__.py create mode 100644 logs/admin.py create mode 100644 logs/migrations/__init__.py create mode 100644 logs/models.py create mode 100644 logs/templates/logs/index.html create mode 100644 logs/tests.py create mode 100644 logs/views.py diff --git a/logs/__init__.py b/logs/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/logs/admin.py b/logs/admin.py new file mode 100644 index 00000000..8c38f3f3 --- /dev/null +++ b/logs/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/logs/migrations/__init__.py b/logs/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/logs/models.py b/logs/models.py new file mode 100644 index 00000000..71a83623 --- /dev/null +++ b/logs/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/logs/templates/logs/index.html b/logs/templates/logs/index.html new file mode 100644 index 00000000..3047a7f1 --- /dev/null +++ b/logs/templates/logs/index.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} +{% load bootstrap3 %} + +{% block content %} +

Bienvenue sur re2o.rez !

+{% endblock %} + diff --git a/logs/tests.py b/logs/tests.py new file mode 100644 index 00000000..7ce503c2 --- /dev/null +++ b/logs/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/logs/views.py b/logs/views.py new file mode 100644 index 00000000..971138fe --- /dev/null +++ b/logs/views.py @@ -0,0 +1,4 @@ +from django.shortcuts import render + +def index(request): + return render(request, 'logs/index.html') diff --git a/re2o/urls.py b/re2o/urls.py index c9f34474..faf471f2 100644 --- a/re2o/urls.py +++ b/re2o/urls.py @@ -15,7 +15,10 @@ Including another URLconf from django.conf.urls import include, url from django.contrib import admin +from logs.views import index + urlpatterns = [ + url(r'^$', index), url(r'^admin/', include(admin.site.urls)), url(r'^users/', include('users.urls')), url(r'^search/', include('search.urls')), diff --git a/users/urls.py b/users/urls.py index 12c1e2f1..6b0542a8 100644 --- a/users/urls.py +++ b/users/urls.py @@ -3,10 +3,11 @@ from django.conf.urls import url from . import views urlpatterns = [ - url(r'^new_user/$', views.new_user, name='new_user'), - url(r'^edit_info/(?P[0-9]+)$', views.edit_info, name='edit_info'), - url(r'^state/(?P[0-9]+)$', views.state, name='state'), - url(r'^password/(?P[0-9]+)$', views.password, name='password'), + url(r'^new_user/$', views.new_user, name='users-new-user'), + url(r'^edit_info/(?P[0-9]+)$', views.edit_info, name='users-edit-info'), + url(r'^state/(?P[0-9]+)$', views.state, name='users-state'), + url(r'^password/(?P[0-9]+)$', views.password, name='users-password'), + url(r'^$', views.index, name='users-index'), ]