Auto commit: 2026-02-03T21:45:47.687Z

This commit is contained in:
Flatlogic Bot 2026-02-03 21:45:47 +00:00
parent d84a145914
commit 7f5df11593
13 changed files with 392 additions and 185 deletions

Binary file not shown.

View File

@ -1,3 +1,19 @@
from django.contrib import admin
from .models import Program, SongRequest
# Register your models here.
@admin.register(Program)
class ProgramAdmin(admin.ModelAdmin):
list_display = ('title', 'day', 'start_time', 'end_time', 'dj_name')
list_filter = ('day',)
search_fields = ('title', 'dj_name')
@admin.register(SongRequest)
class SongRequestAdmin(admin.ModelAdmin):
list_display = ('song_title', 'artist_name', 'listener_name', 'created_at', 'is_played')
list_filter = ('is_played', 'created_at')
search_fields = ('song_title', 'artist_name', 'listener_name')
actions = ['mark_as_played']
def mark_as_played(self, request, queryset):
queryset.update(is_played=True)
mark_as_played.short_description = "Mark selected requests as played"

13
core/forms.py Normal file
View File

@ -0,0 +1,13 @@
from django import forms
from .models import SongRequest
class SongRequestForm(forms.ModelForm):
class Meta:
model = SongRequest
fields = ['listener_name', 'song_title', 'artist_name', 'message']
widgets = {
'listener_name': forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Your Name'}),
'song_title': forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Song Title'}),
'artist_name': forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Artist Name'}),
'message': forms.Textarea(attrs={'class': 'form-control', 'placeholder': 'Optional message', 'rows': 3}),
}

View File

@ -0,0 +1,41 @@
# Generated by Django 5.2.7 on 2026-02-03 21:22
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Program',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=200)),
('description', models.TextField(blank=True)),
('day', models.CharField(choices=[('MON', 'Monday'), ('TUE', 'Tuesday'), ('WED', 'Wednesday'), ('THU', 'Thursday'), ('FRI', 'Friday'), ('SAT', 'Saturday'), ('SUN', 'Sunday')], max_length=3)),
('start_time', models.TimeField()),
('end_time', models.TimeField()),
('dj_name', models.CharField(blank=True, max_length=100)),
],
options={
'ordering': ['day', 'start_time'],
},
),
migrations.CreateModel(
name='SongRequest',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('listener_name', models.CharField(max_length=100)),
('song_title', models.CharField(max_length=200)),
('artist_name', models.CharField(max_length=200)),
('message', models.TextField(blank=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('is_played', models.BooleanField(default=False)),
],
),
]

View File

@ -1,3 +1,35 @@
from django.db import models
# Create your models here.
class Program(models.Model):
DAYS_OF_WEEK = [
('MON', 'Monday'),
('TUE', 'Tuesday'),
('WED', 'Wednesday'),
('THU', 'Thursday'),
('FRI', 'Friday'),
('SAT', 'Saturday'),
('SUN', 'Sunday'),
]
title = models.CharField(max_length=200)
description = models.TextField(blank=True)
day = models.CharField(max_length=3, choices=DAYS_OF_WEEK)
start_time = models.TimeField()
end_time = models.TimeField()
dj_name = models.CharField(max_length=100, blank=True)
class Meta:
ordering = ['day', 'start_time']
def __str__(self):
return f"{self.title} ({self.get_day_display()})"
class SongRequest(models.Model):
listener_name = models.CharField(max_length=100)
song_title = models.CharField(max_length=200)
artist_name = models.CharField(max_length=200)
message = models.TextField(blank=True)
created_at = models.DateTimeField(auto_now_add=True)
is_played = models.BooleanField(default=False)
def __str__(self):
return f"{self.song_title} by {self.artist_name} - Requested by {self.listener_name}"

View File

