Beispiel #1
0
from ..flask_admin_base import VolunteerModelView

from main import volunteer_admin, db
from models.volunteer.shift import Shift


class ShiftModelView(VolunteerModelView):
    column_filters = ["role", "venue", "start", "end"]


volunteer_admin.add_view(
    ShiftModelView(
        Shift,
        db.session,
        category="Settings",
        name="Shifts",
    ))
Beispiel #2
0
from ..flask_admin_base import VolunteerModelView

from main import volunteer_admin, db
from models.volunteer.venue import VolunteerVenue

volunteer_admin.add_view(
    VolunteerModelView(VolunteerVenue, db.session, category="venues")
)
Beispiel #3
0
from ..flask_admin_base import VolunteerModelView

from main import volunteer_admin, db
from models.volunteer.venue import VolunteerVenue

volunteer_admin.add_view(VolunteerModelView(VolunteerVenue, db.session, category="venues"))
Beispiel #4
0
from ..flask_admin_base import VolunteerModelView

from main import volunteer_admin, db
from models.volunteer.shift import Shift


class ShiftModelView(VolunteerModelView):
    column_filters = ["role", "venue", "start", "end"]


volunteer_admin.add_view(ShiftModelView(Shift, db.session, category="shifts"))
Beispiel #5
0
from ..flask_admin_base import VolunteerModelView

from main import volunteer_admin, db
from models.volunteer.volunteer import Volunteer


class VolunteerUserModelView(VolunteerModelView):
    column_searchable_list = ('nickname', 'volunteer_email')
    column_filters = ['trained_roles', 'allow_comms_during_event']

volunteer_admin.add_view(VolunteerUserModelView(Volunteer, db.session, category="volunteers"))
Beispiel #6
0
    column_list = (
        "nickname",
        "volunteer_email",
        "planned_arrival",
        "planned_departure",
        "banned",
    )
    column_searchable_list = ("nickname", "volunteer_email")
    details_modal = True
    edit_modal = True
    form_columns = (
        "nickname",
        "volunteer_email",
        "volunteer_phone",
        "planned_arrival",
        "planned_departure",
        "interested_roles",
        "trained_roles",
        "missing_shifts_opt_in",
        "over_18",
        "allow_comms_during_event",
        "banned",
    )
    form_excluded_columns = ("user", "versions")
    page_size = 50  # the number of entries to display on the list view


# Add menu item Volunteers
volunteer_admin.add_view(
    VolunteerUserModelView(Volunteer, db.session, name="Volunteers"))
from ..flask_admin_base import VolunteerModelView

from main import volunteer_admin, db
from models.volunteer.volunteer import Volunteer


class VolunteerUserModelView(VolunteerModelView):
    column_searchable_list = ('nickname', 'volunteer_email')
    column_filters = ['trained_roles', 'allow_comms_during_event']


volunteer_admin.add_view(
    VolunteerUserModelView(Volunteer, db.session, category="volunteers"))
Beispiel #8
0
from ..flask_admin_base import VolunteerModelView

from main import volunteer_admin, db
from models.volunteer.shift import Shift

class ShiftModelView(VolunteerModelView):
    column_filters = ['role', 'venue', 'start', 'end']

volunteer_admin.add_view(ShiftModelView(Shift, db.session, category="shifts"))
Beispiel #9
0
from ..flask_admin_base import VolunteerModelView

from main import volunteer_admin, db
from models.volunteer.role import Role

volunteer_admin.add_view(
    VolunteerModelView(
        Role,
        db.session,
        category="Settings",
        name="Roles",
    ))
Beispiel #10
0
from ..flask_admin_base import VolunteerModelView

from main import volunteer_admin, db
from models.volunteer.role import Role

volunteer_admin.add_view(VolunteerModelView(Role, db.session, category="roles"))

Beispiel #11
0
from ..flask_admin_base import VolunteerModelView

from main import volunteer_admin, db
from models.volunteer.role import Role

volunteer_admin.add_view(VolunteerModelView(Role, db.session,
                                            category="roles"))
Beispiel #12
0
from ..flask_admin_base import VolunteerModelView

from main import volunteer_admin, db
from models.volunteer.venue import VolunteerVenue

volunteer_admin.add_view(
    VolunteerModelView(VolunteerVenue,
                       db.session,
                       category="Settings",
                       name="Venues"))