Skip to content

Commit 40386c6

Browse files
Hospital commit
0 parents  commit 40386c6

Some content is hidden

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

66 files changed

+25419
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.pyc
2+
3+
.idea
4+
__pycache__/

Hospital_Management/__init__.py

Whitespace-only changes.

Hospital_Management/asgi.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
ASGI config for Hospital_Management project.
3+
4+
It exposes the ASGI callable as a module-level variable named ``application``.
5+
6+
For more information on this file, see
7+
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
8+
"""
9+
10+
import os
11+
12+
from django.core.asgi import get_asgi_application
13+
14+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Hospital_Management.settings')
15+
16+
application = get_asgi_application()

Hospital_Management/settings.py

+121
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
"""
2+
Django settings for Hospital_Management project.
3+
4+
Generated by 'django-admin startproject' using Django 3.0.5.
5+
6+
For more information on this file, see
7+
https://docs.djangoproject.com/en/3.0/topics/settings/
8+
9+
For the full list of settings and their values, see
10+
https://docs.djangoproject.com/en/3.0/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+
# Quick-start development settings - unsuitable for production
19+
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
20+
21+
# SECURITY WARNING: keep the secret key used in production secret!
22+
SECRET_KEY = 'h97=)lhyc$rjg(j#-@rzfxq3sgpi*oj++65!41rxjz)sgemy2e'
23+
24+
# SECURITY WARNING: don't run with debug turned on in production!
25+
DEBUG = True
26+
27+
ALLOWED_HOSTS = []
28+
29+
# Application definition
30+
31+
INSTALLED_APPS = [
32+
'django.contrib.admin',
33+
'django.contrib.auth',
34+
'django.contrib.contenttypes',
35+
'django.contrib.sessions',
36+
'django.contrib.messages',
37+
'appointments.apps.AppointmentsConfig',
38+
'home.apps.HomeConfig',
39+
'accounts.apps.AccountsConfig',
40+
'mathfilters',
41+
'django.contrib.staticfiles',
42+
]
43+
44+
MIDDLEWARE = [
45+
'django.middleware.security.SecurityMiddleware',
46+
'django.contrib.sessions.middleware.SessionMiddleware',
47+
'django.middleware.common.CommonMiddleware',
48+
'django.middleware.csrf.CsrfViewMiddleware',
49+
'django.contrib.auth.middleware.AuthenticationMiddleware',
50+
'django.contrib.messages.middleware.MessageMiddleware',
51+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
52+
]
53+
54+
ROOT_URLCONF = 'Hospital_Management.urls'
55+
56+
TEMPLATES = [
57+
{
58+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
59+
'DIRS': [],
60+
'APP_DIRS': True,
61+
'OPTIONS': {
62+
'context_processors': [
63+
'django.template.context_processors.debug',
64+
'django.template.context_processors.request',
65+
'django.contrib.auth.context_processors.auth',
66+
'django.contrib.messages.context_processors.messages',
67+
],
68+
},
69+
},
70+
]
71+
72+
WSGI_APPLICATION = 'Hospital_Management.wsgi.application'
73+
74+
# Database
75+
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
76+
77+
DATABASES = {
78+
'default': {
79+
'ENGINE': 'django.db.backends.sqlite3',
80+
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
81+
}
82+
}
83+
84+
# Password validation
85+
# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
86+
87+
AUTH_PASSWORD_VALIDATORS = [
88+
{
89+
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
90+
},
91+
{
92+
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
93+
},
94+
{
95+
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
96+
},
97+
{
98+
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
99+
},
100+
]
101+
102+
# Internationalization
103+
# https://docs.djangoproject.com/en/3.0/topics/i18n/
104+
105+
LANGUAGE_CODE = 'en-us'
106+
107+
TIME_ZONE = 'UTC'
108+
109+
USE_I18N = True
110+
111+
USE_L10N = True
112+
113+
USE_TZ = True
114+
115+
# Static files (CSS, JavaScript, Images)
116+
# https://docs.djangoproject.com/en/3.0/howto/static-files/
117+
118+
STATIC_URL = '/static/'
119+
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
120+
121+
MEDIA_URL = '/media/'

Hospital_Management/urls.py

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"""Hospital_Management URL Configuration
2+
3+
The `urlpatterns` list routes URLs to views. For more information please see:
4+
https://docs.djangoproject.com/en/3.0/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('accounts.urls')),
24+
path('appointments/', include('appointments.urls')),
25+
path('', include('home.urls')),
26+
]
27+
28+
if settings.DEBUG:
29+
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

Hospital_Management/wsgi.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
WSGI config for Hospital_Management 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/3.0/howto/deployment/wsgi/
8+
"""
9+
10+
import os
11+
12+
from django.core.wsgi import get_wsgi_application
13+
14+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Hospital_Management.settings')
15+
16+
application = get_wsgi_application()

