mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-09 08:36:23 +01:00
Reformatted code for easy reading.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from models import HRApplications
|
||||
from models import HRApplicationComment
|
||||
|
||||
|
||||
admin.site.register(HRApplications)
|
||||
admin.site.register(HRApplicationComment)
|
||||
@@ -1 +1,11 @@
|
||||
__author__ = 'r4stl1n'
|
||||
from django import forms
|
||||
|
||||
|
||||
class HRApplicationForm(forms.Form):
|
||||
character_name = forms.CharField(max_length=254, required=True, label="Main Character Name")
|
||||
full_api_id = forms.CharField(max_length=254, required=True, label="API ID")
|
||||
full_api_key = forms.CharField(max_length=254, required=True, label="API Verification Code")
|
||||
preferred_corp = forms.CharField(max_length=254, required=True, label="Preferred Corp")
|
||||
is_a_spi = forms.ChoiceField(choices=[('Yes', 'Yes'), ('No', 'No')], required=True, label='Are you a spy?')
|
||||
about = forms.CharField(widget=forms.Textarea, required=False, label="About You")
|
||||
extra = forms.CharField(widget=forms.Textarea, required=False, label="Extra Application Info")
|
||||
@@ -6,8 +6,8 @@ class HRApplications(models.Model):
|
||||
character_name = models.CharField(max_length=254, default="")
|
||||
full_api_id = models.CharField(max_length=254, default="")
|
||||
full_api_key = models.CharField(max_length=254, default="")
|
||||
prefered_corp = models.CharField(max_length=254, default="")
|
||||
is_a_spi = models.BooleanField(default=False)
|
||||
preferred_corp = models.CharField(max_length=254, default="")
|
||||
is_a_spi = models.CharField(max_length=254, default="")
|
||||
about = models.TextField(default="")
|
||||
extra = models.TextField(default="")
|
||||
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
from django.shortcuts import render
|
||||
from django.template import RequestContext
|
||||
from django.shortcuts import render_to_response
|
||||
from django.contrib.auth.decorators import login_required
|
||||
|
||||
# Create your views here.
|
||||
from forms import HRApplicationForm
|
||||
|
||||
|
||||
@login_required
|
||||
def hr_application_management_view(request):
|
||||
context = {}
|
||||
|
||||
return render_to_response('registered/hrapplicationmanagement.html',
|
||||
context, context_instance=RequestContext(request))
|
||||
|
||||
|
||||
@login_required
|
||||
def hr_application_create_view(request):
|
||||
if request.method == 'POST':
|
||||
form = HRApplicationForm(request.POST)
|
||||
if form.is_valid():
|
||||
pass
|
||||
else:
|
||||
form = HRApplicationForm
|
||||
|
||||
context = {'form': form}
|
||||
return render_to_response('registered/hrcreateapplication.html',
|
||||
context, context_instance=RequestContext(request))
|
||||
Reference in New Issue
Block a user