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

Comment on lines +31 to +34
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI workflow runs manage.py migrate but the project settings use MySQL by default. Since this workflow doesn't provision MySQL (or set env vars to switch to sqlite), this step is very likely to fail. Consider configuring a DB service (MySQL) + secrets, or switching CI to sqlite/test settings and letting pytest-django manage migrations/db setup (often you can drop the explicit migrate step).

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

Copilot uses AI. Check for mistakes.
- 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]
Comment on lines +7 to +9
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This .gitignore update is good, but the PR still includes many tracked __pycache__/ and *.pyc files. Those artifacts shouldn't be committed—please remove them from the repository (git rm --cached), so the ignore rules can take effect and the repo stays clean.

Copilot uses AI. Check for mistakes.
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>
Comment on lines +29 to +33
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The About page references static 'images/aditya.png', but the static image added in this PR is images/adi.png. This will result in a broken image link. Update the template to match the actual filename (or rename the asset to aditya.png).

Copilot uses AI. Check for mistakes.
<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/bootstrap@4.5.2/dist/js/bootstrap.bundle.min.js"></script>
<script>
document.getElementById('start-chat').addEventListener('click', ()=> {
window.location.href = "{% url 'chat' %}";
});
</script>
</body>
</html>
Loading
Loading