Skip to content

Commit f6df658

Browse files
19.01.2025_Added documentation for endpoint methods and subdomain rules, removed unused template file, and updated database schema
1 parent cd78a28 commit f6df658

7 files changed

Lines changed: 556 additions & 89 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
Endpoint Methods Subdomain Rule Description
2+
------------------------------------------- --------- --------- ------------------------------------------------------------------- -----------------------------------------------------------------
3+
admin.coureurs.coureurs_page GET /event/<event_name>/coureurs View all runners for an event
4+
admin.coureurs.view_coureur_page GET /event/<event_name>/coureurs/<coureur> View a specific runner page
5+
admin.editions.delete_edition_page GET, POST /event/<event_name>/editions/<edition_name>/delete Delete an edition
6+
admin.editions.dossard.export_dossard GET, POST /event/<event_name>/editions/<edition_name>/dossard/download Export dossard data
7+
admin.editions.dossard.generate_all_dossard GET, POST /event/<event_name>/editions/<edition_name>/dossard/generate Generate all dossards
8+
admin.editions.dossard.generate_dossard GET, POST /event/<event_name>/editions/<edition_name>/dossard view dossards
9+
admin.editions.dossard.validate_new_user POST /event/<event_name>/editions/<edition_name>/dossard/newuser Validate a new user
10+
admin.editions.editions_page GET, POST /event/<event_name>/editions View or create editions
11+
admin.editions.modify_edition_page GET, POST /event/<event_name>/editions/<edition_name> Modify an edition
12+
admin.editions.parcours.view GET /event/<event_name>/editions/<edition_name>/parcours View parcours of an edition
13+
admin.editions.passages.chrono_home GET, POST /chrono Access chrono home
14+
admin.editions.passages.chrono_page GET /chrono/<key_code> Access a specific chrono page
15+
admin.editions.passages.dashboard GET, POST /event/<event_name>/editions/<edition_name>/dashboard Access the dashboard
16+
admin.editions.result.pdf_result GET /event/<event_name>/editions/<edition_name>/result_pdf Download results as PDF
17+
admin.editions.result.result_page GET /event/<event_name>/editions/<edition_name>/result View results page
18+
admin.editions.result.xlsx_result GET /event/<event_name>/editions/<edition_name>/result_xlsx Download results as XLSX
19+
admin.home_event GET, POST /event/<event_name> Access home for an event
20+
admin.parcours.archive_parcours_page GET /event/<event_name>/parcours/<parcours_name>/archive Archive a parcours
21+
admin.parcours.copy_parcours GET /event/<event_name>/parcours/<parcours_name>/copy Copy a parcours
22+
admin.parcours.delete_parcours_page GET /event/<event_name>/parcours/<parcours_name>/delete Delete a parcours
23+
admin.parcours.modify_parcours GET, POST /event/<event_name>/parcours/<parcours_name> Modify a parcours
24+
admin.parcours.parcours_page GET, POST /event/<event_name>/parcours View or create parcours
25+
admin.parcours.unarchive_parcours_page GET /event/<event_name>/parcours/<parcours_name>/unarchive Unarchive a parcours
26+
assets_doc_files GET doc /assets/<path:path> Access document assets
27+
change_lang GET /lang/<lang>/<path:next> Change language
28+
dev.dev_home GET dev / Access development home
29+
dev.languages GET, POST dev /languages Access or modify languages
30+
dev.reload GET dev /reload_translations Reload translations
31+
doc GET doc /<path:path> Access documentation
32+
doc GET doc / Access documentation home
33+
home GET / Access home page
34+
search_doc_files GET doc /search/<path:path> Search document files
35+
static GET /static/<path:filename> Access static files
36+
users.inscription_page GET, POST /<event>/edition/<edition>/inscription Access or submit inscription
37+
users.login GET, POST /login Login user
38+
users.logout GET /logout Logout user
39+
users.modify_profil GET, POST /profil/update Modify user profile
40+
users.profil GET /profil Access user profile
41+
users.signup GET, POST /signup Signup user
42+
view.delete_inscription GET /view/inscription/<inscription>/delete Delete an inscription
43+
view.view_edition_page GET /view/<event>/edition/<edition> View an edition page
44+
view.view_event_page GET /view/<event> View an event page
45+
view.view_inscription_page GET /view/inscription/<inscription> View an inscription page
46+
view.view_parcours_page GET /view/<event>/parcours/<parcours> View a parcours page

