clean up merge

This commit is contained in:
2022-06-10 07:17:38 -05:00
parent a83bbffbfe
commit df210b71a2
5 changed files with 26 additions and 60 deletions

View File

@@ -272,5 +272,11 @@ SOCIALACCOUNT_FORMS = {"signup": "benchcoach.users.forms.UserSocialSignupForm"}
# Your stuff... # Your stuff...
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
INSTALLED_APPS += ["teamsnap", "instagen", "teamsnap.lineup", "teamsnap.dashboard"] INSTALLED_APPS += [
"teamsnap",
"instagen",
"gamecard",
"teamsnap.lineup",
"teamsnap.dashboard",
]
SOCIALACCOUNT_PROVIDERS = {"teamsnap": {"SCOPE": ["read", "write"]}} SOCIALACCOUNT_PROVIDERS = {"teamsnap": {"SCOPE": ["read", "write"]}}

View File

@@ -1,5 +1,6 @@
from django.urls import path from django.urls import path
from views import dashboard
from .views import dashboard
urlpatterns = [ urlpatterns = [
path("<int:team_id>/dashboard/", dashboard, name="teamsnap_dashboard"), path("<int:team_id>/dashboard/", dashboard, name="teamsnap_dashboard"),

View File

@@ -1,4 +1,4 @@
# Generated by Django 3.2.13 on 2022-06-09 12:09 # Generated by Django 3.2.13 on 2022-06-09 23:57
from django.conf import settings from django.conf import settings
from django.db import migrations, models from django.db import migrations, models
@@ -15,33 +15,27 @@ class Migration(migrations.Migration):
operations = [ operations = [
migrations.CreateModel( migrations.CreateModel(
name='Team', name='Opponent',
fields=[ fields=[
('id', models.IntegerField(primary_key=True, serialize=False)), ('id', models.IntegerField(primary_key=True, serialize=False)),
('logo', models.ImageField(upload_to='logos')), ('logo', models.ImageField(blank=True, null=True, upload_to='logos')),
('logo_mono', models.ImageField(upload_to='logos_mono')), ('logo_mono', models.ImageField(blank=True, null=True, upload_to='logos_mono')),
], ],
), ),
migrations.CreateModel( migrations.CreateModel(
name="Preferences", name='Team',
fields=[ fields=[
( ('id', models.IntegerField(primary_key=True, serialize=False)),
"id", ('logo', models.ImageField(blank=True, null=True, upload_to='logos')),
models.BigAutoField( ('logo_mono', models.ImageField(blank=True, null=True, upload_to='logos_mono')),
auto_created=True, ],
primary_key=True, ),
serialize=False, migrations.CreateModel(
verbose_name="ID", name='Preferences',
), fields=[
), ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
("managed_team_id", models.IntegerField()), ('managed_team_id', models.IntegerField()),
( ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
"user",
models.OneToOneField(
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
),
),
], ],
), ),
] ]

View File

@@ -1,33 +0,0 @@
# Generated by Django 3.2.13 on 2022-06-09 12:22
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('teamsnap', '0003_auto_20220609_0721'),
]
operations = [
migrations.AlterField(
model_name='opponent',
name='logo',
field=models.ImageField(blank=True, null=True, upload_to='logos'),
),
migrations.AlterField(
model_name='opponent',
name='logo_mono',
field=models.ImageField(blank=True, null=True, upload_to='logos_mono'),
),
migrations.AlterField(
model_name='team',
name='logo',
field=models.ImageField(blank=True, null=True, upload_to='logos'),
),
migrations.AlterField(
model_name='team',
name='logo_mono',
field=models.ImageField(blank=True, null=True, upload_to='logos_mono'),
),
]

View File

@@ -2,15 +2,13 @@ from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns
from django.urls import include, path from django.urls import include, path
from .provider import TeamsnapProvider from .provider import TeamsnapProvider
from .views import PreferencesFormView, dashboard, schedule_view, view_event from .views import PreferencesFormView, schedule_view, view_event
urlpatterns = default_urlpatterns(TeamsnapProvider) urlpatterns = default_urlpatterns(TeamsnapProvider)
urlpatterns += [ urlpatterns += [
path("preferences/", PreferencesFormView.as_view(), name="teamsnap_preferences"), path("preferences/", PreferencesFormView.as_view(), name="teamsnap_preferences"),
path("<int:team_id>/schedule/", schedule_view, name="teamsnap_schedule"), path("<int:team_id>/schedule/", schedule_view, name="teamsnap_schedule"),
path("<int:team_id>/dashboard/", dashboard, name="teamsnap_dashboard"),
path("dashboard/", dashboard, name="teamsnap_dashboard"),
path("schedule/", schedule_view, name="teamsnap_schedule"), path("schedule/", schedule_view, name="teamsnap_schedule"),
path( path(
"<int:team_id>/schedule/view_event/<int:event_id>", "<int:team_id>/schedule/view_event/<int:event_id>",