-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ddce8c4
Showing
79 changed files
with
4,807 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Django # | ||
*.log | ||
*.pot | ||
*.pyc | ||
__pycache__ | ||
db.sqlite3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 sumit kumar | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Online Quiz | ||
![developer](https://img.shields.io/badge/Developed%20By%20%3A-Sumit%20Kumar-red) | ||
--- | ||
## screenshots | ||
### Homepage | ||
![homepage snap](https://github.com/sumitkumar1503/onlinequiz/blob/master/static/screenshots/homepage.png?raw=true) | ||
### Admin Dashboard | ||
![dashboard snap](https://github.com/sumitkumar1503/onlinequiz/blob/master/static/screenshots/adminhomepage.png?raw=true) | ||
### Exam Rules | ||
![invoice snap](https://github.com/sumitkumar1503/onlinequiz/blob/master/static/screenshots/rules.png?raw=true) | ||
### Exam | ||
![doctor snap](https://github.com/sumitkumar1503/onlinequiz/blob/master/static/screenshots/exam.png?raw=true) | ||
### Teacher | ||
![doctor snap](https://github.com/sumitkumar1503/onlinequiz/blob/master/static/screenshots/teacher.png?raw=true) | ||
--- | ||
## Functions | ||
### Admin | ||
- Create Admin account using command | ||
``` | ||
py manage.py createsuperuser | ||
``` | ||
- After Login, can see Total Number Of Student, Teacher, Course, Questions are there in system on Dashboard. | ||
- Can View, Update, Delete, Approve Teacher. | ||
- Can View, Update, Delete Student. | ||
- Can Also See Student Marks. | ||
- Can Add, View, Delete Course/Exams. | ||
- Can Add Questions To Respective Courses With Options, Correct Answer, And Marks. | ||
- Can View And Delete Questions Too. | ||
|
||
### Teacher | ||
- Apply for job in System. Then Login (Approval required by system admin, Then only teacher can login). | ||
- After Login, can see Total Number Of Student, Course, Questions are there in system on Dashboard. | ||
- Can Add, View, Delete Course/Exams. | ||
- Can Add Questions To Respective Courses With Options, Correct Answer, And Marks. | ||
- Can View And Delete Questions Too. | ||
> **_NOTE:_** Basically Admin Will Hire Teachers To Manage Courses and Questions. | ||
### Student | ||
- Create account (No Approval Required By Admin, Can Login After Signup) | ||
- After Login, Can See How Many Courses/Exam And Questions Are There In System On Dashboard. | ||
- Can Give Exam Any Time, There Is No Limit On Number Of Attempt. | ||
- Can View Marks Of Each Attempt Of Each Exam. | ||
- Question Pattern Is MCQ With 4 Options And 1 Correct Answer. | ||
--- | ||
|
||
## HOW TO RUN THIS PROJECT | ||
- Install Python(3.7.6) (Dont Forget to Tick Add to Path while installing Python) | ||
- Open Terminal and Execute Following Commands : | ||
``` | ||
python -m pip install -r requirements. txt | ||
``` | ||
- Download This Project Zip Folder and Extract it | ||
- Move to project folder in Terminal. Then run following Commands : | ||
``` | ||
py manage.py makemigrations | ||
py manage.py migrate | ||
py manage.py runserver | ||
``` | ||
- Now enter following URL in Your Browser Installed On Your Pc | ||
``` | ||
http://127.0.0.1:8000/ | ||
``` | ||
|
||
## CHANGES REQUIRED FOR CONTACT US PAGE | ||
- In settins.py file, You have to give your email and password | ||
``` | ||
EMAIL_HOST_USER = '[email protected]' | ||
EMAIL_HOST_PASSWORD = 'your email password' | ||
EMAIL_RECEIVING_USER = '[email protected]' | ||
``` | ||
|
||
## Drawbacks/LoopHoles | ||
- Admin/Teacher can add any number of questions to any course, But while adding course, admin provide question number. | ||
|
||
|
||
## Feedback | ||
Any suggestion and feedback is welcome. You can message me on facebook | ||
- [Contact on Facebook](https://fb.com/sumit.luv) | ||
- [Subscribe my Channel LazyCoder On Youtube](https://youtube.com/lazycoders) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class BloodConfig(AppConfig): | ||
name = 'blood' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from django import forms | ||
|
||
from . import models | ||
|
||
|
||
class BloodForm(forms.ModelForm): | ||
class Meta: | ||
model=models.Stock | ||
fields=['bloodgroup','unit'] | ||
|
||
class RequestForm(forms.ModelForm): | ||
class Meta: | ||
model=models.BloodRequest | ||
fields=['patient_name','patient_age','reason','bloodgroup','unit'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Generated by Django 3.0.5 on 2021-01-17 13:08 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Stock', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('bloodgroup', models.CharField(max_length=10)), | ||
('unit', models.PositiveIntegerField(default=0)), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 3.0.5 on 2021-01-18 16:17 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('blood', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='BloodRequest', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=30)), | ||
('age', models.PositiveIntegerField()), | ||
('mobile', models.CharField(max_length=20)), | ||
('disease', models.CharField(max_length=100)), | ||
('reason', models.CharField(max_length=500)), | ||
('bloodgroup', models.CharField(max_length=10)), | ||
('unit', models.PositiveIntegerField(default=0)), | ||
('status', models.CharField(default='Pending', max_length=20)), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Generated by Django 3.0.5 on 2021-02-13 05:23 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('patient', '0001_initial'), | ||
('donor', '0001_initial'), | ||
('blood', '0002_bloodrequest'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='bloodrequest', | ||
old_name='age', | ||
new_name='patient_age', | ||
), | ||
migrations.RenameField( | ||
model_name='bloodrequest', | ||
old_name='name', | ||
new_name='patient_name', | ||
), | ||
migrations.RemoveField( | ||
model_name='bloodrequest', | ||
name='disease', | ||
), | ||
migrations.RemoveField( | ||
model_name='bloodrequest', | ||
name='mobile', | ||
), | ||
migrations.AddField( | ||
model_name='bloodrequest', | ||
name='request_by_donor', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='donor.Donor'), | ||
), | ||
migrations.AddField( | ||
model_name='bloodrequest', | ||
name='request_by_patient', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='patient.Patient'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.0.5 on 2021-02-13 06:24 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('blood', '0003_auto_20210213_1053'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='bloodrequest', | ||
name='date', | ||
field=models.DateField(auto_now=True), | ||
), | ||
] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from django.db import models | ||
from patient import models as pmodels | ||
from donor import models as dmodels | ||
class Stock(models.Model): | ||
bloodgroup=models.CharField(max_length=10) | ||
unit=models.PositiveIntegerField(default=0) | ||
def __str__(self): | ||
return self.bloodgroup | ||
|
||
class BloodRequest(models.Model): | ||
request_by_patient=models.ForeignKey(pmodels.Patient,null=True,on_delete=models.CASCADE) | ||
request_by_donor=models.ForeignKey(dmodels.Donor,null=True,on_delete=models.CASCADE) | ||
patient_name=models.CharField(max_length=30) | ||
patient_age=models.PositiveIntegerField() | ||
reason=models.CharField(max_length=500) | ||
bloodgroup=models.CharField(max_length=10) | ||
unit=models.PositiveIntegerField(default=0) | ||
status=models.CharField(max_length=20,default="Pending") | ||
date=models.DateField(auto_now=True) | ||
def __str__(self): | ||
return self.bloodgroup | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
Oops, something went wrong.