Commit f3281fa3 authored by Hubert Denkmair's avatar Hubert Denkmair
Browse files

prepare profile page

parent eb2848a0
......@@ -6,9 +6,10 @@ from django.views.generic.base import RedirectView
from core import views as core_views
urlpatterns = [
path('', TemplateView.as_view(template_name='index.html'), name='home'),
path('', TemplateView.as_view(template_name='core/index.html'), name='home'),
path('admin/', admin.site.urls),
path('signup/', core_views.signup, name='signup'),
path('profile/', core_views.profile, name='profile'),
path('login/', auth_views.login, {'template_name': 'login.html'}, name='login'),
path('logout/', auth_views.logout, {'next_page': 'login'}, name='logout'),
path('watch/', TemplateView.as_view(template_name='visualization/watch.html'), name='watch'),
......
......@@ -35,6 +35,7 @@
<li><a href="{% url 'docs' %}">API</a></li>
<li><a href="{% url 'highscore_table' %}">Highscores</a></li>
{% if user.is_authenticated %}
<li><a href="{% url 'profile' %}">Profile</a></li>
<li><a href="{% url 'logout' %}">Logout</a></li>
{% else %}
<li><a href="{% url 'login' %}">Login</a></li>
......
{% extends 'base.html' %}
{% extends 'core/base.html' %}
{% load static %}
{% block content %}
<h1>Schlangenprogrammiernacht 2018</h1>
......
{% extends 'core/base.html' %}
{% load static %}
{% block content %}
<h1>Profile</h1>
{% endblock %}
{% extends 'base.html' %}
{% extends 'core/base.html' %}
{% block content %}
<h2>Login</h2>
......
{% extends 'base.html' %}
{% extends 'core/base.html' %}
{% block content %}
<h2>Sign up</h2>
......
from django.contrib.auth import login, authenticate
from django.contrib.auth.forms import UserCreationForm
from django.shortcuts import render, redirect, get_object_or_404
from django.shortcuts import render, redirect
def signup(request):
......@@ -16,3 +16,7 @@ def signup(request):
else:
form = UserCreationForm()
return render(request, 'signup.html', {'form': form})
def profile(request):
return render(request, 'core/profile.html')
\ No newline at end of file
return [==[
{% extends 'base.html' %}
{% extends 'core/base.html' %}
{% load static %}
{% block earlycss %}
......
{% extends 'base.html' %}
{% extends 'core/base.html' %}
{% load static %}
{% block title %}
......
{% extends 'base.html' %}
{% extends 'core/base.html' %}
{% load static %}
{% block css %}
......
{% extends 'base.html' %}
{% extends 'core/base.html' %}
{% load widget_tweaks %}
{% load static %}
......
{% extends 'base.html' %}
{% extends 'core/base.html' %}
{% load static %}
{% block content %}
<div id="stage" class="fullwindow" style="background-color:#00000080"></div>
{% 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