accounts/__init__.py

Whitespace-only changes.

accounts/admin.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from django.contrib import admin
2+
from accounts.models import Patient,Doctor
3+
4+
admin.site.register(Patient)
5+
admin.site.register(Doctor)

accounts/apps.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from django.apps import AppConfig
2+
3+
4+
class AccountsConfig(AppConfig):
5+
name = 'accounts'

accounts/migrations/0001_initial.py

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Generated by Django 3.0.5 on 2020-05-23 10:28
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
initial = True
9+
10+
dependencies = [
11+
]
12+
13+
operations = [
14+
migrations.CreateModel(
15+
name='Patient',
16+
fields=[
17+
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
18+
('phone', models.CharField(max_length=10)),
19+
('age', models.CharField(max_length=10)),
20+
('address', models.CharField(max_length=100)),
21+
('bloodgroup', models.CharField(max_length=10)),
22+
('casepaper', models.CharField(max_length=10)),
23+
('image', models.ImageField(default='default.jpg', upload_to='med_report')),
24+
],
25+
),
26+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Generated by Django 3.0.5 on 2020-05-23 11:09
2+
3+
from django.conf import settings
4+
from django.db import migrations, models
5+
import django.db.models.deletion
6+
7+
8+
class Migration(migrations.Migration):
9+
10+
dependencies = [
11+
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
12+
('accounts', '0001_initial'),
13+
]
14+
15+
operations = [
16+
migrations.RemoveField(
17+
model_name='patient',
18+
name='id',
19+
),
20+
migrations.AddField(
21+
model_name='patient',
22+
name='gender',
23+
field=models.CharField(default='Male', max_length=10),
24+
preserve_default=False,
25+
),
26+
migrations.AddField(
27+
model_name='patient',
28+
name='otp',
29+
field=models.CharField(default=None, max_length=6),
30+
preserve_default=False,
31+
),
32+
migrations.AddField(
33+
model_name='patient',
34+
name='pid',
35+
field=models.AutoField(default=None, primary_key=True, serialize=False),
36+
preserve_default=False,
37+
),
38+
migrations.AddField(
39+
model_name='patient',
40+
name='user',
41+
field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
42+
preserve_default=False,
43+
),
44+
migrations.AddField(
45+
model_name='patient',
46+
name='verify',
47+
field=models.CharField(default=0, max_length=1),
48+
),
49+
migrations.AlterField(
50+
model_name='patient',
51+
name='age',
52+
field=models.CharField(max_length=3),
53+
),
54+
migrations.CreateModel(
55+
name='Doctor',
56+
fields=[
57+
('did', models.AutoField(primary_key=True, serialize=False)),
58+
('phone', models.CharField(max_length=10)),
59+
('age', models.CharField(max_length=3)),
60+
('gender', models.CharField(max_length=10)),
61+
('Department', models.CharField(max_length=20)),
62+
('attendance', models.CharField(max_length=10)),
63+
('salary', models.CharField(max_length=10)),
64+
('otp', models.CharField(max_length=6)),
65+
('verify', models.CharField(default=0, max_length=1)),
66+
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
67+
],
68+
),
69+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 3.0.5 on 2020-05-23 11:20
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('accounts', '0002_auto_20200523_1639'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='patient',
15+
name='verify',
16+
field=models.CharField(default=1, max_length=1),
17+
),
18+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 3.0.5 on 2020-05-23 11:20
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('accounts', '0003_auto_20200523_1650'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='patient',
15+
name='verify',
16+
field=models.CharField(default=0, max_length=1),
17+
),
18+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 3.0.5 on 2020-05-23 11:25
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('accounts', '0004_auto_20200523_1650'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='doctor',
15+
name='verify',
16+
field=models.CharField(default=1, max_length=1),
17+
),
18+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 3.0.5 on 2020-05-23 11:25
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('accounts', '0005_auto_20200523_1655'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='doctor',
15+
name='verify',
16+
field=models.CharField(default=0, max_length=1),
17+
),
18+
]
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Generated by Django 3.0.5 on 2020-05-24 04:46
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('accounts', '0006_auto_20200523_1655'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='doctor',
15+
name='status',
16+
field=models.CharField(default='ACTIVE', max_length=15),
17+
preserve_default=False,
18+
),
19+
]

accounts/migrations/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)