mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-10 17:16:22 +01:00
Character stuff
This commit is contained in:
@@ -2,22 +2,27 @@ 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 forms import RegistrationForm
|
||||
|
||||
# Create your views here.
|
||||
def register(request):
|
||||
if request.method == 'POST':
|
||||
form = RegistrationForm(request.POST)
|
||||
|
||||
if form.is_valid():
|
||||
userManager = AllianceUserManager()
|
||||
userManager.create_user_withapi(
|
||||
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)
|
||||
|
||||
return HttpResponseRedirect("/")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user