S
This commit is contained in:
parent
cd8435be71
commit
dc11d7b412
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +1,14 @@
|
||||
from django.contrib import admin
|
||||
from .models import Hospital, DepartmentChief
|
||||
|
||||
# Register your models here.
|
||||
@admin.register(Hospital)
|
||||
class HospitalAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'state', 'city')
|
||||
list_filter = ('state',)
|
||||
search_fields = ('name', 'city')
|
||||
|
||||
@admin.register(DepartmentChief)
|
||||
class DepartmentChiefAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'department', 'hospital', 'email')
|
||||
list_filter = ('department', 'hospital__state')
|
||||
search_fields = ('name', 'email', 'hospital__name')
|
||||
40
core/migrations/0001_initial.py
Normal file
40
core/migrations/0001_initial.py
Normal file
@ -0,0 +1,40 @@
|
||||
# Generated by Django 5.2.7 on 2026-01-28 14:27
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Hospital',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=255)),
|
||||
('state', models.CharField(choices=[('BW', 'Baden-Württemberg'), ('BY', 'Bayern'), ('BE', 'Berlin'), ('BB', 'Brandenburg'), ('HB', 'Bremen'), ('HH', 'Hamburg'), ('HE', 'Hessen'), ('MV', 'Mecklenburg-Vorpommern'), ('NI', 'Niedersachsen'), ('NW', 'Nordrhein-Westfalen'), ('RP', 'Rheinland-Pfalz'), ('SL', 'Saarland'), ('SN', 'Sachsen'), ('ST', 'Sachsen-Anhalt'), ('SH', 'Schleswig-Holstein'), ('TH', 'Thüringen')], max_length=2)),
|
||||
('city', models.CharField(max_length=100)),
|
||||
('address', models.TextField(blank=True)),
|
||||
('website', models.URLField(blank=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'Hospitals',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='DepartmentChief',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=255)),
|
||||
('title', models.CharField(help_text='e.g. Chief of Medicine, Head Nurse', max_length=100)),
|
||||
('department', models.CharField(choices=[('AN', 'Anesthesia'), ('NU', 'Nursing'), ('IC', 'Intensive Care'), ('SU', 'Surgery'), ('IM', 'Internal Medicine'), ('PE', 'Pediatrics'), ('GY', 'Gynecology'), ('OT', 'Other')], max_length=2)),
|
||||
('email', models.EmailField(max_length=254)),
|
||||
('hospital', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chiefs', to='core.hospital')),
|
||||
],
|
||||
),
|
||||
]
|
||||
BIN
core/migrations/__pycache__/0001_initial.cpython-311.pyc
Normal file
BIN
core/migrations/__pycache__/0001_initial.cpython-311.pyc
Normal file
Binary file not shown.
@ -1,3 +1,54 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
class Hospital(models.Model):
|
||||
STATES_CHOICES = [
|
||||
('BW', 'Baden-Württemberg'),
|
||||
('BY', 'Bayern'),
|
||||
('BE', 'Berlin'),
|
||||
('BB', 'Brandenburg'),
|
||||
('HB', 'Bremen'),
|
||||
('HH', 'Hamburg'),
|
||||
('HE', 'Hessen'),
|
||||
('MV', 'Mecklenburg-Vorpommern'),
|
||||
('NI', 'Niedersachsen'),
|
||||
('NW', 'Nordrhein-Westfalen'),
|
||||
('RP', 'Rheinland-Pfalz'),
|
||||
('SL', 'Saarland'),
|
||||
('SN', 'Sachsen'),
|
||||
('ST', 'Sachsen-Anhalt'),
|
||||
('SH', 'Schleswig-Holstein'),
|
||||
('TH', 'Thüringen'),
|
||||
]
|
||||
|
||||
name = models.CharField(max_length=255)
|
||||
state = models.CharField(max_length=2, choices=STATES_CHOICES)
|
||||
city = models.CharField(max_length=100)
|
||||
address = models.TextField(blank=True)
|
||||
website = models.URLField(blank=True)
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.name} ({self.get_state_display()})"
|
||||
|
||||
class Meta:
|
||||
verbose_name_plural = "Hospitals"
|
||||
|
||||
class DepartmentChief(models.Model):
|
||||
DEPARTMENT_CHOICES = [
|
||||
('AN', 'Anesthesia'),
|
||||
('NU', 'Nursing'),
|
||||
('IC', 'Intensive Care'),
|
||||
('SU', 'Surgery'),
|
||||
('IM', 'Internal Medicine'),
|
||||
('PE', 'Pediatrics'),
|
||||
('GY', 'Gynecology'),
|
||||
('OT', 'Other'),
|
||||
]
|
||||
|
||||
hospital = models.ForeignKey(Hospital, on_delete=models.CASCADE, related_name='chiefs')
|
||||
name = models.CharField(max_length=255)
|
||||
title = models.CharField(max_length=100, help_text="e.g. Chief of Medicine, Head Nurse")
|
||||
department = models.CharField(max_length=2, choices=DEPARTMENT_CHOICES)
|
||||
email = models.EmailField()
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.name} - {self.get_department_display()} at {self.hospital.name}"
|
||||
@ -3,23 +3,96 @@
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{% block title %}Knowledge Base{% endblock %}</title>
|
||||
{% if project_description %}
|
||||
<meta name="description" content="{{ project_description }}">
|
||||
<meta property="og:description" content="{{ project_description }}">
|
||||
<meta property="twitter:description" content="{{ project_description }}">
|
||||
{% endif %}
|
||||
{% if project_image_url %}
|
||||
<meta property="og:image" content="{{ project_image_url }}">
|
||||
<meta property="twitter:image" content="{{ project_image_url }}">
|
||||
{% endif %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}MedConnect | Medical Recruitment CRM{% endblock %}</title>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,400;600;700&display=swap" rel="stylesheet">
|
||||
|
||||
<!-- Bootstrap 5 CDN -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
{% load static %}
|
||||
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
|
||||
|
||||
{% if project_description %}
|
||||
<meta name="description" content="{{ project_description }}">
|
||||
{% endif %}
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--primary-color: #0F172A; /* Deep Navy */
|
||||
--accent-color: #10B981; /* Medical Emerald */
|
||||
--bg-light: #F8FAFC; /* Soft Cloud */
|
||||
--text-main: #1E293B;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Plus Jakarta Sans', sans-serif;
|
||||
background-color: var(--bg-light);
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
h1, h2, h3, .brand-font {
|
||||
font-family: 'Fraunces', serif;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: var(--primary-color);
|
||||
border-color: var(--primary-color);
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #1E293B;
|
||||
border-color: #1E293B;
|
||||
}
|
||||
|
||||
.btn-accent {
|
||||
background-color: var(--accent-color);
|
||||
color: white;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.btn-accent:hover {
|
||||
background-color: #059669;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
|
||||
{% block head %}{% endblock %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark" style="background-color: var(--primary-color);">
|
||||
<div class="container">
|
||||
<a class="navbar-brand brand-font fs-3" href="/">MedConnect</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="/">Directory</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/admin/">Admin Panel</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
<footer class="py-5 text-center text-muted border-top mt-5">
|
||||
<div class="container">
|
||||
<p class="mb-0">© 2026 MedConnect Outreach Tool. All rights reserved.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
@ -1,145 +1,148 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{ project_name }}{% endblock %}
|
||||
{% block content %}
|
||||
<!-- Hero Section -->
|
||||
<section class="hero-section text-white py-5" style="background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%); position: relative; overflow: hidden;">
|
||||
<div class="container py-5 position-relative" style="z-index: 2;">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-7">
|
||||
<h1 class="display-3 fw-bold mb-3">Reach the Right Department Chiefs.</h1>
|
||||
<p class="lead mb-4 opacity-75">Connect with hospital leadership across Germany. Manage your medical recruitment outreach in one streamlined dashboard.</p>
|
||||
<div class="d-flex gap-3">
|
||||
<a href="#directory" class="btn btn-accent px-4 py-2 fs-5">Browse Directory</a>
|
||||
<button class="btn btn-outline-light px-4 py-2 fs-5">Bulk Outreach</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-5 d-none d-lg-block">
|
||||
<div class="glass-card p-4 rounded-4" style="background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2);">
|
||||
<div class="d-flex justify-content-between mb-4">
|
||||
<div>
|
||||
<small class="text-uppercase opacity-50">Active Campaigns</small>
|
||||
<h3 class="mb-0">12</h3>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<small class="text-uppercase opacity-50">Response Rate</small>
|
||||
<h3 class="mb-0 text-success">24%</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress mb-2" style="height: 6px; background: rgba(255,255,255,0.1);">
|
||||
<div class="progress-bar bg-success" style="width: 70%"></div>
|
||||
</div>
|
||||
<small class="opacity-75">Outreach goal for January</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Abstract Shapes -->
|
||||
<div style="position: absolute; top: -50px; right: -50px; width: 300px; height: 300px; border-radius: 50%; background: rgba(16, 185, 129, 0.1); filter: blur(50px);"></div>
|
||||
<div style="position: absolute; bottom: -100px; left: -100px; width: 400px; height: 400px; border-radius: 50%; background: rgba(16, 185, 129, 0.05); filter: blur(80px);"></div>
|
||||
</section>
|
||||
|
||||
<!-- Filter Section -->
|
||||
<section id="directory" class="py-5 bg-white shadow-sm border-bottom">
|
||||
<div class="container">
|
||||
<form method="GET" class="row g-3 align-items-end">
|
||||
<div class="col-md-4">
|
||||
<label class="form-label fw-bold small text-uppercase">Search</label>
|
||||
<input type="text" name="q" class="form-control" placeholder="Search by name or hospital..." value="{{ query }}">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label fw-bold small text-uppercase">State</label>
|
||||
<select name="state" class="form-select">
|
||||
<option value="">All States</option>
|
||||
{% for code, name in states %}
|
||||
<option value="{{ code }}" {% if selected_state == code %}selected{% endif %}>{{ name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label fw-bold small text-uppercase">Department</label>
|
||||
<select name="dept" class="form-select">
|
||||
<option value="">All Departments</option>
|
||||
{% for code, name in departments %}
|
||||
<option value="{{ code }}" {% if selected_dept == code %}selected{% endif %}>{{ name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="submit" class="btn btn-primary w-100 py-2">Filter</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Results Grid -->
|
||||
<section class="py-5">
|
||||
<div class="container">
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h2 class="mb-0">{{ chiefs.count }} Contacts Found</h2>
|
||||
<div>
|
||||
<button class="btn btn-sm btn-outline-secondary me-2">Select All</button>
|
||||
<button class="btn btn-sm btn-accent">Email Selected</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-4">
|
||||
{% for chief in chiefs %}
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="card h-100 border-0 shadow-sm hover-lift">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between mb-3">
|
||||
<span class="badge bg-light text-dark border">{{ chief.get_department_display }}</span>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value="{{ chief.id }}">
|
||||
</div>
|
||||
</div>
|
||||
<h5 class="card-title fw-bold mb-1">{{ chief.name }}</h5>
|
||||
<p class="text-muted small mb-3">{{ chief.title }}</p>
|
||||
<hr class="opacity-10">
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-hospital text-accent me-2" viewBox="0 0 16 16">
|
||||
<path d="M8.5 5.034v1.1l.953-.55.5.867L9 7l.953.55-.5.867-.953-.55v1.1h1v1h-1v1h1v1h-1V14h3a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1h-3.5z"/>
|
||||
<path d="M3.5 15h9a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-3.5V5.034h1v1h1v-1h-1V3.916l-.953.55-.5-.867L9 3l.953-.55-.5-.867-.953.55V1h-1v1.1l-.953-.55-.5.867L6 3l-.953.55.5.867.953-.55v1.1h1v1h-1v1h1v-1h-1v4a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h3.5v3.966h-1v-1h-1v1h1v1.1l.953-.55.5.867L9 13l-.953.55.5.867.953-.55v1.1h1v-1z"/>
|
||||
</svg>
|
||||
<span class="small fw-semibold">{{ chief.hospital.name }}</span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-geo-alt text-muted me-2" viewBox="0 0 16 16">
|
||||
<path d="M12.166 8.94c-.524 1.062-1.234 2.12-1.96 3.07A31.493 31.493 0 0 1 8 14.58a31.481 31.481 0 0 1-2.206-2.57c-.726-.95-1.436-2.008-1.96-3.07C3.304 7.867 3 6.862 3 6a5 5 0 0 1 10 0c0 .862-.304 1.867-.834 2.94zM8 16s6-5.686 6-10A6 6 0 0 0 2 6c0 4.314 6 10 6 10z"/>
|
||||
<path d="M8 8a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0 1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>
|
||||
</svg>
|
||||
<span class="small text-muted">{{ chief.hospital.city }}, {{ chief.hospital.get_state_display }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer bg-transparent border-0 pb-4 px-4">
|
||||
<a href="mailto:{{ chief.email }}" class="btn btn-outline-primary btn-sm w-100">Send Individual Email</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% empty %}
|
||||
<div class="col-12 text-center py-5">
|
||||
<div class="mb-3">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" fill="currentColor" class="bi bi-search text-muted opacity-25" viewBox="0 0 16 16">
|
||||
<path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="fw-bold">No contacts found</h3>
|
||||
<p class="text-muted">Try adjusting your filters or search terms.</p>
|
||||
<a href="/" class="btn btn-primary">Clear All Filters</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% block head %}
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
:root {
|
||||
--bg-color-start: #6a11cb;
|
||||
--bg-color-end: #2575fc;
|
||||
--text-color: #ffffff;
|
||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
||||
.hover-lift {
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
.hover-lift:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 1rem 3rem rgba(0,0,0,0.1) !important;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', sans-serif;
|
||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
||||
color: var(--text-color);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
body::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><path d='M-10 10L110 10M10 -10L10 110' stroke-width='1' stroke='rgba(255,255,255,0.05)'/></svg>");
|
||||
animation: bg-pan 20s linear infinite;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
@keyframes bg-pan {
|
||||
0% {
|
||||
background-position: 0% 0%;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--card-bg-color);
|
||||
border: 1px solid var(--card-border-color);
|
||||
border-radius: 16px;
|
||||
padding: 2.5rem 2rem;
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: clamp(2.2rem, 3vw + 1.2rem, 3.2rem);
|
||||
font-weight: 700;
|
||||
margin: 0 0 1.2rem;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0.5rem 0;
|
||||
font-size: 1.1rem;
|
||||
opacity: 0.92;
|
||||
}
|
||||
|
||||
.loader {
|
||||
margin: 1.5rem auto;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border: 4px solid rgba(255, 255, 255, 0.25);
|
||||
border-top-color: #fff;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.runtime code {
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
padding: 0.15rem 0.45rem;
|
||||
border-radius: 4px;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
}
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
footer {
|
||||
position: absolute;
|
||||
bottom: 1rem;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 0.85rem;
|
||||
opacity: 0.75;
|
||||
.text-accent {
|
||||
color: var(--accent-color);
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<main>
|
||||
<div class="card">
|
||||
<h1>Analyzing your requirements and generating your app…</h1>
|
||||
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
|
||||
<span class="sr-only">Loading…</span>
|
||||
</div>
|
||||
<p class="hint">AppWizzy AI is collecting your requirements and applying the first changes.</p>
|
||||
<p class="hint">This page will refresh automatically as the plan is implemented.</p>
|
||||
<p class="runtime">
|
||||
Runtime: Django <code>{{ django_version }}</code> · Python <code>{{ python_version }}</code>
|
||||
— UTC <code>{{ current_time|date:"Y-m-d H:i:s" }}</code>
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
Page updated: {{ current_time|date:"Y-m-d H:i:s" }} (UTC)
|
||||
</footer>
|
||||
{% endblock %}
|
||||
@ -4,22 +4,32 @@ import platform
|
||||
from django import get_version as django_version
|
||||
from django.shortcuts import render
|
||||
from django.utils import timezone
|
||||
|
||||
from .models import Hospital, DepartmentChief
|
||||
|
||||
def home(request):
|
||||
"""Render the landing screen with loader and environment details."""
|
||||
host_name = request.get_host().lower()
|
||||
agent_brand = "AppWizzy" if host_name == "appwizzy.com" else "Flatlogic"
|
||||
now = timezone.now()
|
||||
"""Render the landing screen with hospital directory."""
|
||||
query = request.GET.get('q', '')
|
||||
state_filter = request.GET.get('state', '')
|
||||
dept_filter = request.GET.get('dept', '')
|
||||
|
||||
chiefs = DepartmentChief.objects.select_related('hospital').all()
|
||||
|
||||
if query:
|
||||
chiefs = chiefs.filter(name__icontains=query) | chiefs.filter(hospital__name__icontains=query)
|
||||
|
||||
if state_filter:
|
||||
chiefs = chiefs.filter(hospital__state=state_filter)
|
||||
|
||||
if dept_filter:
|
||||
chiefs = chiefs.filter(department=dept_filter)
|
||||
|
||||
context = {
|
||||
"project_name": "New Style",
|
||||
"agent_brand": agent_brand,
|
||||
"django_version": django_version(),
|
||||
"python_version": platform.python_version(),
|
||||
"current_time": now,
|
||||
"host_name": host_name,
|
||||
"project_description": os.getenv("PROJECT_DESCRIPTION", ""),
|
||||
"project_image_url": os.getenv("PROJECT_IMAGE_URL", ""),
|
||||
"project_name": "MedConnect Outreach",
|
||||
"chiefs": chiefs,
|
||||
"states": Hospital.STATES_CHOICES,
|
||||
"departments": DepartmentChief.DEPARTMENT_CHOICES,
|
||||
"query": query,
|
||||
"selected_state": state_filter,
|
||||
"selected_dept": dept_filter,
|
||||
}
|
||||
return render(request, "core/index.html", context)
|
||||
return render(request, "core/index.html", context)
|
||||
Loading…
x
Reference in New Issue
Block a user