mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-13 22:40:16 +02:00
parent
aaf196b477
commit
6f36a26694
@ -42,6 +42,7 @@ INSTALLED_APPS = [
|
|||||||
'permissions_tool',
|
'permissions_tool',
|
||||||
'geelweb.django.navhelper',
|
'geelweb.django.navhelper',
|
||||||
'bootstrap_pagination',
|
'bootstrap_pagination',
|
||||||
|
'sortedm2m',
|
||||||
|
|
||||||
# Services - comment out if not used
|
# Services - comment out if not used
|
||||||
'services.modules.mumble',
|
'services.modules.mumble',
|
||||||
|
@ -11,8 +11,4 @@ admin.site.register(Application)
|
|||||||
admin.site.register(ApplicationComment)
|
admin.site.register(ApplicationComment)
|
||||||
admin.site.register(ApplicationQuestion)
|
admin.site.register(ApplicationQuestion)
|
||||||
admin.site.register(ApplicationResponse)
|
admin.site.register(ApplicationResponse)
|
||||||
|
admin.site.register(ApplicationForm)
|
||||||
|
|
||||||
@admin.register(ApplicationForm)
|
|
||||||
class ApplicationFormAdmin(admin.ModelAdmin):
|
|
||||||
filter_horizontal = ['questions']
|
|
22
hrapplications/migrations/0003_sorted_questions.py
Normal file
22
hrapplications/migrations/0003_sorted_questions.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.10.5 on 2017-03-27 03:29
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
import sortedm2m.fields
|
||||||
|
from sortedm2m.operations import AlterSortedManyToManyField
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('hrapplications', '0002_make_strings_more_stringy'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
AlterSortedManyToManyField(
|
||||||
|
model_name='applicationform',
|
||||||
|
name='questions',
|
||||||
|
field=sortedm2m.fields.SortedManyToManyField(help_text=None, to='hrapplications.ApplicationQuestion'),
|
||||||
|
),
|
||||||
|
]
|
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
|||||||
from django.utils.encoding import python_2_unicode_compatible
|
from django.utils.encoding import python_2_unicode_compatible
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
from sortedm2m.fields import SortedManyToManyField
|
||||||
from eveonline.models import EveCharacter
|
from eveonline.models import EveCharacter
|
||||||
from eveonline.models import EveCorporationInfo
|
from eveonline.models import EveCorporationInfo
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ class ApplicationQuestion(models.Model):
|
|||||||
|
|
||||||
@python_2_unicode_compatible
|
@python_2_unicode_compatible
|
||||||
class ApplicationForm(models.Model):
|
class ApplicationForm(models.Model):
|
||||||
questions = models.ManyToManyField(ApplicationQuestion)
|
questions = SortedManyToManyField(ApplicationQuestion)
|
||||||
corp = models.OneToOneField(EveCorporationInfo)
|
corp = models.OneToOneField(EveCorporationInfo)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
@ -17,6 +17,7 @@ django-navhelper
|
|||||||
django-bootstrap-pagination
|
django-bootstrap-pagination
|
||||||
django-redis>=4.4
|
django-redis>=4.4
|
||||||
django-registration
|
django-registration
|
||||||
|
django-sortedm2m
|
||||||
|
|
||||||
# awating release for fix to celery/django-celery#447
|
# awating release for fix to celery/django-celery#447
|
||||||
# django-celery
|
# django-celery
|
||||||
|
Loading…
x
Reference in New Issue
Block a user