diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index cd6f855..4f3a9af 100644 Binary files a/core/__pycache__/admin.cpython-311.pyc and b/core/__pycache__/admin.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index 9aa598b..db5acb7 100644 Binary files a/core/__pycache__/models.cpython-311.pyc and b/core/__pycache__/models.cpython-311.pyc differ diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 1f807fa..1d9f9ff 100644 Binary files a/core/__pycache__/urls.cpython-311.pyc and b/core/__pycache__/urls.cpython-311.pyc differ diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 6867ddf..2725761 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/admin.py b/core/admin.py index 8c38f3f..07ab551 100644 --- a/core/admin.py +++ b/core/admin.py @@ -1,3 +1,4 @@ from django.contrib import admin +from .models import Tourist -# Register your models here. +admin.site.register(Tourist) diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py new file mode 100644 index 0000000..c32f051 --- /dev/null +++ b/core/migrations/0001_initial.py @@ -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)), + ], + ), + ] diff --git a/core/migrations/__pycache__/0001_initial.cpython-311.pyc b/core/migrations/__pycache__/0001_initial.cpython-311.pyc new file mode 100644 index 0000000..cce2d65 Binary files /dev/null and b/core/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/core/models.py b/core/models.py index 71a8362..e6c00a9 100644 --- a/core/models.py +++ b/core/models.py @@ -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 \ No newline at end of file diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..381a993 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -14,6 +14,10 @@ {% endif %} {% load static %} + + + + {% block head %}{% endblock %} diff --git a/core/templates/core/index.html b/core/templates/core/index.html index faec813..5d8ca73 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,145 +1,60 @@ -{% extends "base.html" %} +{% extends 'base.html' %} +{% load static %} -{% block title %}{{ project_name }}{% endblock %} - -{% block head %} - - - - -{% endblock %} +{% block title %}Smart Tourist Safety{% endblock %} {% block content %} -
-
-

Analyzing your requirements and generating your app…

-
- Loading… +
+
+
+
+

Travel with Confidence

+

Your safety, our priority. A smart monitoring and incident response system for tourists.

+
+
+
+

Create Your Digital ID

+

Register in seconds to stay protected during your travels.

+
+ {% csrf_token %} +
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+
-

AppWizzy AI is collecting your requirements and applying the first changes.

-

This page will refresh automatically as the plan is implemented.

-

- Runtime: Django {{ django_version }} · Python {{ python_version }} - — UTC {{ current_time|date:"Y-m-d H:i:s" }} -

-
-
- -{% endblock %} \ No newline at end of file + + +
+
+
+

Geo-Fence Alerts

+

Receive notifications when entering or leaving designated zones.

+
+
+

Instant SOS

+

Send emergency alerts to our response team with a single tap.

+
+
+

Verified Digital ID

+

Securely share your identity and critical information with responders.

+
+
+
+{% endblock %} diff --git a/core/templates/core/registration_success.html b/core/templates/core/registration_success.html new file mode 100644 index 0000000..96d6f97 --- /dev/null +++ b/core/templates/core/registration_success.html @@ -0,0 +1,11 @@ +{% extends 'base.html' %} + +{% block title %}Registration Successful{% endblock %} + +{% block content %} +
+

Registration Successful!

+

Thank you for registering. Your Digital ID has been created.

+ Go to Homepage +
+{% endblock %} diff --git a/core/urls.py b/core/urls.py index 6299e3d..b41603f 100644 --- a/core/urls.py +++ b/core/urls.py @@ -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'), ] diff --git a/core/views.py b/core/views.py index c9aed12..b26470e 100644 --- a/core/views.py +++ b/core/views.py @@ -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') diff --git a/static/css/custom.css b/static/css/custom.css index 925f6ed..4e1e5f5 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -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); +} \ No newline at end of file diff --git a/staticfiles/css/custom.css b/staticfiles/css/custom.css index 108056f..4e1e5f5 100644 --- a/staticfiles/css/custom.css +++ b/staticfiles/css/custom.css @@ -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); +} \ No newline at end of file