-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from cannot-climb/feature/kilterboard
make kilter board app
- Loading branch information
Showing
19 changed files
with
294 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[flake8] | ||
max-line-length = 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
repos: | ||
- repo: https://github.com/ambv/black | ||
rev: 22.8.0 | ||
hooks: | ||
- id: black | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.9.2 | ||
hooks: | ||
- id: flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from django.contrib import admin | ||
|
||
from .models import ClimbVideo | ||
|
||
|
||
class ClimbVideoAdmin(admin.ModelAdmin): | ||
fields = ["video", "title", "difficulty", "degree", "upload_at"] | ||
list_display = ("title", "video", "difficulty", "degree", "upload_at") | ||
|
||
|
||
admin.site.register(ClimbVideo, ClimbVideoAdmin) | ||
# Register your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class KilterBoardConfig(AppConfig): | ||
default_auto_field = "django.db.models.BigAutoField" | ||
name = "kilterboard" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Generated by Django 4.1.1 on 2022-09-16 13:24 | ||
|
||
import datetime | ||
import django.core.validators | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="ClimbVideo", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("video", models.FileField(upload_to="")), | ||
("title", models.CharField(max_length=100)), | ||
( | ||
"degree", | ||
models.IntegerField( | ||
validators=[ | ||
django.core.validators.MaxValueValidator(70), | ||
django.core.validators.MinValueValidator(0), | ||
] | ||
), | ||
), | ||
( | ||
"difficulty", | ||
models.IntegerField( | ||
validators=[ | ||
django.core.validators.MaxValueValidator(19), | ||
django.core.validators.MinValueValidator(0), | ||
] | ||
), | ||
), | ||
( | ||
"upload_at", | ||
models.DateTimeField( | ||
default=datetime.datetime( | ||
2022, | ||
9, | ||
16, | ||
13, | ||
24, | ||
43, | ||
904116, | ||
tzinfo=datetime.timezone.utc, | ||
) | ||
), | ||
), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 4.1.1 on 2022-09-16 14:05 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("kilterboard", "0001_initial"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="climbvideo", | ||
name="upload_at", | ||
field=models.DateTimeField(auto_now_add=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 4.1.1 on 2022-09-16 14:12 | ||
|
||
from django.db import migrations, models | ||
import django.utils.timezone | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("kilterboard", "0002_alter_climbvideo_upload_at"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="climbvideo", | ||
name="upload_at", | ||
field=models.DateTimeField(default=django.utils.timezone.now), | ||
), | ||
] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from django.db import models | ||
from django.core.validators import MaxValueValidator, MinValueValidator | ||
from django.utils import timezone | ||
|
||
|
||
class ClimbVideo(models.Model): | ||
video = models.FileField() | ||
title = models.CharField(max_length=100) | ||
degree = models.IntegerField( | ||
validators=[MaxValueValidator(70), MinValueValidator(0)] | ||
) | ||
difficulty = models.IntegerField( | ||
validators=[MaxValueValidator(19), MinValueValidator(0)] | ||
) | ||
upload_at = models.DateTimeField(default=timezone.now) | ||
|
||
|
||
# Create your models here. |
Oops, something went wrong.