1
0
mirror of https://github.com/creyD/asiimov.git synced 2026-06-12 00:52:23 +02:00

Added Config Draft

This commit is contained in:
2020-01-15 23:06:52 +01:00
parent 88d3c22b12
commit ff713e37c8
4 changed files with 18 additions and 2 deletions

View File

@@ -24,7 +24,7 @@
{% if user.is_authenticated %}
<a href="{% url 'offer_create' %}">Add Offer</a> | <a href="{% url 'me_settings' %}">settings</a> | Welcome, <a href="{% url 'me' %}">{{ user.gamer.display_name }}</a>
{% else %}
<a href=""><img src="{% static 'pic/steam_sign_in.png' %}" /></a>
<a href="{% url 'signup' %}"><img src="{% static 'pic/steam_sign_in.png' %}" /></a>
{% endif %}
</div>
</nav>

View File

@@ -0,0 +1 @@
{{ url }}

View File

@@ -16,5 +16,7 @@ urlpatterns = [
path('help', views.help, name='help'),
path('imprint', views.imprint, name='imprint'),
path('about', views.about, name='about')
path('about', views.about, name='about'),
path('signup', views.signup, name='signup')
]

View File

@@ -2,6 +2,8 @@ from .models import Offer, Gamer
from django.shortcuts import render, get_object_or_404, redirect
from django.http import HttpResponseForbidden
from django.contrib.auth.decorators import login_required
# For Steam Open ID handling
from oic.oic import Client
# STATIC PAGES
@@ -36,6 +38,17 @@ def search(request, filter):
return render(request, 'core/filter.html')
# USER SIGNUP
def signup(request):
client = Client()
issuer = client.discover('https://steamcommunity.com/openid/login')
#provider_info = client.provider_config(issuer)
context = {
'url': issuer
}
return render(request, 'core/signup.html', context)
# USER AREA
@login_required
def offer_refresh(request, offerID):