mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
Making it pretty
This commit is contained in:
parent
a021141b47
commit
b748c223c8
@ -134,7 +134,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
AUTH_USER_MODEL = 'authentication.AllianceUser'
|
||||
########## END USER CONFIGURATION
|
||||
|
||||
LOGIN_URL = '/loginuser/'
|
||||
LOGIN_URL = '/login_user/'
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/1.6/howto/static-files/
|
||||
@ -151,11 +151,11 @@ STATIC_URL = '/static/'
|
||||
|
||||
# ALLIANCE INFO
|
||||
ALLIANCE_ID = 0
|
||||
ALLIANCE_NAME = 'somealliance'
|
||||
ALLIANCE_NAME = 'AllianceName'
|
||||
|
||||
# Jabber Prosody Info
|
||||
OPENFIRE_ADDRESS = "http://domain.com:9090/"
|
||||
OPENFIRE_SECRET_KEY = "secretkey"
|
||||
OPENFIRE_ADDRESS = "http://someaddress.com:9090/"
|
||||
OPENFIRE_SECRET_KEY = "somekey"
|
||||
|
||||
# Mumble settings
|
||||
MUMBLE_SERVER_ID = 1
|
@ -4,18 +4,24 @@ from django.contrib import admin
|
||||
admin.autodiscover()
|
||||
|
||||
urlpatterns = patterns('',
|
||||
# Examples:
|
||||
# url(r'^$', 'allianceauth.views.home', name='home'),
|
||||
# url(r'^blog/', include('blog.urls')),
|
||||
url(r'^$', 'portal.views.index', name='index'),
|
||||
url(r'^characters/', 'portal.views.characters_view', name='characters'),
|
||||
url(r'^apikeymanagment/', 'portal.views.apikeymanagment_view', name='apimanagment'),
|
||||
url(r'^maincharacterchange/(\d+)/$', 'portal.views.main_character_change', name='main_character_change'),
|
||||
url(r'^applications/', 'portal.views.applications_view', name='applications'),
|
||||
url(r'^activateforum/$', 'portal.views.activate_forum', name='activateforum'),
|
||||
url(r'^activatejabber/$', 'portal.views.activate_jabber', name='activatejabber'),
|
||||
url(r'^activatemumble/$', 'portal.views.activate_mumble', name='activatemumble'),
|
||||
url(r'^loginuser/','authentication.views.login_user', name='loginuser'),
|
||||
url(r'^logoutuser/','authentication.views.logout_user', name='logoutuser'),
|
||||
url(r'^register/', 'registration.views.register', name='register'),
|
||||
|
||||
# Main Views
|
||||
url(r'^$', 'portal.views.index_view', name='auth_index'),
|
||||
url(r'^dashboard/$', 'portal.views.dashboard_view', name='auth_dashboard'),
|
||||
url(r'^characters/', 'portal.views.characters_view', name='auth_characters'),
|
||||
url(r'^api_key_management/', 'portal.views.api_key_management_view', name='auth_api_key_management'),
|
||||
url(r'^applications/', 'portal.views.applications_view', name='auth_applications'),
|
||||
|
||||
# Register
|
||||
url(r'^register/', 'registration.views.register', name='auth_register'),
|
||||
|
||||
# Authentication
|
||||
url(r'^login_user/', 'authentication.views.login_user', name='auth_login_user'),
|
||||
url(r'^logout_user/', 'authentication.views.logout_user', name='auth_logout_user'),
|
||||
|
||||
# None views
|
||||
url(r'^main_character_change/(\d+)/$', 'portal.views.main_character_change', name='auth_main_character_change'),
|
||||
url(r'^activate_forum/$', 'portal.views.activate_forum', name='auth_activate_forum'),
|
||||
url(r'^activate_jabber/$', 'portal.views.activate_jabber', name='auth_activate_jabber'),
|
||||
url(r'^activate_mumble/$', 'portal.views.activate_mumble', name='auth_activate_mumble'),
|
||||
)
|
||||
|
@ -55,15 +55,18 @@ class AllianceUserManager(BaseUserManager):
|
||||
user.save(using=self._db)
|
||||
return user
|
||||
|
||||
def update_user_main_character(self,character_id, user_id):
|
||||
def update_user_main_character(self, character_id, user_id):
|
||||
user = AllianceUser.objects.get(id=user_id)
|
||||
user.main_char_id = character_id
|
||||
user.save(update_fields=['main_char_id'])
|
||||
|
||||
def check_if_user_exist(self, user_id):
|
||||
def check_if_user_exist_by_id(self, user_id):
|
||||
return AllianceUser.objects.filter(id=user_id).exists()
|
||||
|
||||
# The icv user
|
||||
def check_if_user_exist_by_name(self, user_name):
|
||||
return AllianceUser.objects.filter(username=user_name).exists()
|
||||
|
||||
|
||||
class AllianceUser(AbstractBaseUser):
|
||||
username = models.CharField(max_length = 40,unique=True)
|
||||
email = models.EmailField(max_length=255,unique=True)
|
||||
|
@ -1,10 +1,10 @@
|
||||
from django.contrib.auth import authenticate, login, logout
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.shortcuts import render_to_response, render
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from django.template import RequestContext
|
||||
from forms import LoginForm
|
||||
|
||||
|
||||
# Create your views here.
|
||||
def login_user(request):
|
||||
if request.method == 'POST':
|
||||
@ -15,11 +15,14 @@ def login_user(request):
|
||||
if user is not None:
|
||||
if user.is_active:
|
||||
login(request, user)
|
||||
return HttpResponseRedirect("/")
|
||||
return HttpResponseRedirect("/dashboard")
|
||||
|
||||
return render_to_response('public/login.html', {'form': form, 'error': True},
|
||||
context_instance=RequestContext(request))
|
||||
else:
|
||||
form = LoginForm()
|
||||
|
||||
return render_to_response('public/login.html',{'form':form}, context_instance=RequestContext(request))
|
||||
return render_to_response('public/login.html', {'form': form}, context_instance=RequestContext(request))
|
||||
|
||||
|
||||
def logout_user(request):
|
||||
|
@ -1,15 +1,12 @@
|
||||
import evelink.api # Raw API access
|
||||
import evelink.char # Wrapped API access for the /char/ API path
|
||||
import evelink.eve # Wrapped API access for the /eve/ API path
|
||||
|
||||
from models import EveCharacter
|
||||
|
||||
|
||||
class EveCharacterManager():
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def create_character(self,character_id, character_name,corporation_id,
|
||||
def create_character(self, character_id, character_name, corporation_id,
|
||||
corporation_name, alliance_id,
|
||||
alliance_name, allianceuser_owner):
|
||||
|
||||
@ -23,7 +20,19 @@ class EveCharacterManager():
|
||||
eve_char.allianceuser_owner = allianceuser_owner
|
||||
|
||||
eve_char.save()
|
||||
|
||||
|
||||
def create_characters_from_list(self, chars, owner):
|
||||
for char in chars.result:
|
||||
if not self.check_if_character_exist(chars.result[char]['name']):
|
||||
self.create_character(chars.result[char]['id'],
|
||||
chars.result[char]['name'],
|
||||
chars.result[char]['corp']['id'], chars.result[char]['corp']['name'],
|
||||
chars.result[char]['alliance']['id'], chars.result[char]['alliance']['name'],
|
||||
owner)
|
||||
|
||||
def check_if_character_exist(self, char_name):
|
||||
return EveCharacter.objects.filter(character_name=char_name).exists()
|
||||
|
||||
def get_characters_by_owner_id(self, owner_id):
|
||||
return EveCharacter.objects.all().filter(allianceuser_owner=owner_id)
|
||||
|
||||
@ -39,36 +48,4 @@ class EveCharacterManager():
|
||||
if character.allianceuser_owner.id == user_id:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
class EveApiManager():
|
||||
|
||||
characterManager = EveCharacterManager()
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def CreateCharactersFromID(self,api_id, api_key, user):
|
||||
# Create user
|
||||
api = evelink.api.API(api_key=(api_id, api_key))
|
||||
# Should get characters
|
||||
account = evelink.account.Account(api=api)
|
||||
chars = account.characters()
|
||||
|
||||
# Have our characters now lets populate database
|
||||
for char in chars.result:
|
||||
self.characterManager.create_character( chars.result[char]['id'], chars.result[char]['name'],
|
||||
chars.result[char]['corp']['id'], chars.result[char]['corp']['name'],
|
||||
chars.result[char]['alliance']['id'],chars.result[char]['alliance']['name'],
|
||||
user)
|
||||
#Done
|
||||
|
||||
def GetCorpNameByKey(self, api_id, api_key):
|
||||
pass
|
||||
|
||||
def GetAllianceNameByKey(self, api_id, api_key):
|
||||
pass
|
||||
|
||||
def GetCharactersByKey(self, api_id, api_key):
|
||||
pass
|
||||
|
||||
return False
|
@ -2,12 +2,12 @@ from django.db import models
|
||||
|
||||
from authentication.models import AllianceUser
|
||||
|
||||
# Create your models here.
|
||||
|
||||
class EveCharacter(models.Model):
|
||||
character_id = models.CharField(max_length=254)
|
||||
character_name = models.CharField(max_length=254)
|
||||
corporation_id = models.CharField(max_length=254)
|
||||
corporation_name = models.CharField(max_length=254)
|
||||
alliance_id = models.CharField(max_length=254)
|
||||
alliance_name = models.CharField(max_length=254)
|
||||
character_id = models.CharField(max_length=254)
|
||||
character_name = models.CharField(max_length=254)
|
||||
corporation_id = models.CharField(max_length=254)
|
||||
corporation_name = models.CharField(max_length=254)
|
||||
alliance_id = models.CharField(max_length=254)
|
||||
alliance_name = models.CharField(max_length=254)
|
||||
allianceuser_owner = models.ForeignKey(AllianceUser)
|
@ -3,25 +3,50 @@ from django.shortcuts import render_to_response, HttpResponseRedirect
|
||||
from django.template import RequestContext
|
||||
from django.contrib.auth.decorators import login_required
|
||||
|
||||
from forms import UpdateKeyForm
|
||||
|
||||
from evespecific.managers import EveCharacterManager
|
||||
from authentication.models import AllianceUserManager
|
||||
from services.phpbb3_manager import Phpbb3Manager
|
||||
from services.jabber_manager import JabberManager
|
||||
from services.mumble_manager import MumbleManager
|
||||
|
||||
# Create your views here.
|
||||
from forms import UpdateKeyForm
|
||||
|
||||
|
||||
def index_view(request):
|
||||
return render_to_response('public/index.html', None, context_instance=RequestContext(request))
|
||||
|
||||
|
||||
@login_required
|
||||
def index(request):
|
||||
return render_to_response('public/index.html',None, context_instance=RequestContext(request))
|
||||
def dashboard_view(request):
|
||||
return render_to_response('registered/dashboard.html', None, context_instance=RequestContext(request))
|
||||
|
||||
|
||||
@login_required
|
||||
def characters_view(request):
|
||||
characterManager = EveCharacterManager()
|
||||
|
||||
render_items = {'characters':characterManager.get_characters_by_owner_id(request.user.id)}
|
||||
return render_to_response('public/characters.html', render_items, context_instance=RequestContext(request))
|
||||
return render_to_response('registered/characters.html', render_items, context_instance=RequestContext(request))
|
||||
|
||||
|
||||
@login_required
|
||||
def api_key_management_view(request):
|
||||
if request.method == 'POST':
|
||||
form = UpdateKeyForm(request.POST)
|
||||
|
||||
if form.is_valid():
|
||||
|
||||
return HttpResponseRedirect("/")
|
||||
else:
|
||||
form = UpdateKeyForm(initial={'api_id':request.user.api_id,'api_key':request.user.api_key})
|
||||
|
||||
return render_to_response('registered/apikeymanagment.html', {'form':form}, context_instance=RequestContext(request))
|
||||
|
||||
|
||||
@login_required
|
||||
def applications_view(request):
|
||||
return render_to_response('registered/applications.html', None, context_instance=RequestContext(request))
|
||||
|
||||
|
||||
@login_required
|
||||
def main_character_change(request, id):
|
||||
@ -32,22 +57,6 @@ def main_character_change(request, id):
|
||||
return HttpResponseRedirect("/")
|
||||
return HttpResponseRedirect("/characters")
|
||||
|
||||
@login_required
|
||||
def apikeymanagment_view(request):
|
||||
if request.method == 'POST':
|
||||
form = UpdateKeyForm(request.POST)
|
||||
|
||||
if form.is_valid():
|
||||
|
||||
return HttpResponseRedirect("/")
|
||||
else:
|
||||
form = UpdateKeyForm(initial={'api_id':request.user.api_id,'api_key':request.user.api_key})
|
||||
|
||||
return render_to_response('public/apikeymanagment.html', {'form':form}, context_instance=RequestContext(request))
|
||||
|
||||
@login_required
|
||||
def applications_view(request):
|
||||
return render_to_response('public/applications.html', None, context_instance=RequestContext(request))
|
||||
|
||||
@login_required
|
||||
def activate_forum(request):
|
||||
@ -65,6 +74,7 @@ def activate_forum(request):
|
||||
|
||||
return HttpResponseRedirect("/")
|
||||
|
||||
|
||||
@login_required
|
||||
def activate_jabber(request):
|
||||
userManager = AllianceUserManager()
|
||||
@ -79,6 +89,7 @@ def activate_jabber(request):
|
||||
|
||||
return HttpResponseRedirect("/")
|
||||
|
||||
|
||||
@login_required
|
||||
def activate_mumble(request):
|
||||
userManager = AllianceUserManager()
|
||||
|
@ -2,29 +2,40 @@ from django.http import Http404,HttpResponseRedirect
|
||||
from django.shortcuts import render_to_response, render
|
||||
from django.template import RequestContext
|
||||
from authentication.models import AllianceUserManager
|
||||
from evespecific.managers import EveApiManager
|
||||
from evespecific.managers import EveCharacterManager
|
||||
from services.eveapi_manager import EveApiManager
|
||||
|
||||
from forms import RegistrationForm
|
||||
|
||||
|
||||
def register(request):
|
||||
api = EveApiManager()
|
||||
charmanager = EveCharacterManager()
|
||||
|
||||
if request.method == 'POST':
|
||||
form = RegistrationForm(request.POST)
|
||||
|
||||
if form.is_valid():
|
||||
userManager = AllianceUserManager()
|
||||
user = userManager.create_user_withapi(
|
||||
form.cleaned_data['username'],
|
||||
form.cleaned_data['email'],
|
||||
form.cleaned_data['password'],
|
||||
form.cleaned_data['api_id'],
|
||||
form.cleaned_data['api_key']
|
||||
)
|
||||
|
||||
# Populate character data
|
||||
api = EveApiManager()
|
||||
api.CreateCharactersFromID(form.cleaned_data['api_id'], form.cleaned_data['api_key'], user)
|
||||
usermanager = AllianceUserManager()
|
||||
if not usermanager.check_if_user_exist_by_name(form.cleaned_data['username']):
|
||||
user = usermanager.create_user_withapi(
|
||||
form.cleaned_data['username'],
|
||||
form.cleaned_data['email'],
|
||||
form.cleaned_data['password'],
|
||||
form.cleaned_data['api_id'],
|
||||
form.cleaned_data['api_key']
|
||||
)
|
||||
|
||||
# Populate character data
|
||||
|
||||
characters = api.get_characters_from_api(form.cleaned_data['api_id'], form.cleaned_data['api_key'])
|
||||
charmanager.create_characters_from_list(characters, user)
|
||||
return HttpResponseRedirect("/dashboard")
|
||||
|
||||
else:
|
||||
return render_to_response('public/register.html', {'form': form, 'error': True}
|
||||
, context_instance=RequestContext(request))
|
||||
|
||||
return HttpResponseRedirect("/")
|
||||
else:
|
||||
form = RegistrationForm()
|
||||
|
||||
|
19
services/eveapi_manager.py
Normal file
19
services/eveapi_manager.py
Normal file
@ -0,0 +1,19 @@
|
||||
import evelink.api
|
||||
import evelink.char
|
||||
import evelink.eve
|
||||
|
||||
|
||||
class EveApiManager():
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
||||
def get_characters_from_api(self, api_id, api_key):
|
||||
api = evelink.api.API(api_key=(api_id, api_key))
|
||||
# Should get characters
|
||||
account = evelink.account.Account(api=api)
|
||||
chars = account.characters()
|
||||
|
||||
return chars
|
||||
|
@ -12,23 +12,23 @@ class JabberManager():
|
||||
print str(username)
|
||||
print str(password)
|
||||
api.add_user(self.__santatize_username(username), str(password))
|
||||
|
||||
|
||||
def delete_user(self, username):
|
||||
api = UserService(settings.OPENFIRE_ADDRESS, settings.OPENFIRE_SECRET_KEY)
|
||||
api.delete_user(username)
|
||||
|
||||
|
||||
def lock_user(self, username):
|
||||
api = UserService(settings.OPENFIRE_ADDRESS, settings.OPENFIRE_SECRET_KEY)
|
||||
api.lock_user(username)
|
||||
|
||||
|
||||
def unlock_user(self, username):
|
||||
api = UserService(settings.OPENFIRE_ADDRESS, settings.OPENFIRE_SECRET_KEY)
|
||||
api.unlock_user(username)
|
||||
|
||||
|
||||
def update_user_pass(self, username, password):
|
||||
api = UserService(settings.OPENFIRE_ADDRESS, settings.OPENFIRE_SECRET_KEY)
|
||||
api.update_user(username, password)
|
||||
|
||||
|
||||
def __santatize_username(self, username):
|
||||
sanatized = username.replace(" ","_")
|
||||
return sanatized.lower()
|
@ -5,7 +5,7 @@ body
|
||||
.profile
|
||||
{
|
||||
min-height: 150px;
|
||||
width: 350px;
|
||||
width: 450px;
|
||||
display: inline-block;
|
||||
}
|
||||
figcaption.ratings
|
||||
|
BIN
static/img/index_bg.jpg
Normal file
BIN
static/img/index_bg.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 357 KiB |
BIN
static/img/index_images/auth.png
Normal file
BIN
static/img/index_images/auth.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
static/img/index_images/forums.png
Normal file
BIN
static/img/index_images/forums.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
BIN
static/img/index_images/killboard.png
Normal file
BIN
static/img/index_images/killboard.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
static/img/index_images/media.png
Normal file
BIN
static/img/index_images/media.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
@ -1,5 +1,4 @@
|
||||
{% load staticfiles %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
@ -29,16 +28,17 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">{{ ALLIANCE_NAME }}</a>
|
||||
<a class="navbar-brand" href="{% url 'auth_dashboard' %}">{{ ALLIANCE_NAME }}</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{% if user.is_authenticated %}
|
||||
<li><a href="/logoutuser/">Logout</a></li>
|
||||
<li><a href="{% url 'auth_logout_user' %}">Logout</a></li>
|
||||
{% else %}
|
||||
<li><a href="/loginuser/">Login</a></li>
|
||||
<li><a href="{% url 'auth_login_user' %}">Login</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -49,10 +49,10 @@
|
||||
{% if user.is_authenticated %}
|
||||
<div class="col-sm-3 col-md-2 sidebar">
|
||||
<ul class="nav nav-sidebar">
|
||||
<li><a href="/">Overview</a></li>
|
||||
<li><a href="/characters">Characters</a></li>
|
||||
<li><a href="/apikeymanagment">Api Keys</a></li>
|
||||
<li><a href="/applications">Applications</a></li>
|
||||
<li><a href="{% url 'auth_dashboard' %}">Overview</a></li>
|
||||
<li><a href="{% url 'auth_characters' %}">Characters</a></li>
|
||||
<li><a href="{% url 'auth_api_key_management' %}">Api Keys</a></li>
|
||||
<li><a href="{% url 'auth_applications' %}">Applications</a></li>
|
||||
<li><a href="#">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -60,6 +60,7 @@
|
||||
|
||||
{% block content %}
|
||||
{% endblock content %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
|
@ -1,15 +1,52 @@
|
||||
{% extends "public/base.html" %}
|
||||
{% load staticfiles %}
|
||||
<style>
|
||||
body {
|
||||
background: url('{% static 'img/index_bg.jpg' %}') no-repeat scroll;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
div {
|
||||
height: 200px;
|
||||
width: 400px;
|
||||
|
||||
{% block page_title %}Something something here{% endblock page_title %}
|
||||
position: fixed;
|
||||
top: 60%;
|
||||
left: 50%;
|
||||
margin-top: -100px;
|
||||
margin-left: -200px;
|
||||
}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
</style>
|
||||
|
||||
<h1 class="page-header">Dashboard</h1>
|
||||
<div class="container">
|
||||
<p>WAT</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
<html>
|
||||
<head lang="en">
|
||||
<meta charset="UTF-8">
|
||||
<title>The 99 Percent Eve Alliance</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<p style="text-align:center">
|
||||
<a href="{% url 'auth_dashboard' %}">
|
||||
<img src="{% static 'img/index_images/auth.png' %}" border="0">
|
||||
</a>
|
||||
</p>
|
||||
<p style="text-align:center">
|
||||
<a href="/forums/">
|
||||
<img src="{% static 'img/index_images/forums.png' %}" border="0">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p style="text-align:center">
|
||||
<a href="/killboard/">
|
||||
<img src="{% static 'img/index_images/killboard.png' %}" border="0">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p style="text-align:center">
|
||||
<a href="https://youtube.com/">
|
||||
<img src="{% static 'img/index_images/media.png' %}" border="0">
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -9,13 +9,16 @@
|
||||
<div class="row-fluid">
|
||||
<div class="center-block" style="center">
|
||||
<p>
|
||||
<form class="form-signin" role="form" action="/loginuser/" method="POST">
|
||||
{% if error %}
|
||||
<div class="alert alert-danger" role="alert">Username/Password Invalid</div>
|
||||
{% endif %}
|
||||
<form class="form-signin" role="form" action="{% url 'auth_login_user' %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<h2 class="form-signin-heading">Please sign in</h2>
|
||||
{{form.as_p}}
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
||||
</form>
|
||||
<p><a href="/register/">Register Here</a>
|
||||
<p><a href="{% url 'auth_register' %}">Register Here</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -9,7 +9,10 @@
|
||||
<div class="row-fluid">
|
||||
<div class="center-block" style="center">
|
||||
<p>
|
||||
<form action="/register/" method="POST">
|
||||
{% if error %}
|
||||
<div class="alert alert-danger" role="alert">Username Already Registered</div>
|
||||
{% endif %}
|
||||
<form action="{% url 'auth_register' %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<h2 class="form-signin-heading">Register Account</h2>
|
||||
<p>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<div class="row-fluid">
|
||||
<div class="center-block" style="center">
|
||||
<p>
|
||||
<form action="/apikeymanagment/" method="POST">
|
||||
<form action="{% url 'auth_api_key_management' %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<h2 class="form-signin-heading">Update Api:</h2>
|
||||
<p>
|
@ -10,9 +10,9 @@
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<h3> Really dumb right now</h3>
|
||||
<p> Click button to add user to services</p>
|
||||
<a href="/activateforum/"><button type="button" class="btn btn-default">Activate Forum</button></a>
|
||||
<a href="/activatejabber/"><button type="button" class="btn btn-default">Activate Jabber</button></a>
|
||||
<a href="/activatemumble/"><button type="button" class="btn btn-default">Activate Jabber</button></a>
|
||||
<a href="{% url 'auth_activate_forum' %}"><button type="button" class="btn btn-default">Activate Forum</button></a>
|
||||
<a href="{% url 'auth_activate_jabber' %}"><button type="button" class="btn btn-default">Activate Jabber</button></a>
|
||||
<a href="{% url 'auth_activate_mumble' %}"><button type="button" class="btn btn-default">Activate Jabber</button></a>
|
||||
|
||||
</div>
|
||||
|
@ -25,7 +25,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-offset-8">
|
||||
<a href="/maincharacterchange/{{character.character_id}}"><button type="button" class="btn btn-primary">Make Primary</button></a>
|
||||
<a href="/main_character_change/{{character.character_id}}"><button type="button" class="btn btn-primary">Make Primary</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
15
templates/registered/dashboard.html
Normal file
15
templates/registered/dashboard.html
Normal file
@ -0,0 +1,15 @@
|
||||
{% extends "public/base.html" %}
|
||||
|
||||
{% block title %}Alliance Auth{% endblock %}
|
||||
|
||||
{% block page_title %}Something something here{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
|
||||
<h1 class="page-header">Dashboard</h1>
|
||||
<div class="container">
|
||||
<p>WAT</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
@ -1,9 +1,9 @@
|
||||
from django.conf import settings # import the settings file
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
def alliance_id(request):
|
||||
# return the value you want as a dictionnary. you may add multiple values in there.
|
||||
return {'ALLIANCE_ID': settings.ALLIANCE_ID}
|
||||
|
||||
|
||||
def alliance_name(request):
|
||||
# return the value you want as a dictionnary. you may add multiple values in there.
|
||||
return {'ALLIANCE_NAME': settings.ALLIANCE_NAME}
|
Loading…
x
Reference in New Issue
Block a user