diff --git a/config/settings/base.py b/config/settings/base.py index c3138d4..2ed7583 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -272,3 +272,4 @@ SOCIALACCOUNT_FORMS = {"signup": "benchcoach.users.forms.UserSocialSignupForm"} # Your stuff... # ------------------------------------------------------------------------------ +INSTALLED_APPS += ["teamsnap", "instagen"] diff --git a/config/settings/local.py b/config/settings/local.py index bf258a5..a1b1dc1 100644 --- a/config/settings/local.py +++ b/config/settings/local.py @@ -64,7 +64,7 @@ INSTALLED_APPS += ["django_extensions"] # noqa F405 # Your stuff... # ------------------------------------------------------------------------------ -INSTALLED_APPS += ["teamsnap"] + ACCOUNT_AUTHENTICATION_METHOD = "email" ACCOUNT_EMAIL_REQUIRED = True ACCOUNT_USERNAME_REQUIRED = False diff --git a/config/urls.py b/config/urls.py index 43d57a6..deae37b 100644 --- a/config/urls.py +++ b/config/urls.py @@ -16,6 +16,7 @@ urlpatterns = [ path("users/", include("benchcoach.users.urls", namespace="users")), path("accounts/", include("allauth.urls")), path("", include("teamsnap.urls")), + path("", include("instagen.urls")), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/instagen/__init__.py b/instagen/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/instagen/apps.py b/instagen/apps.py new file mode 100644 index 0000000..eb2f652 --- /dev/null +++ b/instagen/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class InstagenConfig(AppConfig): + default_auto_field = "django.db.models.BigAutoField" + name = "instagen" diff --git a/instagen/static/instagen/favicon/android-chrome-192x192.png b/instagen/static/instagen/favicon/android-chrome-192x192.png new file mode 100644 index 0000000..f427f25 Binary files /dev/null and b/instagen/static/instagen/favicon/android-chrome-192x192.png differ diff --git a/instagen/static/instagen/favicon/android-chrome-512x512.png b/instagen/static/instagen/favicon/android-chrome-512x512.png new file mode 100644 index 0000000..196fedf Binary files /dev/null and b/instagen/static/instagen/favicon/android-chrome-512x512.png differ diff --git a/instagen/static/instagen/favicon/apple-touch-icon.png b/instagen/static/instagen/favicon/apple-touch-icon.png new file mode 100644 index 0000000..2c1e958 Binary files /dev/null and b/instagen/static/instagen/favicon/apple-touch-icon.png differ diff --git a/instagen/static/instagen/favicon/browserconfig.xml b/instagen/static/instagen/favicon/browserconfig.xml new file mode 100644 index 0000000..48dbfc6 --- /dev/null +++ b/instagen/static/instagen/favicon/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #323669 + + + diff --git a/instagen/static/instagen/favicon/favicon-16x16.png b/instagen/static/instagen/favicon/favicon-16x16.png new file mode 100644 index 0000000..54a2bc5 Binary files /dev/null and b/instagen/static/instagen/favicon/favicon-16x16.png differ diff --git a/instagen/static/instagen/favicon/favicon-32x32.png b/instagen/static/instagen/favicon/favicon-32x32.png new file mode 100644 index 0000000..4ac4169 Binary files /dev/null and b/instagen/static/instagen/favicon/favicon-32x32.png differ diff --git a/instagen/static/instagen/favicon/favicon.ico b/instagen/static/instagen/favicon/favicon.ico new file mode 100644 index 0000000..6d7bae2 Binary files /dev/null and b/instagen/static/instagen/favicon/favicon.ico differ diff --git a/instagen/static/instagen/favicon/mstile-150x150.png b/instagen/static/instagen/favicon/mstile-150x150.png new file mode 100644 index 0000000..651c226 Binary files /dev/null and b/instagen/static/instagen/favicon/mstile-150x150.png differ diff --git a/instagen/static/instagen/favicon/safari-pinned-tab.svg b/instagen/static/instagen/favicon/safari-pinned-tab.svg new file mode 100644 index 0000000..e834542 --- /dev/null +++ b/instagen/static/instagen/favicon/safari-pinned-tab.svg @@ -0,0 +1,97 @@ + + + + +Created by potrace 1.14, written by Peter Selinger 2001-2017 + + + + + + + + + + + + + + + + diff --git a/instagen/static/instagen/favicon/site.webmanifest b/instagen/static/instagen/favicon/site.webmanifest new file mode 100644 index 0000000..71cc43c --- /dev/null +++ b/instagen/static/instagen/favicon/site.webmanifest @@ -0,0 +1,19 @@ +{ + "name": "", + "short_name": "", + "icons": [ + { + "src": "/static/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/static/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/instagen/static/instagen/fonts/Arial.ttf b/instagen/static/instagen/fonts/Arial.ttf new file mode 100644 index 0000000..ab68fb1 Binary files /dev/null and b/instagen/static/instagen/fonts/Arial.ttf differ diff --git a/instagen/static/instagen/fonts/DINAlternate-Bold.ttf b/instagen/static/instagen/fonts/DINAlternate-Bold.ttf new file mode 100644 index 0000000..d6aa8f1 Binary files /dev/null and b/instagen/static/instagen/fonts/DINAlternate-Bold.ttf differ diff --git a/instagen/static/instagen/fonts/DINCondensed-Bold.ttf b/instagen/static/instagen/fonts/DINCondensed-Bold.ttf new file mode 100644 index 0000000..708c0a5 Binary files /dev/null and b/instagen/static/instagen/fonts/DINCondensed-Bold.ttf differ diff --git a/instagen/static/instagen/fonts/Freshman.ttf b/instagen/static/instagen/fonts/Freshman.ttf new file mode 100644 index 0000000..a20b7f9 Binary files /dev/null and b/instagen/static/instagen/fonts/Freshman.ttf differ diff --git a/instagen/static/instagen/fonts/Futura.ttc b/instagen/static/instagen/fonts/Futura.ttc new file mode 100644 index 0000000..8eaa87a Binary files /dev/null and b/instagen/static/instagen/fonts/Futura.ttc differ diff --git a/instagen/static/instagen/fonts/FuturaCondensedBold.otf b/instagen/static/instagen/fonts/FuturaCondensedBold.otf new file mode 100644 index 0000000..dab9a49 Binary files /dev/null and b/instagen/static/instagen/fonts/FuturaCondensedBold.otf differ diff --git a/instagen/static/instagen/fonts/ScalaSans-BoldLF.otf b/instagen/static/instagen/fonts/ScalaSans-BoldLF.otf new file mode 100644 index 0000000..9823262 Binary files /dev/null and b/instagen/static/instagen/fonts/ScalaSans-BoldLF.otf differ diff --git a/instagen/static/instagen/fonts/ScalaSans-Regular.otf b/instagen/static/instagen/fonts/ScalaSans-Regular.otf new file mode 100644 index 0000000..3d2fb72 Binary files /dev/null and b/instagen/static/instagen/fonts/ScalaSans-Regular.otf differ diff --git a/instagen/static/instagen/fonts/addidas.otf b/instagen/static/instagen/fonts/addidas.otf new file mode 100644 index 0000000..cb23637 Binary files /dev/null and b/instagen/static/instagen/fonts/addidas.otf differ diff --git a/instagen/static/instagen/fonts/college.otf b/instagen/static/instagen/fonts/college.otf new file mode 100644 index 0000000..4356a0d Binary files /dev/null and b/instagen/static/instagen/fonts/college.otf differ diff --git a/instagen/static/instagen/fonts/college.ttf b/instagen/static/instagen/fonts/college.ttf new file mode 100644 index 0000000..aaea5d1 Binary files /dev/null and b/instagen/static/instagen/fonts/college.ttf differ diff --git a/instagen/static/instagen/fonts/din-alt-bold.otf b/instagen/static/instagen/fonts/din-alt-bold.otf new file mode 100644 index 0000000..dd7538d Binary files /dev/null and b/instagen/static/instagen/fonts/din-alt-bold.otf differ diff --git a/instagen/static/instagen/fonts/din-cond-bold.otf b/instagen/static/instagen/fonts/din-cond-bold.otf new file mode 100644 index 0000000..9b6cd9d Binary files /dev/null and b/instagen/static/instagen/fonts/din-cond-bold.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-Black.otf b/instagen/static/instagen/fonts/din-pro/DINPro-Black.otf new file mode 100644 index 0000000..578641d Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-Black.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-BlackItalic.otf b/instagen/static/instagen/fonts/din-pro/DINPro-BlackItalic.otf new file mode 100644 index 0000000..82b5f18 Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-BlackItalic.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-Bold.otf b/instagen/static/instagen/fonts/din-pro/DINPro-Bold.otf new file mode 100644 index 0000000..b170223 Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-Bold.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-BoldItalic.otf b/instagen/static/instagen/fonts/din-pro/DINPro-BoldItalic.otf new file mode 100644 index 0000000..76c99de Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-BoldItalic.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-Cond.otf b/instagen/static/instagen/fonts/din-pro/DINPro-Cond.otf new file mode 100644 index 0000000..cb581b3 Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-Cond.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-CondBlack.otf b/instagen/static/instagen/fonts/din-pro/DINPro-CondBlack.otf new file mode 100644 index 0000000..cbcc768 Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-CondBlack.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-CondBlackIta.otf b/instagen/static/instagen/fonts/din-pro/DINPro-CondBlackIta.otf new file mode 100644 index 0000000..9da8b6b Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-CondBlackIta.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-CondBold.otf b/instagen/static/instagen/fonts/din-pro/DINPro-CondBold.otf new file mode 100644 index 0000000..81501d5 Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-CondBold.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-CondBoldIta.otf b/instagen/static/instagen/fonts/din-pro/DINPro-CondBoldIta.otf new file mode 100644 index 0000000..38d7bad Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-CondBoldIta.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-CondIta.otf b/instagen/static/instagen/fonts/din-pro/DINPro-CondIta.otf new file mode 100644 index 0000000..1e39666 Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-CondIta.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-CondLight.otf b/instagen/static/instagen/fonts/din-pro/DINPro-CondLight.otf new file mode 100644 index 0000000..7666695 Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-CondLight.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-CondLightIta.otf b/instagen/static/instagen/fonts/din-pro/DINPro-CondLightIta.otf new file mode 100644 index 0000000..be30b9b Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-CondLightIta.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-CondMediIta.otf b/instagen/static/instagen/fonts/din-pro/DINPro-CondMediIta.otf new file mode 100644 index 0000000..3596e2c Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-CondMediIta.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-CondMedium.otf b/instagen/static/instagen/fonts/din-pro/DINPro-CondMedium.otf new file mode 100644 index 0000000..00b38f6 Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-CondMedium.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-Italic.otf b/instagen/static/instagen/fonts/din-pro/DINPro-Italic.otf new file mode 100644 index 0000000..fa12564 Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-Italic.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-Light.otf b/instagen/static/instagen/fonts/din-pro/DINPro-Light.otf new file mode 100644 index 0000000..1b8cfbd Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-Light.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-LightItalic.otf b/instagen/static/instagen/fonts/din-pro/DINPro-LightItalic.otf new file mode 100644 index 0000000..baeefa4 Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-LightItalic.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-Medium.otf b/instagen/static/instagen/fonts/din-pro/DINPro-Medium.otf new file mode 100644 index 0000000..6f771ab Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-Medium.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro-MediumItalic.otf b/instagen/static/instagen/fonts/din-pro/DINPro-MediumItalic.otf new file mode 100644 index 0000000..151db45 Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro-MediumItalic.otf differ diff --git a/instagen/static/instagen/fonts/din-pro/DINPro.otf b/instagen/static/instagen/fonts/din-pro/DINPro.otf new file mode 100644 index 0000000..e6e44b1 Binary files /dev/null and b/instagen/static/instagen/fonts/din-pro/DINPro.otf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-Black.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-Black.ttf new file mode 100644 index 0000000..3d4ad46 Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-Black.ttf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-BlackItalic.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-BlackItalic.ttf new file mode 100644 index 0000000..427ee62 Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-BlackItalic.ttf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-Bold.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-Bold.ttf new file mode 100644 index 0000000..cdd74d6 Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-Bold.ttf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-BoldItalic.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-BoldItalic.ttf new file mode 100644 index 0000000..6def85f Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-BoldItalic.ttf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-ExtraBold.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-ExtraBold.ttf new file mode 100644 index 0000000..f0ac762 Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-ExtraBold.ttf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-ExtraBoldItalic.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-ExtraBoldItalic.ttf new file mode 100644 index 0000000..3b5d878 Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-ExtraBoldItalic.ttf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-ExtraLight.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-ExtraLight.ttf new file mode 100644 index 0000000..7038cb7 Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-ExtraLight.ttf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-ExtraLightItalic.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-ExtraLightItalic.ttf new file mode 100644 index 0000000..1fc2b0a Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-ExtraLightItalic.ttf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-Italic.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-Italic.ttf new file mode 100644 index 0000000..781c033 Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-Italic.ttf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-Light.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-Light.ttf new file mode 100644 index 0000000..f4e963a Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-Light.ttf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-LightItalic.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-LightItalic.ttf new file mode 100644 index 0000000..1a9f181 Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-LightItalic.ttf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-Medium.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-Medium.ttf new file mode 100644 index 0000000..86adf15 Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-Medium.ttf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-MediumItalic.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-MediumItalic.ttf new file mode 100644 index 0000000..78ba8a1 Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-MediumItalic.ttf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-Regular.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-Regular.ttf new file mode 100644 index 0000000..262d4c8 Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-Regular.ttf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-SemiBold.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-SemiBold.ttf new file mode 100644 index 0000000..41de5e7 Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-SemiBold.ttf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-SemiBoldItalic.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-SemiBoldItalic.ttf new file mode 100644 index 0000000..a49cf13 Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-SemiBoldItalic.ttf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-Thin.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-Thin.ttf new file mode 100644 index 0000000..1ada722 Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-Thin.ttf differ diff --git a/instagen/static/instagen/fonts/epilogue/Epilogue-ThinItalic.ttf b/instagen/static/instagen/fonts/epilogue/Epilogue-ThinItalic.ttf new file mode 100644 index 0000000..8fe60e5 Binary files /dev/null and b/instagen/static/instagen/fonts/epilogue/Epilogue-ThinItalic.ttf differ diff --git a/instagen/static/instagen/fonts/marker.ttf b/instagen/static/instagen/fonts/marker.ttf new file mode 100644 index 0000000..8052508 Binary files /dev/null and b/instagen/static/instagen/fonts/marker.ttf differ diff --git a/instagen/static/instagen/fonts/refrigerator/refrigerator-deluxe-bold.otf b/instagen/static/instagen/fonts/refrigerator/refrigerator-deluxe-bold.otf new file mode 100644 index 0000000..6a9132a Binary files /dev/null and b/instagen/static/instagen/fonts/refrigerator/refrigerator-deluxe-bold.otf differ diff --git a/instagen/static/instagen/fonts/refrigerator/refrigerator-deluxe-extrabold.otf b/instagen/static/instagen/fonts/refrigerator/refrigerator-deluxe-extrabold.otf new file mode 100644 index 0000000..ab65e2d Binary files /dev/null and b/instagen/static/instagen/fonts/refrigerator/refrigerator-deluxe-extrabold.otf differ diff --git a/instagen/static/instagen/fonts/refrigerator/refrigerator-deluxe-heavy.otf b/instagen/static/instagen/fonts/refrigerator/refrigerator-deluxe-heavy.otf new file mode 100644 index 0000000..8d2864f Binary files /dev/null and b/instagen/static/instagen/fonts/refrigerator/refrigerator-deluxe-heavy.otf differ diff --git a/instagen/static/instagen/fonts/refrigerator/refrigerator-deluxe-light.otf b/instagen/static/instagen/fonts/refrigerator/refrigerator-deluxe-light.otf new file mode 100644 index 0000000..7c31975 Binary files /dev/null and b/instagen/static/instagen/fonts/refrigerator/refrigerator-deluxe-light.otf differ diff --git a/instagen/static/instagen/fonts/refrigerator/refrigerator-deluxe.otf b/instagen/static/instagen/fonts/refrigerator/refrigerator-deluxe.otf new file mode 100644 index 0000000..1988e34 Binary files /dev/null and b/instagen/static/instagen/fonts/refrigerator/refrigerator-deluxe.otf differ diff --git a/instagen/static/instagen/fonts/scala/ScalaSans-BoldLF.otf b/instagen/static/instagen/fonts/scala/ScalaSans-BoldLF.otf new file mode 100644 index 0000000..9823262 Binary files /dev/null and b/instagen/static/instagen/fonts/scala/ScalaSans-BoldLF.otf differ diff --git a/instagen/static/instagen/fonts/scala/ScalaSans-Regular.otf b/instagen/static/instagen/fonts/scala/ScalaSans-Regular.otf new file mode 100644 index 0000000..3d2fb72 Binary files /dev/null and b/instagen/static/instagen/fonts/scala/ScalaSans-Regular.otf differ diff --git a/instagen/static/instagen/fonts/superstar.ttf b/instagen/static/instagen/fonts/superstar.ttf new file mode 100644 index 0000000..09684f6 Binary files /dev/null and b/instagen/static/instagen/fonts/superstar.ttf differ diff --git a/instagen/static/instagen/graphics/hounds-insta.jpg b/instagen/static/instagen/graphics/hounds-insta.jpg new file mode 100644 index 0000000..615ee0e Binary files /dev/null and b/instagen/static/instagen/graphics/hounds-insta.jpg differ diff --git a/instagen/static/instagen/graphics/sign-green.png b/instagen/static/instagen/graphics/sign-green.png new file mode 100644 index 0000000..0de83af Binary files /dev/null and b/instagen/static/instagen/graphics/sign-green.png differ diff --git a/instagen/static/instagen/graphics/sign-tan.png b/instagen/static/instagen/graphics/sign-tan.png new file mode 100644 index 0000000..32c96d7 Binary files /dev/null and b/instagen/static/instagen/graphics/sign-tan.png differ diff --git a/instagen/static/instagen/graphics/team.png b/instagen/static/instagen/graphics/team.png new file mode 100644 index 0000000..9c377d8 Binary files /dev/null and b/instagen/static/instagen/graphics/team.png differ diff --git a/instagen/static/instagen/locations/comedrecreationcenter.png b/instagen/static/instagen/locations/comedrecreationcenter.png new file mode 100755 index 0000000..a8805ee Binary files /dev/null and b/instagen/static/instagen/locations/comedrecreationcenter.png differ diff --git a/instagen/static/instagen/locations/maywoodpark.png b/instagen/static/instagen/locations/maywoodpark.png new file mode 100644 index 0000000..1d8ee38 Binary files /dev/null and b/instagen/static/instagen/locations/maywoodpark.png differ diff --git a/instagen/static/instagen/locations/simeonhs.png b/instagen/static/instagen/locations/simeonhs.png new file mode 100644 index 0000000..f58ca4a Binary files /dev/null and b/instagen/static/instagen/locations/simeonhs.png differ diff --git a/instagen/static/instagen/locations/southwestpark.png b/instagen/static/instagen/locations/southwestpark.png new file mode 100644 index 0000000..37b7df0 Binary files /dev/null and b/instagen/static/instagen/locations/southwestpark.png differ diff --git a/instagen/static/instagen/locations/waltherchristianacademy.png b/instagen/static/instagen/locations/waltherchristianacademy.png new file mode 100644 index 0000000..7defd8e Binary files /dev/null and b/instagen/static/instagen/locations/waltherchristianacademy.png differ diff --git a/instagen/static/instagen/locations/winnemacpark.png b/instagen/static/instagen/locations/winnemacpark.png new file mode 100644 index 0000000..319c6d1 Binary files /dev/null and b/instagen/static/instagen/locations/winnemacpark.png differ diff --git a/instagen/static/instagen/logos-bw/aviators.png b/instagen/static/instagen/logos-bw/aviators.png new file mode 100644 index 0000000..51810da Binary files /dev/null and b/instagen/static/instagen/logos-bw/aviators.png differ diff --git a/instagen/static/instagen/logos-bw/blazers.png b/instagen/static/instagen/logos-bw/blazers.png new file mode 100644 index 0000000..f0d742e Binary files /dev/null and b/instagen/static/instagen/logos-bw/blazers.png differ diff --git a/instagen/static/instagen/logos-bw/browns.png b/instagen/static/instagen/logos-bw/browns.png new file mode 100644 index 0000000..5ecc09d Binary files /dev/null and b/instagen/static/instagen/logos-bw/browns.png differ diff --git a/instagen/static/instagen/logos-bw/degeneratex.png b/instagen/static/instagen/logos-bw/degeneratex.png new file mode 100644 index 0000000..e6b4986 Binary files /dev/null and b/instagen/static/instagen/logos-bw/degeneratex.png differ diff --git a/instagen/static/instagen/logos-bw/dodgers.png b/instagen/static/instagen/logos-bw/dodgers.png new file mode 100644 index 0000000..9e7f2e8 Binary files /dev/null and b/instagen/static/instagen/logos-bw/dodgers.png differ diff --git a/instagen/static/instagen/logos-bw/electrons.png b/instagen/static/instagen/logos-bw/electrons.png new file mode 100644 index 0000000..1b4e72a Binary files /dev/null and b/instagen/static/instagen/logos-bw/electrons.png differ diff --git a/instagen/static/instagen/logos-bw/hounds.png b/instagen/static/instagen/logos-bw/hounds.png new file mode 100644 index 0000000..177625f Binary files /dev/null and b/instagen/static/instagen/logos-bw/hounds.png differ diff --git a/instagen/static/instagen/logos-bw/marlins.png b/instagen/static/instagen/logos-bw/marlins.png new file mode 100644 index 0000000..08f7f7f Binary files /dev/null and b/instagen/static/instagen/logos-bw/marlins.png differ diff --git a/instagen/static/instagen/logos-bw/orioles.png b/instagen/static/instagen/logos-bw/orioles.png new file mode 100644 index 0000000..fdca62a Binary files /dev/null and b/instagen/static/instagen/logos-bw/orioles.png differ diff --git a/instagen/static/instagen/logos-bw/pirates.png b/instagen/static/instagen/logos-bw/pirates.png new file mode 100644 index 0000000..f2f2a4b Binary files /dev/null and b/instagen/static/instagen/logos-bw/pirates.png differ diff --git a/instagen/static/instagen/logos-bw/redsox.png b/instagen/static/instagen/logos-bw/redsox.png new file mode 100644 index 0000000..6bd8e3c Binary files /dev/null and b/instagen/static/instagen/logos-bw/redsox.png differ diff --git a/instagen/static/instagen/logos-bw/trojans.png b/instagen/static/instagen/logos-bw/trojans.png new file mode 100644 index 0000000..7f2789d Binary files /dev/null and b/instagen/static/instagen/logos-bw/trojans.png differ diff --git a/instagen/static/instagen/logos-bw/vikings.png b/instagen/static/instagen/logos-bw/vikings.png new file mode 100644 index 0000000..74cdb4e Binary files /dev/null and b/instagen/static/instagen/logos-bw/vikings.png differ diff --git a/instagen/static/instagen/logos-bw/whitesox.png b/instagen/static/instagen/logos-bw/whitesox.png new file mode 100644 index 0000000..db7ea2b Binary files /dev/null and b/instagen/static/instagen/logos-bw/whitesox.png differ diff --git a/instagen/static/instagen/logos-bw/yankees.png b/instagen/static/instagen/logos-bw/yankees.png new file mode 100644 index 0000000..f6820ee Binary files /dev/null and b/instagen/static/instagen/logos-bw/yankees.png differ diff --git a/instagen/static/instagen/logos/aviators.png b/instagen/static/instagen/logos/aviators.png new file mode 100644 index 0000000..e6a9375 Binary files /dev/null and b/instagen/static/instagen/logos/aviators.png differ diff --git a/instagen/static/instagen/logos/blazers.png b/instagen/static/instagen/logos/blazers.png new file mode 100644 index 0000000..ffab4cb Binary files /dev/null and b/instagen/static/instagen/logos/blazers.png differ diff --git a/instagen/static/instagen/logos/browns.png b/instagen/static/instagen/logos/browns.png new file mode 100644 index 0000000..9031d7f Binary files /dev/null and b/instagen/static/instagen/logos/browns.png differ diff --git a/instagen/static/instagen/logos/degeneratex.png b/instagen/static/instagen/logos/degeneratex.png new file mode 100644 index 0000000..18d8a0a Binary files /dev/null and b/instagen/static/instagen/logos/degeneratex.png differ diff --git a/instagen/static/instagen/logos/dodgers.png b/instagen/static/instagen/logos/dodgers.png new file mode 100644 index 0000000..f046a83 Binary files /dev/null and b/instagen/static/instagen/logos/dodgers.png differ diff --git a/instagen/static/instagen/logos/electrons.png b/instagen/static/instagen/logos/electrons.png new file mode 100644 index 0000000..db9d5d8 Binary files /dev/null and b/instagen/static/instagen/logos/electrons.png differ diff --git a/instagen/static/instagen/logos/hounds.png b/instagen/static/instagen/logos/hounds.png new file mode 100644 index 0000000..2ed7346 Binary files /dev/null and b/instagen/static/instagen/logos/hounds.png differ diff --git a/instagen/static/instagen/logos/marlins.png b/instagen/static/instagen/logos/marlins.png new file mode 100644 index 0000000..6c47f92 Binary files /dev/null and b/instagen/static/instagen/logos/marlins.png differ diff --git a/instagen/static/instagen/logos/orioles.png b/instagen/static/instagen/logos/orioles.png new file mode 100644 index 0000000..4bca938 Binary files /dev/null and b/instagen/static/instagen/logos/orioles.png differ diff --git a/instagen/static/instagen/logos/pirates.png b/instagen/static/instagen/logos/pirates.png new file mode 100644 index 0000000..55978e7 Binary files /dev/null and b/instagen/static/instagen/logos/pirates.png differ diff --git a/instagen/static/instagen/logos/redsox.png b/instagen/static/instagen/logos/redsox.png new file mode 100644 index 0000000..ac6af19 Binary files /dev/null and b/instagen/static/instagen/logos/redsox.png differ diff --git a/instagen/static/instagen/logos/trojans.png b/instagen/static/instagen/logos/trojans.png new file mode 100644 index 0000000..3da4e66 Binary files /dev/null and b/instagen/static/instagen/logos/trojans.png differ diff --git a/instagen/static/instagen/logos/vikings.png b/instagen/static/instagen/logos/vikings.png new file mode 100644 index 0000000..105f27b Binary files /dev/null and b/instagen/static/instagen/logos/vikings.png differ diff --git a/instagen/static/instagen/logos/whitesox.png b/instagen/static/instagen/logos/whitesox.png new file mode 100644 index 0000000..dfa0375 Binary files /dev/null and b/instagen/static/instagen/logos/whitesox.png differ diff --git a/instagen/static/instagen/logos/yankees.png b/instagen/static/instagen/logos/yankees.png new file mode 100644 index 0000000..89b77db Binary files /dev/null and b/instagen/static/instagen/logos/yankees.png differ diff --git a/instagen/templates/instagen/instagen.html b/instagen/templates/instagen/instagen.html new file mode 100644 index 0000000..649cc2f --- /dev/null +++ b/instagen/templates/instagen/instagen.html @@ -0,0 +1,76 @@ + +{% extends "base.html" %}{% load static %} +{% block title %} {{ event.data.formatted_title }} - Instagenerator{% endblock %} +{% block page_heading %} +
+
+ +
+
Hounds Instagenerator
+
+{% endblock %} +{% block page_subheading %}{{ event.data.formatted_title }}, {{ event.data.start_date }}, {{ event.data.location_name }}{% endblock %} +{% block content %} + +
+ +
+ +
+ +
+ Background +
+ + +
+ +
+ + +
+
+ + +
+
+ +
+ Layout +
+ + +
+
+ + +
+
+ + +
+
+ +
+ +
+
+ +{% endblock %} diff --git a/instagen/tests.py b/instagen/tests.py new file mode 100644 index 0000000..a39b155 --- /dev/null +++ b/instagen/tests.py @@ -0,0 +1 @@ +# Create your tests here. diff --git a/instagen/urls.py b/instagen/urls.py new file mode 100644 index 0000000..479c26a --- /dev/null +++ b/instagen/urls.py @@ -0,0 +1,12 @@ +from django.urls import path + +from .views import get_matchup_image, image_generator + +urlpatterns = [ + path("/instagen/", image_generator, name="instagen"), + path( + "/instagen//generate", + get_matchup_image, + name="instagen_generate", + ), +] diff --git a/instagen/views.py b/instagen/views.py new file mode 100644 index 0000000..d7be0d1 --- /dev/null +++ b/instagen/views.py @@ -0,0 +1,115 @@ +from django.http import HttpResponse +from django.shortcuts import redirect, render + + +# Create your views here. +def image_generator(request, team_id, event_id): + request.user.socialaccount_set.filter(provider="teamsnap").first() + current_teamsnap_user = request.user.socialaccount_set.filter( + provider="teamsnap" + ).first() + + TOKEN = current_teamsnap_user.socialtoken_set.order_by("-expires_at").first().token + + from pyteamsnap.api import Event, TeamSnap + + client = TeamSnap(token=TOKEN) + + ts_event = Event.get(client, id=event_id) + return render(request, "instagen/instagen.html", context={"event": ts_event}) + + +def get_matchup_image(request, team_id, event_id, dimensions=None, background=None): + import io + + from pyteamsnap.api import Location, Opponent, Team + + from .utils.gen_image import Location as ImagegenLocation + from .utils.gen_image import Team as ImagegenTeam + from .utils.gen_image import gen_image, gen_results_image + + if not team_id: + return redirect( + "teamsnap_event", team_id=request.user.preferences.managed_team_id + ) + request.user.socialaccount_set.filter(provider="teamsnap").first() + current_teamsnap_user = request.user.socialaccount_set.filter( + provider="teamsnap" + ).first() + + ts_token = ( + current_teamsnap_user.socialtoken_set.order_by("-expires_at").first().token + ) + + from pyteamsnap.api import Event, TeamSnap + + teamsnap = TeamSnap(token=ts_token) + + if request.GET: + BACKGROUND = request.GET.get("background", "location") + game_id = event_id + dimensions = request.GET.get("dimensions") + width = int(dimensions.split("x")[0]) + height = int(dimensions.split("x")[1]) + + ts_event = Event.get(teamsnap, game_id).data + fave_team = Team.get(teamsnap, ts_event["team_id"]).data + opponent_team = Opponent.get(teamsnap, ts_event["opponent_id"]).data + location = Location.get(teamsnap, ts_event["location_id"]).data + formatted_results = ts_event["formatted_results"] + if formatted_results: + # L 4-3 + runs_for = formatted_results.split(" ")[1].split("-")[0] + runs_against = formatted_results.split(" ")[1].split("-")[1] + else: + runs_for, runs_against = None, None + + logo_image_directory = "instagen/static/instagen/logos-bw/{filename}.{ext}" + venue_image_directory = "instagen/static/instagen/locations/{filename}.{ext}" + + def shortname_from_name(name): + return name.replace(" ", "").lower() + + # date = parser.parse(ts_event['start_date']) + # date = date.astimezone(ZoneInfo("America/Chicago")) + game_info = { + "date": ts_event["start_date"], + "team_fave": ImagegenTeam( + name=fave_team["name"], + image_directory=logo_image_directory.format( + filename=shortname_from_name(fave_team["name"]), ext="png" + ), + ), + "team_opponent": ImagegenTeam( + name=opponent_team["name"], + image_directory=logo_image_directory.format( + filename=shortname_from_name(opponent_team["name"]), ext="png" + ), + ), + "location": ImagegenLocation( + name=location["name"], + image_directory=venue_image_directory.format( + filename=shortname_from_name(location["name"]), ext="png" + ), + # address=location['address'] + ), + "runs_for": runs_for, + "runs_against": runs_against, + } + + if not game_info["runs_for"] and not game_info["runs_against"]: + image = gen_image( + **game_info, background=BACKGROUND, width=width, height=height + ) + elif game_info["runs_for"] and game_info["runs_against"]: + image = gen_results_image( + **game_info, background=BACKGROUND, width=width, height=height + ) + else: + raise Exception + + imgByteArr = io.BytesIO() + image.save(imgByteArr, format="PNG") + imgByteArr = imgByteArr.getvalue() + + return HttpResponse(imgByteArr, content_type="image/png") diff --git a/teamsnap/templates/dashboard.html b/teamsnap/templates/dashboard.html index 711d0d1..3ecd6af 100644 --- a/teamsnap/templates/dashboard.html +++ b/teamsnap/templates/dashboard.html @@ -36,7 +36,7 @@
Go to Lineup
+ action="{% url 'instagen_generate' team_id=event.data.team_id event_id=event.data.id %}"> diff --git a/teamsnap/templates/event/view_event.html b/teamsnap/templates/event/view_event.html index 4765953..78c0680 100644 --- a/teamsnap/templates/event/view_event.html +++ b/teamsnap/templates/event/view_event.html @@ -9,28 +9,28 @@
-{# #} -{# #} -{# #} -{# #} -{# #} -{# #} -{# #} -{#
#} -{#
#} -{#
#} +
+ + + + +
+ +
+
+