@ -1,25 +1,70 @@
<!DOCTYPE html>
<html lang="en">
<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 %}
{% load static %}
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
{% block head %}{% endblock %}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Lili Records Radio{% endblock %}</title>
<!-- Google 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=Poppins:wght@300;400;600;800&display=swap" rel="stylesheet">
<!-- Bootstrap 5 CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
{% load static %}
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
{% block head %}{% endblock %}
</head>
<body>
{% block content %}{% endblock %}
</body>
<nav class="navbar navbar-expand-lg navbar-dark sticky-top">
<div class="container">
<a class="navbar-brand" href="{% url 'home' %}">LILI RECORDS</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" href="#schedule">Schedule</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#request">Request Song</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/admin/">Admin</a>
</li>
</ul>
</div>
</div>
</nav>
</html>
<main>
{% if messages %}
<div class="container mt-3">
{% for message in messages %}
<div class="alert alert-{{ message.tags }} alert-dismissible fade show bg-card text-white border-0" role="alert">
{{ message }}
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endfor %}
</div>
{% endif %}
{% block content %}{% endblock %}
</main>
<footer class="footer">
<div class="container">
<p>&copy; 2026 Lili Records Radio. All rights reserved.</p>
<p class="small">Powered by Flatlogic AI</p>
</div>
</footer>
<!-- Bootstrap 5 JS Bundle -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
{% block scripts %}{% endblock %}
</body>
</html>

View File

@ -1,145 +1,97 @@
{% extends "base.html" %}
{% 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 %}
{% extends 'base.html' %}
{% load static %}
{% 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>
<!-- Hero Section -->
<section class="hero-section text-center">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-8">
<span class="live-badge mb-3 d-inline-block">Live On Air</span>
<h1 class="display-3 fw-bold mb-4">Your Voice, Your Music, <br><span style="color: var(--neon-cyan)">Your Radio.</span></h1>
<p class="lead text-muted mb-5">Broadcasting the best records 24/7. Join our community and shape the playlist.</p>
<div class="d-flex justify-content-center gap-3">
<a href="#request" class="btn btn-neon">Request a Song</a>
<a href="#schedule" class="btn btn-outline-light rounded-pill px-4">View Schedule</a>
</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 %}
</section>
<!-- Main Grid -->
<div class="container pb-5">
<div class="row g-4">
<!-- Schedule Section -->
<div class="col-lg-7" id="schedule">
<div class="card h-100 p-4">
<h2 class="h3 mb-4 fw-bold">Radio Schedule</h2>
{% if programs %}
<div class="schedule-list">
{% for program in programs %}
<div class="schedule-item d-flex justify-content-between align-items-center">
<div>
<h5 class="mb-1 fw-bold">{{ program.title }}</h5>
<p class="mb-0 text-muted small">with {{ program.dj_name|default:"AutoDJ" }}</p>
</div>
<div class="text-end">
<span class="badge bg-dark text-cyan">{{ program.start_time|time:"H:i" }} - {{ program.end_time|time:"H:i" }}</span>
<div class="small text-muted mt-1">{{ program.get_day_display }}</div>
</div>
</div>
{% endfor %}
</div>
{% else %}
<div class="text-center py-5">
<p class="text-muted">No programs scheduled for today. Tune in for our 24/7 mix!</p>
</div>
{% endif %}
</div>
</div>
<!-- Song Request Section -->
<div class="col-lg-5" id="request">
<div class="card h-100 p-4">
<h2 class="h3 mb-4 fw-bold">Request a Song</h2>
<form method="post" class="song-form">
{% csrf_token %}
<div class="mb-3">
<label class="form-label small text-muted">Your Name</label>
{{ form.listener_name }}
</div>
<div class="row mb-3">
<div class="col">
<label class="form-label small text-muted">Song Title</label>
{{ form.song_title }}
</div>
<div class="col">
<label class="form-label small text-muted">Artist Name</label>
{{ form.artist_name }}
</div>
</div>
<div class="mb-4">
<label class="form-label small text-muted">Shoutout / Message</label>
{{ form.message }}
</div>
<button type="submit" class="btn btn-neon w-100">Send Request</button>
</form>
</div>
</div>
</div>
</div>
<!-- CTA Section -->
<section class="py-5 bg-dark">
<div class="container">
<div class="card p-5 text-center" style="background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('https://images.unsplash.com/photo-1598488035139-bdbb2231ce04?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80'); background-size: cover;">
<h2 class="mb-3">Connect via WhatsApp</h2>
<p class="mb-4 text-muted">Want to talk to us directly? Join our WhatsApp community for instant updates and exclusive contests.</p>
<div>
<a href="https://wa.me/your-number" class="btn btn-success btn-lg rounded-pill px-5">
<i class="bi bi-whatsapp"></i> Chat on WhatsApp
</a>
</div>
</div>
</div>
</section>
{% endblock %}

