Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02525633d4 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +1,4 @@
|
||||
from django.contrib import admin
|
||||
from .models import Tourist
|
||||
|
||||
# Register your models here.
|
||||
admin.site.register(Tourist)
|
||||
|
||||
25
core/migrations/0001_initial.py
Normal file
25
core/migrations/0001_initial.py
Normal file
@ -0,0 +1,25 @@
|
||||
# Generated by Django 5.2.7 on 2025-12-09 06:05
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Tourist',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('email', models.EmailField(max_length=254, unique=True)),
|
||||
('emergency_contact_name', models.CharField(max_length=100)),
|
||||
('emergency_contact_phone', models.CharField(max_length=20)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
],
|
||||
),
|
||||
]
|
||||
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,11 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
class Tourist(models.Model):
|
||||
name = models.CharField(max_length=100)
|
||||
email = models.EmailField(unique=True)
|
||||
emergency_contact_name = models.CharField(max_length=100)
|
||||
emergency_contact_phone = models.CharField(max_length=20)
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
@ -14,6 +14,10 @@
|
||||
<meta property="twitter:image" content="{{ project_image_url }}">
|
||||
{% endif %}
|
||||
{% load static %}
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<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=Poppins:wght@700&family=Lato:wght@400&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
|
||||
{% block head %}{% endblock %}
|
||||
</head>
|
||||
|
||||
@ -1,145 +1,60 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{ project_name }}{% endblock %}
|
||||
|
||||
{% 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);
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block title %}Smart Tourist Safety{% 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 class="hero-section">
|
||||
<div class="container">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-6">
|
||||
<h1 class="display-4">Travel with Confidence</h1>
|
||||
<p class="lead">Your safety, our priority. A smart monitoring and incident response system for tourists.</p>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="registration-form-container p-4 rounded-3">
|
||||
<h2>Create Your Digital ID</h2>
|
||||
<p>Register in seconds to stay protected during your travels.</p>
|
||||
<form method="POST" action="{% url 'index' %}">
|
||||
{% csrf_token %}
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">Full Name</label>
|
||||
<input type="text" class="form-control" id="name" name="name" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">Email Address</label>
|
||||
<input type="email" class="form-control" id="email" name="email" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="emergency_contact_name" class="form-label">Emergency Contact Name</label>
|
||||
<input type="text" class="form-control" id="emergency_contact_name" name="emergency_contact_name" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="emergency_contact_phone" class="form-label">Emergency Contact Phone</label>
|
||||
<input type="tel" class="form-control" id="emergency_contact_phone" name="emergency_contact_phone" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary w-100">Register Now</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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 %}
|
||||
</div>
|
||||
|
||||
<div class="container py-5">
|
||||
<div class="row text-center">
|
||||
<div class="col-md-4">
|
||||
<h3>Geo-Fence Alerts</h3>
|
||||
<p>Receive notifications when entering or leaving designated zones.</p>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h3>Instant SOS</h3>
|
||||
<p>Send emergency alerts to our response team with a single tap.</p>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h3>Verified Digital ID</h3>
|
||||
<p>Securely share your identity and critical information with responders.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
11
core/templates/core/registration_success.html
Normal file
11
core/templates/core/registration_success.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Registration Successful{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container text-center py-5">
|
||||
<h1 class="display-4">Registration Successful!</h1>
|
||||
<p class="lead">Thank you for registering. Your Digital ID has been created.</p>
|
||||
<a href="{% url 'index' %}" class="btn btn-primary">Go to Homepage</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@ -1,7 +1,7 @@
|
||||
from django.urls import path
|
||||
|
||||
from .views import home
|
||||
from .views import index, registration_success
|
||||
|
||||
urlpatterns = [
|
||||
path("", home, name="home"),
|
||||
path('', index, name='index'),
|
||||
path('registration-success/', registration_success, name='registration_success'),
|
||||
]
|
||||
|
||||
@ -1,25 +1,24 @@
|
||||
import os
|
||||
import platform
|
||||
from django.shortcuts import render, redirect
|
||||
from .models import Tourist
|
||||
|
||||
from django import get_version as django_version
|
||||
from django.shortcuts import render
|
||||
from django.utils import timezone
|
||||
def index(request):
|
||||
if request.method == 'POST':
|
||||
name = request.POST.get('name')
|
||||
email = request.POST.get('email')
|
||||
emergency_contact_name = request.POST.get('emergency_contact_name')
|
||||
emergency_contact_phone = request.POST.get('emergency_contact_phone')
|
||||
|
||||
if name and email and emergency_contact_name and emergency_contact_phone:
|
||||
if not Tourist.objects.filter(email=email).exists():
|
||||
Tourist.objects.create(
|
||||
name=name,
|
||||
email=email,
|
||||
emergency_contact_name=emergency_contact_name,
|
||||
emergency_contact_phone=emergency_contact_phone
|
||||
)
|
||||
return redirect('registration_success')
|
||||
|
||||
return render(request, 'core/index.html')
|
||||
|
||||
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()
|
||||
|
||||
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", ""),
|
||||
}
|
||||
return render(request, "core/index.html", context)
|
||||
def registration_success(request):
|
||||
return render(request, 'core/registration_success.html')
|
||||
|
||||
@ -1,4 +1,50 @@
|
||||
/* Custom styles for the application */
|
||||
body {
|
||||
font-family: system-ui, -apple-system, sans-serif;
|
||||
:root {
|
||||
--primary-color: #0A2342;
|
||||
--secondary-color: #F4F7F5;
|
||||
--accent-color: #2CA58D;
|
||||
--highlight-color: #F4D35E;
|
||||
--text-color: #212529;
|
||||
--heading-font: 'Poppins', sans-serif;
|
||||
--body-font: 'Lato', sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: var(--body-font);
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: var(--heading-font);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: var(--accent-color);
|
||||
border-color: var(--accent-color);
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #248d78;
|
||||
border-color: #248d78;
|
||||
}
|
||||
|
||||
.hero-section {
|
||||
background: linear-gradient(45deg, #0A2342, #1a3a63);
|
||||
color: var(--secondary-color);
|
||||
padding: 6rem 0;
|
||||
}
|
||||
|
||||
.hero-section .lead {
|
||||
font-size: 1.25rem;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.registration-form-container {
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
backdrop-filter: blur(10px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.registration-form-container h2 {
|
||||
color: var(--highlight-color);
|
||||
}
|
||||
@ -1,21 +1,50 @@
|
||||
|
||||
: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);
|
||||
--primary-color: #0A2342;
|
||||
--secondary-color: #F4F7F5;
|
||||
--accent-color: #2CA58D;
|
||||
--highlight-color: #F4D35E;
|
||||
--text-color: #212529;
|
||||
--heading-font: 'Poppins', sans-serif;
|
||||
--body-font: 'Lato', sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', sans-serif;
|
||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
||||
font-family: var(--body-font);
|
||||
color: var(--text-color);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: var(--heading-font);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: var(--accent-color);
|
||||
border-color: var(--accent-color);
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #248d78;
|
||||
border-color: #248d78;
|
||||
}
|
||||
|
||||
.hero-section {
|
||||
background: linear-gradient(45deg, #0A2342, #1a3a63);
|
||||
color: var(--secondary-color);
|
||||
padding: 6rem 0;
|
||||
}
|
||||
|
||||
.hero-section .lead {
|
||||
font-size: 1.25rem;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.registration-form-container {
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
backdrop-filter: blur(10px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.registration-form-container h2 {
|
||||
color: var(--highlight-color);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user