flask_app/admin/editions/dossard/__init__.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@
1414

1515
dossard = Blueprint('dossard', __name__, template_folder='templates')
1616

17-
@set_route(dossard, '/event/<event_name>/editions/<edition_name>/modify_dossard', methods=['POST', 'GET'])
18-
@login_required
19-
@admin_required
20-
def dossard_page(event_name, edition_name):
21-
user = current_user
22-
return render_template('dossard.html', user_data=user, pyscript=True)
23-
24-
2517
@set_route(dossard, '/event/<event_name>/editions/<edition_name>/dossard', methods=['POST', 'GET'])
2618
@login_required
2719
@admin_required

flask_app/admin/editions/dossard/templates/generate_dossard.html

Lines changed: 0 additions & 81 deletions
This file was deleted.

sql dumps/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## commands
2+
3+
```bash
4+
cd "/c/Program Files/MySQL/MySQL Server 8.0/bin"
5+
6+
./mysqldump.exe -h localhost -u root -P 3306 -p --no-data site > "/c/Users/romai/Downloads/db.sql"
7+
```

sql dumps/db.sql

22.6 KB
Binary file not shown.

sql dumps/db_v2.dbml

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
Table "edition" {
2+
"id" int [pk, not null, increment]
3+
"creation_date" datetime [not null]
4+
"name" varchar(40) [not null]
5+
"event_id" int [not null]
6+
"edition_date" datetime [not null]
7+
"first_inscription" datetimeme [not null]
8+
"last_inscription" datetime [not null]
9+
"rdv_lat" float [not null]
10+
"rdv_lng" float [not null]
11+
"description" text [not null]
12+
13+
Indexes {
14+
event_id [name: "event_id"]
15+
}
16+
}
17+
18+
Table "editions_parcours" {
19+
"edition_id" int [default: NULL]
20+
"parcours_id" int [default: NULL]
21+
22+
Indexes {
23+
edition_id [name: "edition_id"]
24+
parcours_id [name: "parcours_id"]
25+
}
26+
}
27+
28+
Table "event" {
29+
"id" int [pk, not null, increment]
30+
"creation_date" datetime [not null]
31+
"name" varchar(40) [not null]
32+
"createur_id" int [not null]
33+
"description" text [not null]
34+
35+
Indexes {
36+
name [unique, name: "name"]
37+
createur_id [name: "createur_id_user_id"]
38+
}
39+
}
40+
41+
Table "inscription" {
42+
"id" int [pk, not null, increment]
43+
"creation_date" datetime [not null]
44+
"user_id" int [not null]
45+
"event_id" int [not null]
46+
"edition_id" int [not null]
47+
"parcours_id" int [not null]
48+
"dossard" int [default: NULL]
49+
"present" tinyint(1) [not null]
50+
"end" varchar(10) [default: NULL]
51+
52+
Indexes {
53+
event_id [name: "event_id"]
54+
parcours_id [name: "parcours_id_parcours_id"]
55+
edition_id [name: "edition_id_edition_id"]
56+
user_id [name: "user_id_user_id"]
57+
}
58+
}
59+
60+
Table "parcours" {
61+
"id" int [pk, not null, increment]
62+
"creation_date" datetime [not null]
63+
"name" varchar(40) [not null]
64+
"event_id" int [not null]
65+
"description" text [not null]
66+
"archived" tinyint(1) [not null]
67+
"chronos_list" text [not null]
68+
69+
Indexes {
70+
event_id [name: "event_id_event_id"]
71+
}
72+
}
73+
74+
Table "passage" {
75+
"id" int [pk, not null, increment]
76+
"time_stamp" datetime [not null]
77+
"key_id" int [default: NULL]
78+
"inscription_id" int [not null]
79+
80+
Indexes {
81+
key_id [name: "key_id_passage_key_id"]
82+
inscription_id [name: "inscription_id_inscription_id"]
83+
}
84+
}
85+
86+
Table "passage_key" {
87+
"id" int [pk, not null, increment]
88+
"creation_date" datetime [not null]
89+
"event_id" int [not null]
90+
"edition_id" int [not null]
91+
"key" varchar(20) [not null]
92+
"name" varchar(40) [not null]
93+
94+
Indexes {
95+
key [unique, name: "key"]
96+
event_id [name: "event_id"]
97+
edition_id [name: "edition_id"]
98+
}
99+
}
100+
101+
Table "passagekey_stand" {
102+
"passage_key_id" int [default: NULL]
103+
"stand_id" int [default: NULL]
104+
105+
Indexes {
106+
stand_id [name: "stand_id_stand_id"]
107+
passage_key_id [name: "passage_key_id_passage_key_id"]
108+
}
109+
}
110+
111+
Table "stand" {
112+
"id" int [pk, not null, increment]
113+
"name" varchar(40) [not null]
114+
"lat" float [not null]
115+
"lng" float [not null]
116+
"elevation" float [default: NULL]
117+
"parcours_id" int [default: NULL]
118+
"start_stand" int [default: NULL]
119+
"end_stand" int [default: NULL]
120+
"color" varchar(20) [not null]
121+
"chrono" tinyint(1) [not null]
122+
123+
Indexes {
124+
parcours_id [name: "parcours_id"]
125+
end_stand [name: "end_stand_parcours_id"]
126+
start_stand [name: "start_stand_parcours_id"]
127+
}
128+
}
129+
130+
Table "trace" {
131+
"id" int [pk, not null, increment]
132+
"name" varchar(40) [not null]
133+
"parcours_id" int [default: NULL]
134+
"start_id" int [not null]
135+
"end_id" int [not null]
136+
"trace" text [not null]
137+
"turn_nb" int [not null]
138+
139+
Indexes {
140+
parcours_id [name: "parcours_id"]
141+
end_id [name: "end_id_stand_id"]
142+
start_id [name: "start_id_stand_id"]
143+
}
144+
}
145+
146+
Table "user" {
147+
"id" int [pk, not null, increment]
148+
"creation_date" datetime [not null]
149+
"avatar" varchar(80) [not null]
150+
"name" varchar(40) [not null]
151+
"lastname" varchar(20) [not null]
152+
"password" varchar(80) [not null]
153+
"username" varchar(20) [not null]
154+
"email" varchar(80) [default: NULL]
155+
"phone" varchar(15) [default: NULL]
156+
"datenaiss" datetime [not null]
157+
"admin" tinyint(1) [not null]
158+
159+
Indexes {
160+
username [unique, name: "username"]
161+
}
162+
}
163+
164+
Ref "edition_ibfk_1":"event"."id" < "edition"."event_id"
165+
166+
Ref "editions_parcours_ibfk_1":"edition"."id" < "editions_parcours"."edition_id"
167+
168+
Ref "editions_parcours_ibfk_2":"parcours"."id" < "editions_parcours"."parcours_id"
169+
170+
Ref "event_ibfk_1":"user"."id" < "event"."createur_id"
171+
172+
Ref "inscription_ibfk_1":"user"."id" < "inscription"."user_id"
173+
174+
Ref "inscription_ibfk_2":"event"."id" < "inscription"."event_id"
175+
176+
Ref "inscription_ibfk_3":"edition"."id" < "inscription"."edition_id"
177+
178+
Ref "inscription_ibfk_4":"parcours"."id" < "inscription"."parcours_id"
179+
180+
Ref "parcours_ibfk_1":"event"."id" < "parcours"."event_id"
181+
182+
Ref "passage_ibfk_1":"passage_key"."id" < "passage"."key_id"
183+
184+
Ref "passage_ibfk_2":"inscription"."id" < "passage"."inscription_id"
185+
186+
Ref "passage_key_ibfk_1":"event"."id" < "passage_key"."event_id"
187+
188+
Ref "passage_key_ibfk_2":"edition"."id" < "passage_key"."edition_id"
189+
190+
Ref "passagekey_stand_ibfk_1":"passage_key"."id" < "passagekey_stand"."passage_key_id"
191+
192+
Ref "passagekey_stand_ibfk_2":"stand"."id" < "passagekey_stand"."stand_id"
193+
194+
Ref "stand_ibfk_1":"parcours"."id" < "stand"."parcours_id"
195+
196+
Ref "stand_ibfk_2":"parcours"."id" < "stand"."start_stand"
197+
198+
Ref "stand_ibfk_3":"parcours"."id" < "stand"."end_stand"
199+
200+
Ref "trace_ibfk_1":"parcours"."id" < "trace"."parcours_id"
201+
202+
Ref "trace_ibfk_2":"stand"."id" < "trace"."start_id"
203+
204+
Ref "trace_ibfk_3":"stand"."id" < "trace"."end_id"

0 commit comments

Comments
 (0)