Skip to content

Commit

Permalink
Merge branch 'dev' into docker/docker_compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Raidzin authored Nov 4, 2023
2 parents e519fc9 + 0173423 commit cce3bbf
Show file tree
Hide file tree
Showing 16 changed files with 862 additions and 34 deletions.
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,8 @@ dmypy.json
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/

# Static
static/

/static
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ COPY --from=builder /app /app
COPY adaptive_hockey_federation/ ./
ENTRYPOINT ["/entrypoint.sh"]

CMD ["/app/.venv/bin/gunicorn", "adaptive_hockey_federation.wsgi:application", "--bind", "0:8000" ]
CMD ["/app/.venv/bin/gunicorn", "adaptive_hockey_federation.wsgi:application", "--bind", "0:8000" ]
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@

ROOT_URLCONF = 'adaptive_hockey_federation.urls'

TEMPLATES_DIR = os.path.join(BASE_DIR, 'templates')
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [TEMPLATES_DIR],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
Expand Down Expand Up @@ -83,6 +84,7 @@

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'),)

MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
Expand Down
Empty file.
23 changes: 23 additions & 0 deletions adaptive_hockey_federation/core/user_card.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from dataclasses import dataclass
from datetime import date
from typing import Optional


@dataclass
class BaseUserInfo:
"""Основной класс с обязательными полями.
"""
name: str
surname: str
patronymic: str
date_of_birth: date
team: str
player_number: int
position: str


@dataclass
class HockeyData(BaseUserInfo):
"""Класс с необязательными полями из документов формата docx.
"""
numeric_status: Optional[int] = None
2 changes: 1 addition & 1 deletion adaptive_hockey_federation/main/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


urlpatterns = [
path('users', views.users, name='users'),
path('users/', views.users, name='users'),
path('teams/<int:id>/', views.teams_id, name='teams_id'),
path('teams/', views.teams, name='teams'),
path(
Expand Down
Empty file.
Loading

0 comments on commit cce3bbf

Please sign in to comment.