Commit ae0a1aa9 authored by BERJON Matthieu's avatar BERJON Matthieu
Browse files

Add of webapp and login views

I added the webapp view that just list the name of the apps. I added as
well a login view. Unfortunately the hashes of the password recorded in
the database do not match with the base django algorithm and people
can't identify themselves at the moment.
Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <>
parent 2591cfb2
......@@ -130,10 +130,12 @@ STATICFILES_FINDERS = (
# 'djangobower.finders.BowerFinder', # add this
'compressor.finders.CompressorFinder', # add this
('text/x-scss', 'django_libsass.SassCompiler'),
from django.conf.urls import url
from django.contrib.auth import views as auth_views
from . import views
urlpatterns = [
url(r'^$', views.index),
url(r'^$', views.index, name="poc_home"),
url(r'^users/', views.user),
url(r'^webapps/', views.list_webapps, name='list_webapps'),
{'template_name': 'login.html'},
url(r'^logout/$', auth_views.logout, name='logout'),
url(r'^signup/', views.signup, name='signup'),
from django.shortcuts import render
from django.contrib.auth.models import User
from .models import Webapp
def index(request):
......@@ -11,3 +12,16 @@ def user(request):
# quotas = Quota.objects.all()
users = User.objects.all()
return render(request, "user.html", locals())
def list_webapps(request):
webapps = Webapp.objects.all()
return render(request, "webapps.html", locals())
def login(request):
def signup(request):
{% extends 'base.html' %}
{% block title %}Login{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Login</button>
{% endblock %}
{% extends "base.html" %}
{% block title %}Webapps{% endblock %}
{% block content %}
{% for webapp in webapps %}
<li>{{ }}</li>
{% endfor %}
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment