Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Site Interludes
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mediatek
Site Interludes
Commits
106516bf
Commit
106516bf
authored
4 years ago
by
Dorian Lesbre
Browse files
Options
Downloads
Patches
Plain Diff
Warning for malformed ActivityList table
parent
5dd17998
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
home/admin.py
+1
-1
1 addition, 1 deletion
home/admin.py
home/templates/admin.html
+10
-0
10 additions, 0 deletions
home/templates/admin.html
home/views.py
+7
-7
7 additions, 7 deletions
home/views.py
with
18 additions
and
8 deletions
home/admin.py
+
1
−
1
View file @
106516bf
...
...
@@ -54,7 +54,7 @@ class ActivityListAdmin(ExportCsvMixin, admin.ModelAdmin):
list_display
=
(
"
activity
"
,
"
participant
"
,
"
priority
"
,
"
accepted
"
)
list_filter
=
(
"
activity
"
,
"
participant__is_registered
"
,
"
activity__display
"
,
"
accepted
"
,
"
activity__
must_
subscrib
e
"
,
"
accepted
"
,
"
activity__subscrib
ing_open
"
,
)
list_editable
=
(
"
accepted
"
,)
ordering
=
(
"
activity
"
,
"
priority
"
,
"
participant
"
,)
...
...
This diff is collapsed.
Click to expand it.
home/templates/admin.html
+
10
−
0
View file @
106516bf
...
...
@@ -139,6 +139,10 @@
<div
class=
"qty"
>
Obtenus
</div>
<div
class=
"nb_small"
>
{{ metrics.granted }}
</div>
</div>
<div
class=
"stat"
>
<div
class=
"qty"
>
Malformé
</div>
<div
class=
"nb_small"
>
{{ metrics.malformed }}
</div>
</div>
</div>
<p>
*Le nombre d'activité "inscription" est le nombre d'activités affichée (dans la liste de la page
...
...
@@ -147,6 +151,12 @@
apparaître plusieures fois)
</p>
{% if metrics.malformed %}
<ul
class=
"messagelist"
><li
class=
"error"
>
Des activités non ouvertes aux inscriptions apparaissent dans les listes de souhait.
</li></ul>
{% endif %}
<h2>
Répartition des activités
</h2>
<p>
La répartition se fait depuis la
<a
href=
"{% url 'admin:index' %}"
>
page d'administration de django
</a>
,
...
...
This diff is collapsed.
Click to expand it.
home/views.py
+
7
−
7
View file @
106516bf
...
...
@@ -155,6 +155,8 @@ class AdminView(SuperuserRequiredMixin, TemplateView):
rennes
=
registered
.
filter
(
school
=
"
R
"
).
count
()
saclay
=
registered
.
filter
(
school
=
"
P
"
).
count
()
non_registered
=
EmailUser
.
objects
.
filter
(
is_active
=
True
).
count
()
-
participants
# mugs = registered.filter(mug=True).count()
sleeps
=
registered
.
filter
(
sleeps
=
True
).
count
()
meal1
=
registered
.
filter
(
meal_friday_evening
=
True
).
count
()
meal2
=
registered
.
filter
(
meal_saturday_morning
=
True
).
count
()
...
...
@@ -164,21 +166,19 @@ class AdminView(SuperuserRequiredMixin, TemplateView):
meal6
=
registered
.
filter
(
meal_sunday_midday
=
True
).
count
()
meals
=
meal1
+
meal2
+
meal3
+
meal4
+
meal5
+
meal6
# mugs = registered.filter(mug=True).count()
sleeps
=
registered
.
filter
(
sleeps
=
True
).
count
()
activites
=
acts
.
count
()
displayed
=
acts
.
filter
(
display
=
True
).
count
()
planning
=
acts
.
filter
(
on_planning
=
True
).
count
()
act_ins
=
acts
.
filter
(
display
=
True
,
must_subscribe
=
True
).
count
()
true_ins
=
acts
.
filter
(
subscribing_open
=
True
).
count
()
wish
=
wishes
.
count
()
granted
=
wishes
.
filter
(
accepted
=
True
).
count
()
st_present
=
acts
.
filter
(
display
=
True
,
status
=
InterludesActivity
.
Status
.
PRESENT
).
count
()
st_distant
=
acts
.
filter
(
display
=
True
,
status
=
InterludesActivity
.
Status
.
DISTANT
).
count
()
st_both
=
acts
.
filter
(
display
=
True
,
status
=
InterludesActivity
.
Status
.
BOTH
).
count
()
true_ins
=
acts
.
filter
(
subscribing_open
=
True
).
count
()
wish
=
wishes
.
count
()
granted
=
wishes
.
filter
(
accepted
=
True
).
count
()
malformed
=
ActivityList
.
objects
.
filter
(
activity__subscribing_open
=
False
).
count
()
# validation de la repartition des activités
accepted
=
wishes
.
filter
(
accepted
=
True
)
# order_by is useless but required
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment