Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add registration #46

Merged
merged 10 commits into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ cython_debug/
# PyCharm
.idea/

# Static
static/

# Protected project files
/adaptive_hockey_federation/parser/Именная заявка/
resourses/


#Django static
static/
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ repos:
language: system
pass_filenames: false
entry: poetry export --without-hashes --output requirements/production.txt
files: ^(pyproject.toml|poetry.lock)$
files: ^(pyproject.toml|poetry.lock)$
38 changes: 33 additions & 5 deletions adaptive_hockey_federation/adaptive_hockey_federation/settings.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import os
from pathlib import Path

# import environ

BASE_DIR = Path(__file__).resolve().parent.parent

SECRET_KEY = 'django-insecure-))v)^p&_y!_-dsc7p)v%b@yi+#)k^34mp^ai8jc^9v)jpu2xn1'
# env = environ.Env(DEBUG=(bool, False))

# env.read_env(BASE_DIR / '.env')

# SECRET_KEY = env('SECRET_KEY')
SECRET_KEY = '12345678'

DEBUG = True

ALLOWED_HOSTS: list = ['*']
Expand Down Expand Up @@ -33,7 +41,8 @@

ROOT_URLCONF = 'adaptive_hockey_federation.urls'

TEMPLATES_DIR = os.path.join(BASE_DIR, 'templates')
TEMPLATES_DIR = BASE_DIR / 'templates'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
Expand All @@ -54,6 +63,7 @@

DATABASES = {
'default': {
# 'ENGINE': env('ENGINE'),
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
Expand Down Expand Up @@ -83,13 +93,31 @@
USE_TZ = True

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

STATICFILES_DIRS = BASE_DIR / 'staticfiles',

STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

STATIC_ROOT = BASE_DIR / 'static'

LOGIN_REDIRECT_URL = 'main:main'

EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'

EMAIL_FILE_PATH = BASE_DIR / 'sent_emails'

MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')

LOGIN_URL = 'users:login'

MEDIA_ROOT = BASE_DIR / 'media'

RESOURSES_ROOT = os.path.join(BASE_DIR, 'resourses')


DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

AUTH_USER_MODEL = 'users.User'
1 change: 1 addition & 0 deletions adaptive_hockey_federation/core/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@


class CoreConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'core'
8 changes: 8 additions & 0 deletions adaptive_hockey_federation/core/templatetags/user_filters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from django import template

register = template.Library()


@register.filter
def addclass(field, css):
return field.as_widget(attrs={'class': css})
Empty file.
4 changes: 2 additions & 2 deletions adaptive_hockey_federation/main/urls.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from django.urls import path

from . import views
from main import views

app_name = 'main'


urlpatterns = [
path('', views.main, name='main'),
path('users/', views.users, name='users'),
path('teams/<int:id>/', views.teams_id, name='teams_id'),
path('teams/', views.teams, name='teams'),
Expand Down
13 changes: 13 additions & 0 deletions adaptive_hockey_federation/main/views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from django.contrib.auth.decorators import login_required
from django.shortcuts import render

# пример рендера таблиц, удалить после реализации вьюх
Expand All @@ -14,29 +15,41 @@
}


@login_required
def main(request):
return render(request, 'main/main.html')


@login_required
def users(request):
return render(request, 'main/users.html')


@login_required
def teams_id(request, id):
return render(request, 'main/teams_id.html')


@login_required
def teams(request):
return render(request, 'main/teams.html', CONTEXT_EXAMPLE)


@login_required
def competitions_id(request, id):
return render(request, 'main/competitions_id.html')


@login_required
def competitions(request):
return render(request, 'main/competitions.html')


@login_required
def analytics(request):
return render(request, 'main/analitics.html')


@login_required
def unloads(request):
return render(request, 'main/unloads.html')
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
179 changes: 179 additions & 0 deletions adaptive_hockey_federation/static/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
html {
background-color: #ECF1F5;
}

.header {
background-color: #ECF1F5;
}
.header-line{
display:inline-flex;
align-items:center;
}

.header-logo {
margin: 73px 84px;
z-index: 999;
}

.header-ellipse {
margin-top : -130px;
position: absolute;
margin-left: 240px;
z-index: 997;

}

.header-rect {
align-self: center;
position: absolute;
margin-left: 450px;
margin-top: -50px;
z-index: 996;
}

.header-text {
color: #340061;
position: relative;
z-index: 999;
text-decoration: none;
font-family: 'Segoe UI';
width: 262px;
height: 159px;
font-size: 40px;
margin-left: -60px

}

.btns {
position: relative;
align-items: center;

}
.button_on {
background-color: #64C2D1;
color: #fff;
width: 240px;
height: 40px;
font-size: 22px;
text-align: center;
border-style: none;
}

.link-forget {
color: #E73259;
top: 40px;
position: absolute;
text-decoration: none;
left: 50px;

}

.button_out {
background-color: #E73259;
border-radius: 39px;
position: relative;
width: 240px;
height: 60px;
bottom: 50px;
font-size: 24px;
left: 80px;
border-color: #E73259;
.text {
color: #fff;
text-decoration: none;
}

}

.open-button {
background-color: #ECF1F5;
color: #E73259;
font-size: 15px;
font-weight: bold;
padding: 16px 20px;
border: none;
cursor: pointer;
opacity: 0.8;
position: relative;
bottom: 0px;
right: -30px;
width: 180px;
}

.form-popup {
position: fixed;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
display: none;
z-index: 999;
border-radius: 10px;
}

.form-container_reset {
width: 700px;
height: 400px;
padding: 10px;
background-image: url("img/forma.jpg");
justify-content: center;
text-align: center;

}

.form-container_reset input[type=text] {
width: 40%;
padding: 15px;
margin: 5px 0 22px 0;
border: none;
background: #f1f1f1;

}

.form-container_reset input[type=text]:focus {
background-color: #803e3e;
outline: none;
}
.form-container_reset .btn {
background-color: #64C2D1;
color: white;
padding: 16px 20px;
border: none;
cursor: pointer;
width: 30%;
margin-bottom:5px;
margin-top: 5px;
opacity: 0.8;
font-size: 15px;
font-weight: bold;
display: inline;


}


.reset_form_input {
margin: 0px;
}
.form-container_reset_reset .cancel {
background-color: #64C2D1;
}

.form-container_reset .btn:hover, .open-button:hover {
opacity: 4;
}


.form {
display: flex;
flex-direction: column;
flex-wrap: wrap;
max-height: 50px;
}


.text_inbox {
text-align: center;
}

Binary file added adaptive_hockey_federation/static/img/ellipse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added adaptive_hockey_federation/static/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions adaptive_hockey_federation/static/js/windows.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
function openForm() {
document.getElementById("myForm").style.display = "block";
}

function openRestoreForm() {
document.getElementById("myForm").style.display = "none";
document.getElementById("RestoreForm").style.display = "block";

}

function closeRestoreForm() {
document.getElementById("RestoreForm").style.display = "none";

}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading