Skip to content

Commit dc27508

Browse files
author
MaheshU Sawant
committed
Added source code
1 parent e29509a commit dc27508

File tree

268 files changed

+51092
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

268 files changed

+51092
-0
lines changed

Database/gymnasium.sql

Lines changed: 599 additions & 0 deletions
Large diffs are not rendered by default.

Gymnasium/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#init
170 Bytes
Binary file not shown.
2.75 KB
Binary file not shown.
1.3 KB
Binary file not shown.
675 Bytes
Binary file not shown.

Gymnasium/settings.py

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
"""
2+
Django settings for Gymnasium project.
3+
4+
Generated by 'django-admin startproject' using Django 2.2.7.
5+
6+
For more information on this file, see
7+
https://docs.djangoproject.com/en/2.2/topics/settings/
8+
9+
For the full list of settings and their values, see
10+
https://docs.djangoproject.com/en/2.2/ref/settings/
11+
"""
12+
13+
import os
14+
15+
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16+
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17+
18+
19+
# Quick-start development settings - unsuitable for production
20+
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
21+
22+
# SECURITY WARNING: keep the secret key used in production secret!
23+
SECRET_KEY = 'tu506hz30)7bae2f8-bn!)njkilw_=w7=b5#uqvtfwp2xkjlrv'
24+
25+
# SECURITY WARNING: don't run with debug turned on in production!
26+
DEBUG = True
27+
28+
ALLOWED_HOSTS = []
29+
30+
# After succesful login go to path:
31+
LOGIN_REDIRECT_URL = '/'
32+
# After Logout
33+
LOGOUT_REDIRECT_URL = '/'
34+
35+
# Application definition
36+
37+
INSTALLED_APPS = [
38+
'django.contrib.admin',
39+
'django.contrib.auth',
40+
'django.contrib.contenttypes',
41+
'django.contrib.sessions',
42+
'django.contrib.messages',
43+
'django.contrib.staticfiles',
44+
'accounts',
45+
'members',
46+
'notifications',
47+
'reports',
48+
'payments',
49+
]
50+
51+
MIDDLEWARE = [
52+
'django.middleware.security.SecurityMiddleware',
53+
'django.contrib.sessions.middleware.SessionMiddleware',
54+
'django.middleware.common.CommonMiddleware',
55+
'django.middleware.csrf.CsrfViewMiddleware',
56+
'django.contrib.auth.middleware.AuthenticationMiddleware',
57+
'django.contrib.messages.middleware.MessageMiddleware',
58+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
59+
]
60+
61+
ROOT_URLCONF = 'Gymnasium.urls'
62+
63+
TEMPLATES = [
64+
{
65+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
66+
'DIRS': [os.path.join(BASE_DIR, 'templates')],
67+
'APP_DIRS': True,
68+
'OPTIONS': {
69+
'context_processors': [
70+
'django.template.context_processors.debug',
71+
'django.template.context_processors.request',
72+
'django.contrib.auth.context_processors.auth',
73+
'django.contrib.messages.context_processors.messages',
74+
],
75+
},
76+
},
77+
]
78+
79+
WSGI_APPLICATION = 'Gymnasium.wsgi.application'
80+
81+
82+
# Database
83+
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
84+
85+
DATABASES = {
86+
'default': {
87+
'ENGINE': 'django.db.backends.mysql',
88+
'NAME': 'Gymnasium',
89+
'USER': 'root',
90+
'PASSWORD': '',
91+
'HOST': '',
92+
'PORT': '',
93+
'OPTIONS': {
94+
'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"
95+
}
96+
}
97+
}
98+
99+
100+
# Password validation
101+
# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
102+
103+
AUTH_PASSWORD_VALIDATORS = [
104+
{
105+
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
106+
},
107+
{
108+
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
109+
},
110+
{
111+
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
112+
},
113+
{
114+
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
115+
},
116+
]
117+
118+
119+
# Internationalization
120+
# https://docs.djangoproject.com/en/2.2/topics/i18n/
121+
122+
LANGUAGE_CODE = 'en-us'
123+
124+
TIME_ZONE = 'UTC'
125+
126+
USE_I18N = True
127+
128+
USE_L10N = True
129+
130+
USE_TZ = True
131+
132+
133+
# Static files (CSS, JavaScript, Images)
134+
# https://docs.djangoproject.com/en/2.2/howto/static-files/
135+
136+
STATIC_URL = '/static/'
137+
138+
STATICFILES_DIRS = [
139+
os.path.join(BASE_DIR, 'static'),
140+
]
141+
142+
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
143+
144+
MEDIA_URL = '/media/'
145+
146+
WALLPAPER_FILES = os.path.normpath(MEDIA_ROOT+'/wallpaper')
147+
WALLPAPER_URL = os.path.normpath(MEDIA_URL+'/wallpaper/')
148+
149+
PHOTOS_FILES = os.path.normpath(MEDIA_ROOT+'/photos')
150+
PHOTOS_URL = os.path.normpath(MEDIA_URL+'/photos/')

Gymnasium/urls.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
"""Gymnasium URL Configuration
2+
3+
The `urlpatterns` list routes URLs to views. For more information please see:
4+
https://docs.djangoproject.com/en/2.2/topics/http/urls/
5+
Examples:
6+
Function views
7+
1. Add an import: from my_app import views
8+
2. Add a URL to urlpatterns: path('', views.home, name='home')
9+
Class-based views
10+
1. Add an import: from other_app.views import Home
11+
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
12+
Including another URLconf
13+
1. Import the include() function: from django.urls import include, path
14+
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
15+
"""
16+
from django.contrib import admin
17+
from django.urls import path, include
18+
from django.conf import settings
19+
from django.conf.urls.static import static
20+
21+
urlpatterns = [
22+
path('admin/', admin.site.urls),
23+
path('accounts/', include('django.contrib.auth.urls')),
24+
path('members/', include('members.urls')),
25+
path('notifications/', include('notifications.urls')),
26+
path('reports/', include('reports.urls')),
27+
path('', include('accounts.urls'))
28+
]
29+
30+
# for handling profile photos
31+
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

Gymnasium/wsgi.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""
2+
WSGI config for Gymnasium project.
3+
4+
It exposes the WSGI callable as a module-level variable named ``application``.
5+
6+
For more information on this file, see
7+
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
8+
"""
9+
10+
import os
11+
12+
from django.core.wsgi import get_wsgi_application
13+
14+
from notifications.config import get_notification_count, run_notifier
15+
run_notifier()
16+
17+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Gymnasium.settings')
18+
19+
application = get_wsgi_application()

User Guide.pdf

609 KB
Binary file not shown.

0 commit comments

Comments
 (0)