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:
@@ -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>
|
||||
|
||||
1
src/core/templates/core/signup.html
Normal file
1
src/core/templates/core/signup.html
Normal file
@@ -0,0 +1 @@
|
||||
{{ url }}
|
||||
@@ -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')
|
||||
]
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user