View File

@ -1,25 +1,26 @@
import os
import platform
from django import get_version as django_version
from django.shortcuts import render
from django.shortcuts import render, redirect
from django.contrib import messages
from .models import Program, SongRequest
from .forms import SongRequestForm
from django.utils import timezone
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()
# Get current programs (simplification: showing all for now, sorted)
programs = Program.objects.all()
# Handle song request form
if request.method == 'POST':
form = SongRequestForm(request.POST)
if form.is_valid():
form.save()
messages.success(request, 'Your song request has been sent! Stay tuned.')
return redirect('home')
else:
form = SongRequestForm()
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", ""),
'programs': programs,
'form': form,
'current_time': timezone.now(),
}
return render(request, "core/index.html", context)
return render(request, 'core/index.html', context)

View File

@ -1,4 +1,111 @@
/* Custom styles for the application */
body {
font-family: system-ui, -apple-system, sans-serif;
:root {
--bg-dark: #0B0D17;
--bg-card: #1A1E2E;
--neon-pink: #FF007A;
--neon-cyan: #00F0FF;
--text-main: #FFFFFF;
--text-muted: #A0A0A0;
--accent-gradient: linear-gradient(45deg, var(--neon-pink), var(--neon-cyan));
}
body {
background-color: var(--bg-dark);
color: var(--text-main);
font-family: 'Poppins', sans-serif;
margin: 0;
overflow-x: hidden;
}
.navbar {
background-color: rgba(11, 13, 23, 0.95);
backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.navbar-brand {
font-weight: 800;
background: var(--accent-gradient);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-size: 1.5rem;
}
.hero-section {
padding: 100px 0;
position: relative;
background: radial-gradient(circle at top right, rgba(255, 0, 122, 0.1), transparent),
radial-gradient(circle at bottom left, rgba(0, 240, 255, 0.1), transparent);
}
.card {
background-color: var(--bg-card);
border: 1px solid rgba(255, 255, 255, 0.05);
border-radius: 15px;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.btn-neon {
background: var(--accent-gradient);
border: none;
color: white;
font-weight: 600;
padding: 12px 30px;
border-radius: 30px;
transition: all 0.3s ease;
}
.btn-neon:hover {
box-shadow: 0 0 20px rgba(255, 0, 122, 0.5);
transform: scale(1.05);
color: white;
}
.form-control {
background-color: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
color: white;
border-radius: 10px;
}
.form-control:focus {
background-color: rgba(255, 255, 255, 0.1);
border-color: var(--neon-cyan);
color: white;
box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}
.live-badge {
background-color: var(--neon-pink);
color: white;
padding: 5px 15px;
border-radius: 20px;
font-size: 0.8rem;
font-weight: 700;
text-transform: uppercase;
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { opacity: 1; }
50% { opacity: 0.5; }
100% { opacity: 1; }
}
.schedule-item {
padding: 15px;
border-left: 3px solid var(--neon-cyan);
margin-bottom: 10px;
background: rgba(255, 255, 255, 0.02);
}
.footer {
padding: 50px 0;
border-top: 1px solid rgba(255, 255, 255, 0.05);
text-align: center;
color: var(--text-muted);
}