feat: Initiales Projekt-Setup gemäß Phase 1
This commit is contained in:
commit
bf27894513
0
accounts/__init__.py
Normal file
0
accounts/__init__.py
Normal file
BIN
accounts/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
accounts/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
BIN
accounts/__pycache__/admin.cpython-313.pyc
Normal file
BIN
accounts/__pycache__/admin.cpython-313.pyc
Normal file
Binary file not shown.
BIN
accounts/__pycache__/apps.cpython-313.pyc
Normal file
BIN
accounts/__pycache__/apps.cpython-313.pyc
Normal file
Binary file not shown.
BIN
accounts/__pycache__/models.cpython-313.pyc
Normal file
BIN
accounts/__pycache__/models.cpython-313.pyc
Normal file
Binary file not shown.
BIN
accounts/__pycache__/urls.cpython-313.pyc
Normal file
BIN
accounts/__pycache__/urls.cpython-313.pyc
Normal file
Binary file not shown.
BIN
accounts/__pycache__/views.cpython-313.pyc
Normal file
BIN
accounts/__pycache__/views.cpython-313.pyc
Normal file
Binary file not shown.
3
accounts/admin.py
Normal file
3
accounts/admin.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
accounts/apps.py
Normal file
6
accounts/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class AccountsConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'accounts'
|
||||
0
accounts/migrations/__init__.py
Normal file
0
accounts/migrations/__init__.py
Normal file
BIN
accounts/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
accounts/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
3
accounts/models.py
Normal file
3
accounts/models.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
3
accounts/tests.py
Normal file
3
accounts/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
6
accounts/urls.py
Normal file
6
accounts/urls.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
# Add your URLs here
|
||||
]
|
||||
3
accounts/views.py
Normal file
3
accounts/views.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
0
baseball_organisator/__init__.py
Normal file
0
baseball_organisator/__init__.py
Normal file
BIN
baseball_organisator/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
baseball_organisator/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
BIN
baseball_organisator/__pycache__/settings.cpython-313.pyc
Normal file
BIN
baseball_organisator/__pycache__/settings.cpython-313.pyc
Normal file
Binary file not shown.
BIN
baseball_organisator/__pycache__/urls.cpython-313.pyc
Normal file
BIN
baseball_organisator/__pycache__/urls.cpython-313.pyc
Normal file
Binary file not shown.
16
baseball_organisator/asgi.py
Normal file
16
baseball_organisator/asgi.py
Normal file
@ -0,0 +1,16 @@
|
||||
"""
|
||||
ASGI config for baseball_organisator project.
|
||||
|
||||
It exposes the ASGI callable as a module-level variable named ``application``.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/5.2/howto/deployment/asgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from django.core.asgi import get_asgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'baseball_organisator.settings')
|
||||
|
||||
application = get_asgi_application()
|
||||
126
baseball_organisator/settings.py
Normal file
126
baseball_organisator/settings.py
Normal file
@ -0,0 +1,126 @@
|
||||
"""
|
||||
Django settings for baseball_organisator project.
|
||||
|
||||
Generated by 'django-admin startproject' using Django 5.2.6.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/5.2/topics/settings/
|
||||
|
||||
For the full list of settings and their values, see
|
||||
https://docs.djangoproject.com/en/5.2/ref/settings/
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'django-insecure-)p-ei0pchzmkv!72^wr$!_s=9a_*4kuzsy(5_(urc*w(uummf3'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'accounts',
|
||||
'clubs',
|
||||
'calendars',
|
||||
'dashboard',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'baseball_organisator.urls'
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
WSGI_APPLICATION = 'baseball_organisator.wsgi.application'
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#auth-password-validators
|
||||
|
||||
AUTH_PASSWORD_VALIDATORS = [
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/5.2/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
TIME_ZONE = 'UTC'
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
USE_TZ = True
|
||||
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/5.2/howto/static-files/
|
||||
|
||||
STATIC_URL = 'static/'
|
||||
|
||||
# Default primary key field type
|
||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
26
baseball_organisator/urls.py
Normal file
26
baseball_organisator/urls.py
Normal file
@ -0,0 +1,26 @@
|
||||
"""
|
||||
URL configuration for baseball_organisator project.
|
||||
|
||||
The `urlpatterns` list routes URLs to views. For more information please see:
|
||||
https://docs.djangoproject.com/en/5.2/topics/http/urls/
|
||||
Examples:
|
||||
Function views
|
||||
1. Add an import: from my_app import views
|
||||
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
||||
Class-based views
|
||||
1. Add an import: from other_app.views import Home
|
||||
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
||||
Including another URLconf
|
||||
1. Import the include() function: from django.urls import include, path
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('accounts/', include('accounts.urls')),
|
||||
path('clubs/', include('clubs.urls')),
|
||||
path('calendars/', include('calendars.urls')),
|
||||
path('dashboard/', include('dashboard.urls')),
|
||||
]
|
||||
16
baseball_organisator/wsgi.py
Normal file
16
baseball_organisator/wsgi.py
Normal file
@ -0,0 +1,16 @@
|
||||
"""
|
||||
WSGI config for baseball_organisator project.
|
||||
|
||||
It exposes the WSGI callable as a module-level variable named ``application``.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/5.2/howto/deployment/wsgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'baseball_organisator.settings')
|
||||
|
||||
application = get_wsgi_application()
|
||||
0
calendars/__init__.py
Normal file
0
calendars/__init__.py
Normal file
BIN
calendars/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
calendars/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
BIN
calendars/__pycache__/admin.cpython-313.pyc
Normal file
BIN
calendars/__pycache__/admin.cpython-313.pyc
Normal file
Binary file not shown.
BIN
calendars/__pycache__/apps.cpython-313.pyc
Normal file
BIN
calendars/__pycache__/apps.cpython-313.pyc
Normal file
Binary file not shown.
BIN
calendars/__pycache__/models.cpython-313.pyc
Normal file
BIN
calendars/__pycache__/models.cpython-313.pyc
Normal file
Binary file not shown.
BIN
calendars/__pycache__/urls.cpython-313.pyc
Normal file
BIN
calendars/__pycache__/urls.cpython-313.pyc
Normal file
Binary file not shown.
BIN
calendars/__pycache__/views.cpython-313.pyc
Normal file
BIN
calendars/__pycache__/views.cpython-313.pyc
Normal file
Binary file not shown.
3
calendars/admin.py
Normal file
3
calendars/admin.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
calendars/apps.py
Normal file
6
calendars/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class CalendarsConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'calendars'
|
||||
0
calendars/migrations/__init__.py
Normal file
0
calendars/migrations/__init__.py
Normal file
BIN
calendars/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
calendars/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
3
calendars/models.py
Normal file
3
calendars/models.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
3
calendars/tests.py
Normal file
3
calendars/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
6
calendars/urls.py
Normal file
6
calendars/urls.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
# Add your URLs here
|
||||
]
|
||||
3
calendars/views.py
Normal file
3
calendars/views.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
0
clubs/__init__.py
Normal file
0
clubs/__init__.py
Normal file
BIN
clubs/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
clubs/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
BIN
clubs/__pycache__/admin.cpython-313.pyc
Normal file
BIN
clubs/__pycache__/admin.cpython-313.pyc
Normal file
Binary file not shown.
BIN
clubs/__pycache__/apps.cpython-313.pyc
Normal file
BIN
clubs/__pycache__/apps.cpython-313.pyc
Normal file
Binary file not shown.
BIN
clubs/__pycache__/models.cpython-313.pyc
Normal file
BIN
clubs/__pycache__/models.cpython-313.pyc
Normal file
Binary file not shown.
BIN
clubs/__pycache__/urls.cpython-313.pyc
Normal file
BIN
clubs/__pycache__/urls.cpython-313.pyc
Normal file
Binary file not shown.
BIN
clubs/__pycache__/views.cpython-313.pyc
Normal file
BIN
clubs/__pycache__/views.cpython-313.pyc
Normal file
Binary file not shown.
3
clubs/admin.py
Normal file
3
clubs/admin.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
clubs/apps.py
Normal file
6
clubs/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ClubsConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'clubs'
|
||||
0
clubs/migrations/__init__.py
Normal file
0
clubs/migrations/__init__.py
Normal file
BIN
clubs/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
clubs/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
3
clubs/models.py
Normal file
3
clubs/models.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
3
clubs/tests.py
Normal file
3
clubs/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
6
clubs/urls.py
Normal file
6
clubs/urls.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
# Add your URLs here
|
||||
]
|
||||
3
clubs/views.py
Normal file
3
clubs/views.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
0
dashboard/__init__.py
Normal file
0
dashboard/__init__.py
Normal file
BIN
dashboard/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
dashboard/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
BIN
dashboard/__pycache__/admin.cpython-313.pyc
Normal file
BIN
dashboard/__pycache__/admin.cpython-313.pyc
Normal file
Binary file not shown.
BIN
dashboard/__pycache__/apps.cpython-313.pyc
Normal file
BIN
dashboard/__pycache__/apps.cpython-313.pyc
Normal file
Binary file not shown.
BIN
dashboard/__pycache__/models.cpython-313.pyc
Normal file
BIN
dashboard/__pycache__/models.cpython-313.pyc
Normal file
Binary file not shown.
BIN
dashboard/__pycache__/urls.cpython-313.pyc
Normal file
BIN
dashboard/__pycache__/urls.cpython-313.pyc
Normal file
Binary file not shown.
BIN
dashboard/__pycache__/views.cpython-313.pyc
Normal file
BIN
dashboard/__pycache__/views.cpython-313.pyc
Normal file
Binary file not shown.
3
dashboard/admin.py
Normal file
3
dashboard/admin.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
dashboard/apps.py
Normal file
6
dashboard/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class DashboardConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'dashboard'
|
||||
0
dashboard/migrations/__init__.py
Normal file
0
dashboard/migrations/__init__.py
Normal file
BIN
dashboard/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
dashboard/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
3
dashboard/models.py
Normal file
3
dashboard/models.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
3
dashboard/tests.py
Normal file
3
dashboard/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
6
dashboard/urls.py
Normal file
6
dashboard/urls.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
# Add your URLs here
|
||||
]
|
||||
3
dashboard/views.py
Normal file
3
dashboard/views.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
BIN
db.sqlite3
Normal file
BIN
db.sqlite3
Normal file
Binary file not shown.
BIN
docs/.projektbeschreibung.md.swp
Normal file
BIN
docs/.projektbeschreibung.md.swp
Normal file
Binary file not shown.
53
docs/phase1.md
Normal file
53
docs/phase1.md
Normal file
@ -0,0 +1,53 @@
|
||||
## Phase 1: Projektvorbereitung und Basiskonfiguration
|
||||
|
||||
Dies ist der grundlegende Setup-Teil. Der Agent soll eine saubere Arbeitsumgebung schaffen und das Django-Projekt initialisieren.
|
||||
|
||||
Schritt 1: Projektverzeichnis erstellen
|
||||
|
||||
Erstelle ein neues Verzeichnis namens baseball_organisator für das Projekt.
|
||||
|
||||
Schritt 2: Virtuelle Umgebung einrichten
|
||||
|
||||
Navigiere in das Verzeichnis baseball_organisator.
|
||||
|
||||
Erstelle eine virtuelle Python-Umgebung im Projektverzeichnis.
|
||||
|
||||
Aktiviere die virtuelle Umgebung.
|
||||
|
||||
Schritt 3: Django installieren und Projekt initialisieren
|
||||
|
||||
Installiere Django und mysqlclient in der virtuellen Umgebung.
|
||||
|
||||
Initialisiere ein neues Django-Projekt namens baseball_organisator im aktuellen Verzeichnis.
|
||||
|
||||
Schritt 4: Grundlegende Django-Apps erstellen
|
||||
|
||||
Erstelle die folgenden Django-Apps:
|
||||
|
||||
accounts (für Benutzerverwaltung und Login)
|
||||
|
||||
clubs (für Club-, Mannschafts- und Team-Strukturen)
|
||||
|
||||
calendars (für Terminverwaltung)
|
||||
|
||||
dashboard (für die Startseite nach dem Login)
|
||||
|
||||
Schritt 5: URLs konfigurieren
|
||||
|
||||
Öffne die Datei baseball_organisator/urls.py.
|
||||
|
||||
Füge die URLs der neu erstellten Apps hinzu, sodass sie erreichbar sind.
|
||||
|
||||
Schritt 6: Datenbankkonfiguration anpassen
|
||||
|
||||
Öffne die Datei baseball_organisator/settings.py.
|
||||
|
||||
Stelle sicher, dass sqlite3 als Datenbank-Backend für die Entwicklungsumgebung konfiguriert ist, wie in den Projektanforderungen beschrieben.
|
||||
|
||||
Trage die Namen der neu erstellten Apps in INSTALLED_APPS ein.
|
||||
|
||||
Schritt 7: Admin-Benutzer anlegen
|
||||
|
||||
Führe die Migrationen aus (migrate).
|
||||
|
||||
Erstelle einen Superuser für den Zugriff auf den Django-Adminbereich.
|
||||
94
docs/projektbeschreibung.md
Normal file
94
docs/projektbeschreibung.md
Normal file
@ -0,0 +1,94 @@
|
||||
Anforderung Technisch:
|
||||
Benötigt wird ein Projektplan der in kleinen abzuschließenden Steps für ein Agent wie den gemini-client abzuarbeiten ist, ohne das viel Kontext von anderen Steps notwendig ist.
|
||||
Am ende soll ein Programm rauskommen, das eine Webapplikation ist, den heutigen gängigen Layouts entspricht und Performant funktioniert. Es soll für casualnutzer leicht zu bedienen sein.
|
||||
Als sprache soll python und als Framework django genutzt werden. Tools wie automatisierte deployments sind nicht gewünscht, der Code muss im ganzen ohne Probleme vom Entwicklungsrechner auf den Webspeicher zu laden sein. Als Datenbank Backend soll mysql auf dem produktionsrechner laufen. Auf der Enwiklcungsumgebung kann und soll mit den handelsüblichen tools die django mitliefert gearbeitet werden, also sqlite und den internen webbrowser.
|
||||
Python muss im Projektordenr als virtuelles env erstellt werden und die benötigten tools ebenfalls.
|
||||
|
||||
Was soll die App machen:
|
||||
Die App soll ein organsisationskalender darstellen, mit denen ein Sportverein mit seinen vielen Untergliederungen den Coaches, Spielern und Eltern es ermöglicht, Termine zu erstellen, ab oder zuzusagen und auch eine Planung für entsprechende Termine zu gestalten. Das ganze erfolgt über einen eigenen login bereich der dann an ein entsprechendes Dashboard weiterleitet, wo alle wichtigen Person relateten Dinge zu sehen sind, je nach Aufgabe sind hier verschieden "widgets" zu sehen.
|
||||
|
||||
|
||||
Die Organisation:
|
||||
Im Programm gibt die die Hauptorgansisation der Club. Ein Club hat ein Name, eine Webseite und einen oder mehrere Admins, diese haben keinen zugang zum Dashboard sondern ausschließlich zum backend.
|
||||
Ein Club besteht aus einer oder mehrere Manschaften. Jede Manschaft hat einen Unique Namen innerhalb des Clubs. Jeder Manschaft ist ein Headcoach zugewiesen, und kann einen oder mehrere Assistant Coaches haben. Jede Manschaft mehrere Teams als untergliederung haben, wenn eine Manschaft kein Team hat, wird die Manschaft als Team behandelt, es muss nachträglich vom Headcoach der Manschaft möglich sein neue Teams zu definieren oder Teams zu löschen. Sollte das vorletzte Team gelöscht werden, wird wieder die Manschaft als Team bewerte. Aber eine Manschaft die kein Team besitzt muss ebenfalls zu verändert werden können das sie als untergliederung Teams hat.
|
||||
Jedes Team hat ein unique Namen, hat einen Headcoach und einen Assistant Coach, die sich aus den Coaches der Manschaften zusammensetzen.
|
||||
|
||||
|
||||
Die User:
|
||||
Ein user hat einen benutzernamen und ein Passwort. Den zugang erhält der User durch eine erstmaligen einladungscode, nach dem eingeben des Code, legt er einen Benutzernamen und ein passwort fest.
|
||||
Ein User kann eine oder mehrere Rollen innehaben: Elternteil, Spieler, Headcoach, AssistantCoach, Kind
|
||||
Die Rollen werden nicht nicht durch flags im Profil definiert sondern durch gegebenheiten und paramtern, da das sich die Rollen quasi selbst verteilen.
|
||||
|
||||
Ein User ist ein Spieler, wenn er als solches von einem Headcoach angelegt wurde, sollte ein spieler jünger als 18 Jahre sein, bekommt er zu seinen einladungscode mindestens noch 2 zusätzliche einladungscode für seine Elternteile. Er wird durch sein alter als Kind gewertet. Ein Spieler gehört immer mindestens einer Manschaft bei. Er gehört maximal ein Team einer Manschaft an.
|
||||
Wenn er über 18 Jahre ist, kann er selbst Terminen zu oder absagen. Die Parameter eines Spielers sind mindestens die folgenden: Nachname, Vorname, Geburtstagsdatum (für die errechnung des alters), Spielernummer, optional 2 Elternteile. Die Spielernummer ist per default 999 wenn keine nummer eingegeben wurde.
|
||||
|
||||
Ein User ist ein Kind, wenn sein Alter unter 18 Jahre ist.
|
||||
Ein Kind hat mindestens ein Elternteil maximal 2.
|
||||
Ein Kind kann sich einloggen und seine Termine sehen, diese aber weder ab noch zusagen.
|
||||
Ein Kind ist immer auch ein Spieler
|
||||
|
||||
Ein User ist ein Elternteil, wenn es mind. 21 Jahre alt ist.
|
||||
Es ist mindestens einem Kind zugeordnet.
|
||||
Es kann Termine für seine Kinder sehen, ab und zusagen.
|
||||
|
||||
Ein User ist ein Coach wenn er mindestens einer Manschaft oder einem Team als HeadCoach oder Assistantcoach zugewiesen wurde. Er hat dann ausschließlich Coachrechte für seine Gliederung, also Team oder Manschaft. Ein Coach kann Termine anlegen und absagen.
|
||||
|
||||
Ein Headcoach ist ein Coach mit besonderen Rechten er kann Assistent-Coaches für seine Gliederung definieren. Als Headcoach einer Manschaft, kann er vom Dashboard aus, selber ein neues Team in seiner Gliederung anlegen, absagen oder editieren.
|
||||
Er kann Spieler in seiner Manschaft aufnehmen, und diese auch anlegen. Eer hat die möglichkeit einen Spieler in eine gleichwertige Gliederung zu verschieben. Dieses erfolgt durch einen speziellen Workflow (weiter unten). Er kann zusagen und absagen von allen Spielern zu seinen Terminen direkt sehen. Ein Headcoach einer Manschaft ist immer auch indirekt Headcoach der Teams, auch wenn nicht explizieht angegeben, er hat automatisch alle rechte für die Manschaft und der untergliederten Teams. Ein Headcoach kann einen Asistentcoach für eine gewisse Zeit (enddatum) als Headcoach deinifieren, dieser erhält für den Zeitraum alle Rechte des Headcoaches der entsprechenden Gliederung und verliert diese mit beendigung des Enddatums.
|
||||
|
||||
Ein AssistentCoach ist ein Coach. Er ist mindestens einer Manschaft zugeordnet, und kann entsprechend dann auch Coach eines Teams dieser Manschaft sein, auch wenn er nur Assistent Coach einer Manschaft ist, kann er Headcoach eines der Teams dieser Manschaft sein. Damit erhält er alle rechte eines Headcoaches seines Teams aber nicht die Headcoachrechte der Manschaft.
|
||||
|
||||
|
||||
User beziehungen:
|
||||
Ein Kind kann nur Spieler und Kind sein.
|
||||
Ein Spieler kann nicht gleichzeitig Coach der eigenen Gliederung sein.
|
||||
Ein Coach muss Volljährlich sein.
|
||||
Ein Elternteil kann Coach sein und auch Spieler, aber kein Kind.
|
||||
|
||||
|
||||
Der Einladungcode:
|
||||
Der Einladungscode wird bei anlage eines Spielers erstellt. Er ist maximal 2 Wochen gültig. Bei einloggen mit dem einladungscode und der erstellung der USerdaten wie username und password, erlischt dieser ebenfalls automatisch. Ein Einladungscode der vergeben wurde, kann nicht wieder für andere User vergeben werden. Ein Einladungscode kann von dem Headcoach wieder reactiviert werden, der den Spieler angelegt hat.
|
||||
|
||||
Spieleranlage:
|
||||
Ein Headcoach einer Manschaft kann einen Spieler anlegen. Dafür gibt er in einem Formular, den Vornamen und Nachnamen des Spielers ein, sollte das Geburtsdatum bekannt sein, kann er dieses eingeben, alternativ, gibt es ein Auswahlfeld, ob der Spieler Volljährig ist, wenn dem so ist, wird das geburztdatum auf den jeweiligen Tag minus 18 Jahre gesetzt, wenn nein, wird das Geburtsdatum auf den Anlegetag gesetzt. Das Flag Vollhrig wird nur im Formular bei anlage angezeigt, es wird nicht gepseichert, stattdessen wird ensprechend der auswahl ein default Geburrtsdatum festgelegt. Sollte im nachhein das Geburtsdatum auf ein Datum gesetzt werden, was erfodert das Elternteile benötigt werden, wird direkt auf die Einladungscode geneireung verwiesen die einladungscodes generiert. Bei anlage wird ein Einladungscode für den Spieler erstellt, unabhängig des alters. Abhängig von alter des Spielers, wenn er unter 18 Jahre ist, entweder errechnet durchs Geburtsdatum oder des Flags ob er volljährig ist, wird auf Wunsches des Coaches können entweder ein oder zwei zusätzliche einladungscodes generiert werden für dei elternteile, alternativ kann auch direkt ein oder zwei bestehende 21 jährige User als Elternteil definiert werden in diesem fall werden die Elternteile direkt dem Spieler als elterteil zugeordnet. Bei einladungscodes geschieht die zuordnung erst bei anlage des users des elternteils, es muss also der einladungscode dem Kind zugeordnet werden. Dafür werden dummyuser für jedes elternteil erstellt, dem entsprechend der Code zugewiesen wird. Bei neuanlage der Eltern, wird das alter nicht überprüft die altersgrenze ist hier von nöten die um die auswahl der user die bereits als exisiteren und als elternteil hinzugefügt werden sollen, zu minimieren.
|
||||
Wird ein ein Geburtsdatum eines Spielers auf ein Datum welches von 18 Jahre auf unter 18 Jahre wechselt, wird ensprechedn wie bei der Useranlage ein Formular zur elternteilanlage gezeigt, diese ist ähnlich oder identisch dem bei der Spieleranlage, man kann also neue Einladungscodes generieren oder aber bestehende 21 Jahrige User als Elternteil festlegen.
|
||||
|
||||
Terminne nee
|
||||
Es gibt 3 Arten von Terminen, Training, Spiel und Event.
|
||||
|
||||
Diese können von dem Headcoach der entsprechenden GLiederung angelegt werden, aber nur für die entsprechende Gliederung. Ein Headcoach einer Manschaft, kann Termine für die Manschaft insgesammt oder für einzelne Teams der Manschaft festlegen.
|
||||
|
||||
Der Basistermin ist ein Event, dieser Enthält eine kurze beschreibugn, die Uhrzeit, Datum und Treffpunkt, letzteres ist eine Adresse, die mittels Googlemaps als Shortlink verknüpft ist, es wird also eine schnittstelle zu googlemaps benötigt. Eine Endzeit ist optional genauso der Abholort.
|
||||
|
||||
Ein Training ist ein Event, mit folgenden besonderheiten, er hat keine Mindestanzahl an Teilnehmern, und wird immer als Training zusätzlich ervorgehoben.
|
||||
|
||||
Ein Spiel ist ein besonderes Event, es wird als Spiel herfolgehoben, und benötigt immer mind. 9 zusagen. Ein Spiel kann nur einem Team zugeordnet werden, oder einer Manschaft, sofern diese keine Teams hat, bzw. nur ein Team beinhaltet. Die Uhrzeit des Events ist hier die Uhrzeit wann das Spiel begint, zusätzlich gibt es ein Feld festzulegen, wieviele Minuten man sich vor dem Spiel trifft, default sind 90 Minuten. Ein Spiel hat immer auch einen "Gegner" Dieser kann aus einem Dropdown ausgewählt werden, oder falls die Gegnermanschaft noch nciht angelegt wurde durch ein Freifeld eingetragen werden, damit wird die Gegner-Manschaft als Gegner abgespeichert und man kann sie bei neuen Spielen finden.
|
||||
Nach dem Termin, kann ein Coach also Head oder Assistantcoach der Gliederung, die ergebnisse eintragen, und zwar pro inning. Ein Spiel besteht aus maximal 12 Innings. Wobei alle Innings nach dem dritten inning optional sind. Gespielte Spiele können nichtmehr übers Dashboard gelöscht werden. Einem Spiel wird immer eine Saison zugewiesen, diese Saison hat immer einen Namen der aus entwerder aus einem Einzelnen Jahr bei Saison ende vor Dezember oder mit zwei Jahren bei beendigung nach Januar des folgeJahres benamst. Sobald eine Saison von irgendeiner Gleiderung erstellt wurde kann diese von allen anderen Gliederungen genutzt werden. So würde eine Saison die im Feburar 2025 beginnt und im Dezember 2025 endet nur Saison 2025 heissen. Eine Saison die im Oktober 2025 beginnt und im März 2026 würde heissen "Saison 2025-2026".
|
||||
Sollte ein Spiel eine Woche vor Spielbegin nicht alle erfoderlichen 9 Spieler zugesagt haben, kann der Headcoach der Manschaft, das Spiel für ein weiteres Team öffnen, sofern die Manschaft mehr als nur ein Team hat, oder absagen.
|
||||
Beim öffnen des Spiels für ein anderes Team gilt:
|
||||
* Dieses Spiel wird im Dashboard als "unterstützer Spiel" herforgehoben.
|
||||
* Es kann nur zugesagt werden, wenn der Spieler bzw. das Elternteil nicht für ein Paralleltermin bereits zugesagt hat.
|
||||
* Das SPiel wird erst dann beim anderen Team angezeigt, wenn für ein potenziell Parallelstattfindenden Spiel alle benötigten Spieler zugesagt haben.
|
||||
* Ein Wechsel von einem zum anderen Spiel ist möglich sofern, dadurch nicht das eigene Spiel als unspielbar definiert wird.
|
||||
|
||||
Für einen Termin kann ein Spieler, oder Elternteil zu oder absagen. dabei wird festgehalten wann zu oder abgesagt wurde. Ein wechsel ist möglich aber dieses wird ebenfalls protokliert. Ein Elternteil kann für jedes Kind für den dieser Termin gilt, zu oder absagen. Ein Elternteil kann immer sehen für welchen Termin die eigenen Kinder zu oder abgesagt haben.
|
||||
|
||||
Spieler bzw. Elternteile können auch Kinder für einen Zeitraum pauschal abmelden, bspw. wegen Krankheit oder so. dafür ist es mögllich ein Zetifenster (begin und ende) im Dashboard anzugeben. Alle Termine in dieser Zeit werden dann für dieses Kind autotmaisch auf abgelehnt gestellt. Das vorzeitige beenden dieser abwesenheit ist jederzeit möglich. Sollten bereits Termine zugesagt worden sein, werden diese auf abgelehnt gestellt.
|
||||
|
||||
|
||||
Datum und Uhrzeit Angaben:
|
||||
Werden grundsätzlich in der Datenbank als UTC Zeit abgespeichert, im Frontend wird das entsprechende Datums und Uhrzeitformat der lokalen begebenheit angepasst. Per default ist dieses (Berlin mit entsprechenden suffix CET oder CEST) in Formularen wird der Suffix nicht benutzt und es wird entsprechend das Datum umgerechnet, also ein Datum nach Zeitumstellung erält immer den enprechenden+/- offset .
|
||||
|
||||
Ein Headcoach kann für seine Manschaft folgnede dinge zusätzlich festlegen: Default Anzahl der gespielten innings. Mindestanzahl der Spieler die für ein Spiel zugesagt haben. Diese Settings gelten enpsrechedn immer für Teams dieser Manschaft.
|
||||
|
||||
Das Backend:
|
||||
Es gibt 2 Login bereiche, eines welches normal zu den Dashboard führt hier können entsrechend termine erstellt, abgesagt usw. werden.
|
||||
Der login bereich der als Backend difiniert ist, ist der normale django admin bereich, hier haben nur der Clubverantwortliche und der superadmin zugriff.
|
||||
|
||||
Einstellungen der Coaches bspw. Mindestspielerzahl schlägt immer default einstellungen.
|
||||
Ein unterstützer Spiel wird zwar bei allen Spielern des unterstützerteams angezeigt, man kann da aber nur zusagen wenn man keinen paralleltermin zugesagt hat.
|
||||
Dabei gilt ein Paralleltermin ist ein Termin der zeitgleich mit einer tolleranz von +/-2h stattfindet. Ein Spiel dauert immer mindestens die Anzahl der Innings mal 20 minuten plus 1h anfahrt. Sollte ein spiel am gleichen tag für die unterstützermanschaft stattfinden kann der Coach explizieht ausschließen das man bei beiden spielen teilnehmen kann, aufgrund bspw. anfahrten usw.
|
||||
Der Standartwert für die mindestanzahl der Spieler sind immer 9 Spieler, es sei denn der Coach hat was anderes festgelegt, coach-settings schlagen immer default settings.
|
||||
Ein Spiel als SPielbar ist die mindestnazhal der Spieler + 2 Spieler definiert.
|
||||
|
||||
|
||||
22
manage.py
Executable file
22
manage.py
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python
|
||||
"""Django's command-line utility for administrative tasks."""
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
"""Run administrative tasks."""
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'baseball_organisator.settings')
|
||||
try:
|
||||
from django.core.management import execute_from_command_line
|
||||
except ImportError as exc:
|
||||
raise ImportError(
|
||||
"Couldn't import Django. Are you sure it's installed and "
|
||||
"available on your PYTHONPATH environment variable? Did you "
|
||||
"forget to activate a virtual environment?"
|
||||
) from exc
|
||||
execute_from_command_line(sys.argv)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Loading…
x
Reference in New Issue
Block a user