Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Django + Pytest CI

on:
push:
branches: ['**']
pull_request:
branches: ['**']

jobs:
test:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install ffmpeg
run: choco install ffmpeg -y

- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
working-directory: Merilife/MediBot/chatbot-website

- name: Run migrations
run: python manage.py migrate --noinput
working-directory: Merilife/MediBot/chatbot-website

- name: Run tests
run: pytest --maxfail=1 --disable-warnings -q
working-directory: Merilife/MediBot/chatbot-website
5 changes: 4 additions & 1 deletion Merilife/MediBot/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
!/media/test/.gitkeep
.pytest_cache/
.coverage
htmlcov/
htmlcov/
# Python byte‑code
__pycache__/
*.py[cod]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
22 changes: 19 additions & 3 deletions Merilife/MediBot/chatbot-website/chatbot/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
from chatbot.models import CustomUser, DoctorProfile, PatientProfile
from django.http import HttpResponseRedirect

# Add inline for DoctorProfile
class DoctorProfileInline(admin.StackedInline):
model = DoctorProfile
can_delete = False
verbose_name_plural = 'Doctor Profile'

class CustomUserAdmin(UserAdmin):
# Include DoctorProfile inline
inlines = [DoctorProfileInline]

fieldsets = (
(None, {'fields': ('uid', 'password')}),
('Personal Information', {'fields': ('full_name', 'email', 'phone')}),
Expand All @@ -22,11 +31,18 @@ class CustomUserAdmin(UserAdmin):
'fields': ('uid', 'password1', 'password2', 'full_name', 'is_staff'),
}),
)
list_display = ('uid', 'full_name', 'is_staff', 'specialization', 'date_joined')
list_filter = ('is_staff', 'is_active', 'specialization')
search_fields = ('uid', 'full_name', 'email', 'specialization')
list_display = ('uid', 'full_name', 'is_staff', 'get_specialization', 'date_joined')
list_filter = ('is_staff', 'is_active', 'doctor_profile__specialization')
search_fields = ('uid', 'full_name', 'email', 'doctor_profile__specialization')
ordering = ('uid',)

def get_specialization(self, obj):
# Display the specialization from the related DoctorProfile
if hasattr(obj, 'doctor_profile') and obj.doctor_profile:
return obj.doctor_profile.specialization
return ''
get_specialization.short_description = 'Specialization'

class CustomAdminSite(admin.AdminSite):
site_header = 'Medico Administration'
site_title = 'Medico Admin Portal'
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion Merilife/MediBot/chatbot-website/chatbot/static/images

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@

{% block content %}
<div id="content-main">
<!-- Load Manager Dashboard Button -->
<!-- Admin Action Buttons -->
<div style="margin-bottom: 20px; text-align: center;">
<a href="{% url 'load_dashboard' %}" class="button" style="display: inline-block; padding: 10px 20px; background-color: #79aec8; color: white; font-weight: bold; text-decoration: none; border-radius: 4px;">
<a href="{% url 'load_dashboard' %}" class="button" style="display: inline-block; padding: 10px 20px; background-color: #79aec8; color: white; font-weight: bold; text-decoration: none; border-radius: 4px; margin-right: 10px;">
Access Load Manager Dashboard
</a>

{% if request.user.is_superuser %}
<a href="{% url 'register_doctor' %}" class="button" style="display: inline-block; padding: 10px 20px; background-color: #9b59b6; color: white; font-weight: bold; text-decoration: none; border-radius: 4px;">
Register New Doctor
</a>
{% endif %}
</div>

{% if app_list %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>About Me - Medico</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
<style>
body { font-family: Arial, sans-serif; background: #f4f4f4; color: #333; margin: 0; padding: 0; }
.about-container { max-width: 800px; margin: 4rem auto; background: #fff; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); text-align: center; }
.about-container img { width: 200px; height: auto; border-radius: 50%; margin-bottom: 1.5rem; }
.about-container h2 { margin-bottom: 1rem; color: #9b59b6; }
.about-container p { text-align: left; line-height: 1.6; margin-bottom: 1rem; }
.nav-link { color: #9b59b6; }
</style>
</head>
<body>
<nav class="navbar navbar-light bg-light">
<div class="container">
<a class="navbar-brand" href="{% url 'index' %}"><i class="fas fa-heartbeat"></i> Medico</a>
<ul class="nav">
<li class="nav-item"><a class="nav-link" href="{% url 'index' %}">Home</a></li>
<li class="nav-item"><a class="nav-link active" href="{% url 'about' %}">About</a></li>
</ul>
</div>
</nav>
<div class="about-container">
<h2>About Me</h2>
<img src="{% static 'images/aditya.png' %}" alt="Aditya Upadhyay">
<p>My name is Aditya Upadhyay, a passionate and dedicated student currently pursuing my degree from IIIT Delhi. I have a strong foundation in computer science and an avid interest in software development, algorithms, and data structures. My coding skills span across languages like C, C++, Python, and I am comfortable working with tools like Git, NumPy, pandas, and Matplotlib.</p>
<p>I have successfully contributed to various academic and personal projects involving image processing, data analysis, and machine learning. I actively participate in hackathons, coding competitions, and have consistently ranked among top performers in programming contests. My accomplishments include completing internships, volunteering for NGOs, and making meaningful contributions to open-source projects.</p>
<p>I strive to continuously learn and grow, seeking opportunities where I can apply my skills to solve real-world problems.</p>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,13 @@
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
<ul class="navbar-nav align-items-center">
<li class="nav-item"><a class="nav-link" href="#features">Features</a></li>
<li class="nav-item"><a class="nav-link" href="#about">About</a></li>
<li class="nav-item"><a class="nav-link" href="{% url 'about' %}">About</a></li>
{% if user.is_authenticated %}
{% if is_doctor or user.is_staff and not user.is_superuser %}
<li class="nav-item"><a class="nav-link btn-dashboard" href="{% url 'doctor_dashboard' %}"><i class="fas fa-clinic-medical mr-1"></i>Dashboard</a></li>
{% elif user.is_superuser %}
<li class="nav-item"><a class="nav-link btn btn-sm btn-outline-primary" href="{% url 'admin:index' %}">Admin</a></li>
<li class="nav-item ml-2"><a class="nav-link btn btn-sm btn-outline-primary" href="{% url 'register_doctor' %}">Register Doctor</a></li>
{% else %}
<li class="nav-item"><a class="nav-link btn btn-sm btn-outline-primary" href="{% url 'chat' %}">Chat</a></li>
{% endif %}
Expand All @@ -191,16 +192,5 @@ <h2>Your Personal Health Companion</h2>
<button id="start-chat">Start Health Check</button>
</section>
</main>

<!-- Footer removed as requested -->

<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script>
document.getElementById('start-chat').addEventListener('click', ()=> {
window.location.href = "{% url 'chat' %}";
});
</script>
</body>
</html>
Loading
Loading