Commit d25f8d84 authored by Sondre Westby Liestøl's avatar Sondre Westby Liestøl
Browse files

Merge branch 'group' into 'master'

Group

See merge request !1
parents 44a603c9 31671524
Pipeline #160899 passed with stages
in 2 minutes and 47 seconds
# Generated by Django 3.1 on 2022-03-10 15:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('workouts', '0006_workout_difficulty'),
]
operations = [
migrations.AlterField(
model_name='workout',
name='difficulty',
field=models.IntegerField(default=1),
),
]
# Generated by Django 3.1 on 2022-03-10 15:25
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('workouts', '0007_auto_20220310_1518'),
]
operations = [
migrations.AddField(
model_name='workout',
name='members',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='groupworkouts', to='workouts.workout'),
),
]
......@@ -47,6 +47,9 @@ class Workout(models.Model):
get_user_model(), on_delete=models.CASCADE, related_name="workouts"
)
difficulty = models.IntegerField(default=1)
members = models.ForeignKey(
"self", on_delete=models.CASCADE, related_name="groupworkouts", blank=True, null=True
)
# Visibility levels
PUBLIC = "PU" # Visible to all authenticated users
......
......@@ -27,6 +27,7 @@
<div class="list-group list-group-horizontal d-inline-flex mt-2" id="list-tab" role="tablist">
<a class="list-group-item list-group-item-action active" id="list-all-workouts-list" data-bs-toggle="list" href="#list-all-workouts" role="tab" aria-controls="all">All Workouts</a>
<a class="list-group-item list-group-item-action" id="list-my-workouts-list" data-bs-toggle="list" href="#list-my-workouts" role="tab" aria-controls="my">My Workouts</a>
<a class="list-group-item list-group-item-action" id="list-my-group-workouts-list" data-bs-toggle="list" href="#list-my-group-workouts" role="tab" aria-controls="my">My Group Workouts</a>
<a class="list-group-item list-group-item-action" id="list-athlete-workouts-list" data-bs-toggle="list" href="#list-athlete-workouts" role="tab" aria-controls="athlete">Athlete Workouts</a>
<a class="list-group-item list-group-item-action" id="list-public-workouts-list" data-bs-toggle="list" href="#list-public-workouts" role="tab" aria-controls="public">Public Workouts</a>
</div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment