forked from the-blue-alliance/the-blue-alliance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin_main.py
131 lines (128 loc) · 10.4 KB
/
admin_main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#!/usr/bin/env python
import os
import webapp2
import tba_config
from controllers.admin.admin_api_controller import AdminApiAuthAdd, AdminApiAuthDelete, AdminApiAuthEdit, AdminApiAuthManage
from controllers.admin.admin_apistatus_controller import AdminApiStatus
from controllers.admin.admin_authkeys_controller import AdminAuthKeys
from controllers.admin.admin_contbuild_controller import AdminContbuildController
from controllers.admin.admin_district_controller import AdminDistrictList, AdminDistrictEdit, \
AdminDistrictCreate
from controllers.admin.admin_event_controller import AdminEventAddAllianceSelections, AdminEventDeleteTeams, AdminEventAddTeams, AdminEventRemapTeams, AdminEventAddWebcast, AdminEventCreate, AdminEventCreateTest, AdminEventDelete, AdminEventDetail, AdminEventEdit, AdminEventList, \
AdminAddAllianceBackup, AdminEventRemoveWebcast, AdminRefetchEventLocation, AdminPlayoffAdvancementAddController, AdminPlayoffAdvancementPurgeController, AdminEventDeleteMatches
from controllers.admin.admin_gameday_controller import AdminGamedayDashboard
from controllers.admin.admin_main_controller import AdminDebugHandler, AdminMain, AdminTasksHandler
from controllers.admin.admin_award_controller import AdminAwardDashboard, AdminAwardEdit, AdminAwardAdd, \
AdminAwardDelete, AdminAwardAddWithEvent
from controllers.admin.admin_match_controller import AdminVideosAdd, AdminMatchCleanup, AdminMatchDashboard, AdminMatchDelete, AdminMatchDetail, AdminMatchAdd, AdminMatchEdit
from controllers.admin.admin_media_controller import AdminMediaDashboard, AdminMediaDeleteReference, AdminMediaMakePreferred, AdminMediaRemovePreferred, AdminMediaAdd, \
AdminMediaInstagramImport
from controllers.admin.admin_memcache_controller import AdminMemcacheMain
from controllers.admin.admin_migration_controller import AdminMigration, \
AdminMigrationCreateEventDetails, AdminMigrationRankings, AdminMigrationAddSurrogates, \
AdminMigrationBackfillYearDQ, AdminMigrationBackfillEventDQ, \
AdminMigrationPlayoffAdvancement, AdminMigrationPlayoffAdvancementAll
from controllers.admin.admin_mobile_controller import AdminMobile, AdminBroadcast, AdminMobileWebhooks
from controllers.admin.admin_offseason_scraper_controller import AdminOffseasonScraperController
from controllers.admin.admin_offseason_spreadsheet_controller import AdminOffseasonSpreadsheetController
from controllers.admin.admin_sitevar_controller import AdminSitevarCreate, AdminSitevarEdit, AdminSitevarList
from controllers.admin.admin_suggestion_controller import AdminCreateTestSuggestions
from controllers.admin.admin_tbans_controller import AdminTBANS
from controllers.admin.admin_team_controller import AdminTeamCreateTest, AdminTeamDetail, AdminTeamList, \
AdminTeamRobotNameUpdate
from controllers.admin.admin_team_media_mod import AdminTeamMediaModCodeList, AdminTeamMediaModCodeAdd, AdminTeamMediaModCodeEdit
from controllers.admin.admin_user_controller import AdminUserDetail, AdminUserEdit, AdminUserTestSetup, AdminUserList, AdminUserPermissionsList, \
AdminUserLookup
from controllers.admin.admin_main_landing_controller import AdminMainLandingEdit
from google.appengine.ext.webapp import template
template.register_template_library('common.my_filters')
app = webapp2.WSGIApplication([('/admin/', AdminMain),
('/admin/api_auth/add', AdminApiAuthAdd),
('/admin/api_auth/delete/(.*)', AdminApiAuthDelete),
('/admin/api_auth/edit/(.*)', AdminApiAuthEdit),
('/admin/api_auth/manage', AdminApiAuthManage),
('/admin/apistatus', AdminApiStatus),
('/admin/authkeys', AdminAuthKeys),
('/admin/contbuild/(.*)', AdminContbuildController),
('/admin/debug', AdminDebugHandler),
('/admin/districts', AdminDistrictList),
('/admin/districts/([0-9]*)', AdminDistrictList),
('/admin/district/edit/(.*)', AdminDistrictEdit),
('/admin/district/create', AdminDistrictCreate),
('/admin/events', AdminEventList),
('/admin/events/([0-9]*)', AdminEventList),
('/admin/event/add_alliance_backup/(.*)', AdminAddAllianceBackup),
('/admin/event/add_alliance_selections/(.*)', AdminEventAddAllianceSelections),
('/admin/event/add_teams/(.*)', AdminEventAddTeams),
('/admin/event/delete_teams/(.*)', AdminEventDeleteTeams),
('/admin/event/add_webcast/(.*)', AdminEventAddWebcast),
('/admin/event/remove_webcast/(.*)', AdminEventRemoveWebcast),
('/admin/event/remap_teams/(.*)', AdminEventRemapTeams),
('/admin/event/update_loaction/(.*)', AdminRefetchEventLocation),
('/admin/event/create', AdminEventCreate),
('/admin/event/create/test', AdminEventCreateTest),
('/admin/event/delete/(.*)', AdminEventDelete),
('/admin/event/edit/(.*)', AdminEventEdit),
('/admin/event/delete_matches/(.*)/(.*)/(.*)', AdminEventDeleteMatches),
('/admin/event/(.*)', AdminEventDetail),
('/admin/gameday', AdminGamedayDashboard),
('/admin/awards', AdminAwardDashboard),
('/admin/award/add', AdminAwardAdd),
('/admin/award/add/(.*)', AdminAwardAddWithEvent),
('/admin/award/edit/(.*)', AdminAwardEdit),
('/admin/award/delete', AdminAwardDelete),
('/admin/main_landing', AdminMainLandingEdit),
('/admin/matches', AdminMatchDashboard),
('/admin/match/add', AdminMatchAdd),
('/admin/match/cleanup', AdminMatchCleanup),
('/admin/match/delete/(.*)', AdminMatchDelete),
('/admin/match/edit/(.*)', AdminMatchEdit),
('/admin/match/(.*)', AdminMatchDetail),
('/admin/media', AdminMediaDashboard),
('/admin/media/add_media', AdminMediaAdd),
('/admin/media/delete_reference/(.*)', AdminMediaDeleteReference),
('/admin/media/make_preferred/(.*)', AdminMediaMakePreferred),
('/admin/media/modcodes/add', AdminTeamMediaModCodeAdd),
('/admin/media/modcodes/edit/([0-9]+)/([0-9]+)', AdminTeamMediaModCodeEdit),
('/admin/media/modcodes/list', AdminTeamMediaModCodeList),
('/admin/media/modcodes/list/([0-9]+)', AdminTeamMediaModCodeList),
('/admin/media/modcodes/list/([0-9]+)/([0-9]*)', AdminTeamMediaModCodeList),
('/admin/media/remove_preferred/(.*)', AdminMediaRemovePreferred),
('/admin/media/import/instagram', AdminMediaInstagramImport),
('/admin/memcache', AdminMemcacheMain),
('/admin/migration', AdminMigration),
('/admin/migration/create_event_details', AdminMigrationCreateEventDetails),
('/admin/migration/migrate_rankings/([0-9]*)', AdminMigrationRankings),
('/admin/migration/add_surrogates/([0-9]*)', AdminMigrationAddSurrogates),
('/admin/migration/backfill_year_dq/([0-9]*)', AdminMigrationBackfillYearDQ),
('/admin/migration/backfill_event_dq/(.*)', AdminMigrationBackfillEventDQ),
('/admin/migration/backfill_playoff_advancement', AdminMigrationPlayoffAdvancementAll),
('/admin/migration/backfill_playoff_advancement/(.*)', AdminMigrationPlayoffAdvancement),
('/admin/offseasons', AdminOffseasonScraperController),
('/admin/offseasons/spreadsheet', AdminOffseasonSpreadsheetController),
('/admin/playoff_advancement/add', AdminPlayoffAdvancementAddController),
('/admin/playoff_advancement/purge/(.*)', AdminPlayoffAdvancementPurgeController),
('/admin/sitevars', AdminSitevarList),
('/admin/sitevar/create', AdminSitevarCreate),
('/admin/sitevar/edit/(.*)', AdminSitevarEdit),
('/admin/suggestions/create/test', AdminCreateTestSuggestions),
('/admin/tasks', AdminTasksHandler),
('/admin/teams/([0-9]*)', AdminTeamList),
('/admin/teams', AdminTeamList),
('/admin/team/create/test', AdminTeamCreateTest),
('/admin/team/set_robot_name', AdminTeamRobotNameUpdate),
('/admin/team/(.*)', AdminTeamDetail),
('/admin/users/([0-9]*)', AdminUserList),
('/admin/users', AdminUserList),
('/admin/users/permissions', AdminUserPermissionsList),
('/admin/user/edit/(.*)', AdminUserEdit),
('/admin/user/lookup', AdminUserLookup),
('/admin/user/create/test', AdminUserTestSetup),
('/admin/user/(.*)', AdminUserDetail),
('/admin/videos/add', AdminVideosAdd),
('/admin/tbans', AdminTBANS),
('/admin/mobile', AdminMobile),
('/admin/mobile/broadcast', AdminBroadcast),
('/admin/mobile/webhooks', AdminMobileWebhooks),
],
debug=tba_config.DEBUG)