├── appointment ├── __init__.py ├── migrations │ ├── __init__.py │ ├── 0003_auto_20200922_2140.py │ ├── 0002_auto_20200922_0329.py │ └── 0001_initial.py ├── tests.py ├── apps.py ├── management │ ├── commands │ │ ├── addCities.py │ │ └── addCounties.py │ └── jsonFilesForCommands │ │ ├── cities.json │ │ └── counties.json ├── templates │ └── appointment │ │ ├── sign_up.html │ │ ├── choose_city.html │ │ ├── choose_county.html │ │ ├── choose_hospital.html │ │ ├── choose_polyclinic.html │ │ ├── choose_doctor.html │ │ ├── make_an_appointment.html │ │ ├── login.html │ │ ├── profile.html │ │ └── blank.html ├── urls.py ├── static │ ├── css │ │ ├── sign-up.css │ │ ├── style.css │ │ ├── profil.css │ │ └── sign-in.css │ └── js │ │ └── sehirler.js ├── admin.py ├── views.py ├── models.py └── forms.py ├── requirements.txt ├── HospitalAppointmentSystem ├── __init__.py ├── urls.py ├── asgi.py ├── wsgi.py └── settings.py ├── .gitignore ├── presentation └── djangoHospitalAppointmentSystem.gif ├── manage.py └── README.md /appointment/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Django==3.1.1 -------------------------------------------------------------------------------- /HospitalAppointmentSystem/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /appointment/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /appointment/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *~ 3 | __pycache__ 4 | myvenv 5 | db.sqlite3 6 | /static 7 | .DS_Store 8 | todo.txt -------------------------------------------------------------------------------- /appointment/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppointmentConfig(AppConfig): 5 | name = 'appointment' 6 | -------------------------------------------------------------------------------- /presentation/djangoHospitalAppointmentSystem.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zumrudu-anka/django-hospital-appointment-system/HEAD/presentation/djangoHospitalAppointmentSystem.gif -------------------------------------------------------------------------------- /HospitalAppointmentSystem/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path, include 3 | 4 | urlpatterns = [ 5 | path('admin/', admin.site.urls), 6 | path('',include('appointment.urls')), 7 | ] -------------------------------------------------------------------------------- /appointment/management/commands/addCities.py: -------------------------------------------------------------------------------- 1 | from django.core.management.base import BaseCommand 2 | from appointment.models import City 3 | import json 4 | 5 | class Command(BaseCommand): 6 | def handle(self,*args,**kwargs): 7 | with open('appointment/management/jsonFilesForCommands/cities.json',encoding='utf-8') as citiesFile: 8 | citiesJson=json.load(citiesFile) 9 | for key, value in citiesJson.items(): 10 | City.objects.get_or_create( 11 | pk = key, 12 | name = value 13 | ) -------------------------------------------------------------------------------- /HospitalAppointmentSystem/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for HospitalAppointmentSystem 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.1/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', 'HospitalAppointmentSystem.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /HospitalAppointmentSystem/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for HospitalAppointmentSystem 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.1/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', 'HospitalAppointmentSystem.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /appointment/management/commands/addCounties.py: -------------------------------------------------------------------------------- 1 | from django.core.management.base import BaseCommand 2 | from appointment.models import City, County 3 | import json 4 | 5 | class Command(BaseCommand): 6 | def handle(self,*args,**kwargs): 7 | with open('appointment/management/jsonFilesForCommands/counties.json') as countiesFile: 8 | countiesJson=json.load(countiesFile) 9 | for cityPk, counties in countiesJson.items(): 10 | city = City.objects.get(pk = cityPk) 11 | for county in counties: 12 | County.objects.get_or_create( 13 | city = city, 14 | name = county["name"] 15 | ) -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'HospitalAppointmentSystem.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /appointment/migrations/0003_auto_20200922_2140.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-09-22 18:40 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('appointment', '0002_auto_20200922_0329'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='doctor', 15 | name='identification_number', 16 | field=models.CharField(max_length=11, primary_key=True, serialize=False), 17 | ), 18 | migrations.AlterField( 19 | model_name='patient', 20 | name='identification_number', 21 | field=models.CharField(max_length=11, primary_key=True, serialize=False), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /appointment/templates/appointment/sign_up.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 |
4 | 5 |