Skip to main content

Posts

4. Creating first template with navigation bar

1. For creating templates just create new folder called ' templates' in your project, where we will save all html templates 2. Now go in settings folder and in templates section, add name ' templates'  in DIRS like shown in fig., 3. Create new html page file in templates folder name as ' navbar.html'   & ' 'home.html'   which will use for creating navigation bar in all our templates. 4.       In navbar.html, navigation bar for our website which will be created using bootstrap. {% load static %} Hospital management system In home.html,  Homepage code should be like,      {% extends 'navbar.html' %} {% load static %} {% block body %} Multispecialist Hospital Choose Your Hospital Like Your Life Depends on It {% endblock %} 5.Now create urls.py file in your ' hospital'  (App Name) folder      6. In ...

3. Creating App in Django

1.  Before creating app you should be in virtual environment. I assume that you have already installed django in your virtual environment.  Command for working on virtual environment is, workon test (test is name of virtual environment) 2.  For creating app just type a command     django-admin startapp hospital 3. Now you can see that new folder is created in your django folder with name 'hospital'. 4. and in this way your new app is  created. 5. The new app created have following files, 6. In this folder we will develop our hospital management system. 7. Now to know django that you have created app, you must do some changes in settings.py file. for that just go in installed app in settings.py file 8. and there just add your app name like following,

2. Let's start project

1. Open cmd 2. Then go to the folder where you want to save your project like this, 3. After that just type command to start django project, django-admin startproject <name_of_project> As I have given project name as hospital_managemet_system hence my command is like as shown in above image. After pressing enter you will see hospital_management_system project folder is created at that location. 4. After opening this folder you will see one folder name as hospital_management_system and a file name called manage.py And inside hospital_management_system folder there are four files named __init__.py, settings.py, urls.py and wsgi.py 5. Here setup for django project is completed.

1. Hospital Management System

In this tutorial we will learn how to build django project on Hospital Management System. Project will contain, 1) Admin 2) Receptionist 1) Admin can,      1. Add doctors      2. Delete doctors      3. Manage Salary of doctors      4. Also can see Patients      5. See appointments 2) Receptionist can,      1. Add Patient      2. Delete Patient      3. View Patient      4. Delete Patient      5. Add appointment      6. View appointment      7. Delete appointment Click here to see demo.... Software used:  Django 3.0.5 python 3.7 IDE used - VS Database - sqlite (no need to any other installation as it exist in django already) Javascirpt Bootstrap