Skip to content

Commit

Permalink
Merge 2e3a03c into e9eb0ef
Browse files Browse the repository at this point in the history
  • Loading branch information
bencyn committed Jun 18, 2019
2 parents e9eb0ef + 2e3a03c commit 66d4ba1
Show file tree
Hide file tree
Showing 14 changed files with 872 additions and 295 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ install:
before_script:
- invoke create-settings --settings-path ./wger/settings.py --database-path ./wger/database.sqlite
- invoke bootstrap-wger --settings-path ./wger/settings.py --no-start-server


# Do the tests
script:
Expand Down
205 changes: 178 additions & 27 deletions wger/core/fixtures/days_of_week.json
Original file line number Diff line number Diff line change
@@ -1,51 +1,202 @@
[
{
"pk": 1,
"model": "core.daysofweek",
"pk": 1,
"model": "core.daysofweek",
"fields": {
"day_of_week": "Monday"
"day_of_week": "Monday",
"workout_plan": "day"
}
},
},
{
"pk": 2,
"model": "core.daysofweek",
"pk": 2,
"model": "core.daysofweek",
"fields": {
"day_of_week": "Tuesday"
"day_of_week": "Tuesday",
"workout_plan": "day"
}
},
},
{
"pk": 3,
"model": "core.daysofweek",
"pk": 3,
"model": "core.daysofweek",
"fields": {
"day_of_week": "Wednesday"
"day_of_week": "Wednesday",
"workout_plan": "day"
}
},
},
{
"pk": 4,
"model": "core.daysofweek",
"pk": 4,
"model": "core.daysofweek",
"fields": {
"day_of_week": "Thursday"
"day_of_week": "Thursday",
"workout_plan": "day"
}
},
},
{
"pk": 5,
"model": "core.daysofweek",
"pk": 5,
"model": "core.daysofweek",
"fields": {
"day_of_week": "Friday"
"day_of_week": "Friday",
"workout_plan": "day"
}
},
},
{
"pk": 6,
"model": "core.daysofweek",
"pk": 6,
"model": "core.daysofweek",
"fields": {
"day_of_week": "Saturday"
"day_of_week": "Saturday",
"workout_plan": "day"
}
},
},
{
"pk": 7,
"model": "core.daysofweek",
"pk": 7,
"model": "core.daysofweek",
"fields": {
"day_of_week": "Sunday"
"day_of_week": "Sunday",
"workout_plan": "day"
}
},
{
"pk": 8,
"model": "core.daysofweek",
"fields": {
"day_of_week": "Week 1",
"workout_plan": "week"
}
},
{
"pk": 9,
"model": "core.daysofweek",
"fields": {
"day_of_week": "Week 2",
"workout_plan": "week"
}
},
{
"pk": 10,
"model": "core.daysofweek",
"fields": {
"day_of_week": "Week 3",
"workout_plan": "week"
}
},
{
"pk": 11,
"model": "core.daysofweek",
"fields": {
"day_of_week": "Week 4",
"workout_plan": "week"
}
},
{
"pk": 12,
"model": "core.daysofweek",
"fields": {
"day_of_week": "Week 5",
"workout_plan": "week"
}
},
{
"pk": 13,
"model": "core.daysofweek",
"fields": {
"day_of_week": "Week 6",
"workout_plan": "week"
}
},
{
"pk": 14,
"model": "core.daysofweek",
"fields": {
"day_of_week": "January",
"workout_plan": "Month"
}
},
{
"pk": 15,
"model": "core.daysofweek",
"fields": {
"day_of_week": "February",
"workout_plan": "Month"
}
},
{
"pk": 16,
"model": "core.daysofweek",
"fields": {
"day_of_week": "March",
"workout_plan": "Month"
}
},
{
"pk": 17,
"model": "core.daysofweek",
"fields": {
"day_of_week": "April",
"workout_plan": "Month"
}
},
{
"pk": 18,
"model": "core.daysofweek",
"fields": {
"day_of_week": "May",
"workout_plan": "Month"
}
},
{
"pk": 17,
"model": "core.daysofweek",
"fields": {
"day_of_week": "June",
"workout_plan": "Month"
}
},
{
"pk": 18,
"model": "core.daysofweek",
"fields": {
"day_of_week": "July",
"workout_plan": "Month"
}
},
{
"pk": 19,
"model": "core.daysofweek",
"fields": {
"day_of_week": "August",
"workout_plan": "Month"
}
},
{
"pk": 20,
"model": "core.daysofweek",
"fields": {
"day_of_week": "September",
"workout_plan": "Month"
}
},
{
"pk": 21,
"model": "core.daysofweek",
"fields": {
"day_of_week": "October",
"workout_plan": "Month"
}
},
{
"pk": 22,
"model": "core.daysofweek",
"fields": {
"day_of_week": "November",
"workout_plan": "Month"
}
},
{
"pk": 23,
"model": "core.daysofweek",
"fields": {
"day_of_week": "December",
"workout_plan": "Month"
}
}
]
18 changes: 18 additions & 0 deletions wger/core/migrations/0004_daysofweek_workout_plan.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 2.2.1 on 2019-06-13 13:45

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('core', '0003_userprofile_user_can_create_users'),
]

operations = [
migrations.AddField(
model_name='daysofweek',
name='workout_plan',
field=models.CharField(max_length=5, null=True),
),
]
2 changes: 2 additions & 0 deletions wger/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,8 @@ class DaysOfWeek(models.Model):
day_of_week = models.CharField(max_length=9,
verbose_name=_('Day of the week'))

workout_plan = models.CharField(max_length=5, null=True)

class Meta:
'''
Order by day-ID, this is needed for some DBs
Expand Down
Loading

0 comments on commit 66d4ba1

Please sign in to comment.