diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index a5ed392..50e79a4 100644 Binary files a/core/__pycache__/admin.cpython-311.pyc and b/core/__pycache__/admin.cpython-311.pyc differ diff --git a/core/__pycache__/forms.cpython-311.pyc b/core/__pycache__/forms.cpython-311.pyc new file mode 100644 index 0000000..6cd0a0e Binary files /dev/null and b/core/__pycache__/forms.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index e061640..64f448d 100644 Binary files a/core/__pycache__/models.cpython-311.pyc and b/core/__pycache__/models.cpython-311.pyc differ diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 2a36fd6..02d6866 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..ade1440 100644 --- a/core/admin.py +++ b/core/admin.py @@ -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" \ No newline at end of file diff --git a/core/forms.py b/core/forms.py new file mode 100644 index 0000000..f31cdcc --- /dev/null +++ b/core/forms.py @@ -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}), + } diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py new file mode 100644 index 0000000..9f2bd34 --- /dev/null +++ b/core/migrations/0001_initial.py @@ -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)), + ], + ), + ] 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..fc7748a 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..a1cb243 100644 --- a/core/models.py +++ b/core/models.py @@ -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}" \ No newline at end of file diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..ec98fd9 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,25 +1,70 @@ - - - {% block title %}Knowledge Base{% endblock %} - {% if project_description %} - - - - {% endif %} - {% if project_image_url %} - - - {% endif %} - {% load static %} - - {% block head %}{% endblock %} + + + {% block title %}Lili Records Radio{% endblock %} + + + + + + + + + + {% load static %} + + + {% block head %}{% endblock %} - - {% block content %}{% endblock %} - + - +
+ {% if messages %} +
+ {% for message in messages %} + + {% endfor %} +
+ {% endif %} + + {% block content %}{% endblock %} +
+ + + + + + {% block scripts %}{% endblock %} + + \ No newline at end of file diff --git a/core/templates/core/index.html b/core/templates/core/index.html index faec813..f1758bf 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,145 +1,97 @@ -{% extends "base.html" %} - -{% block title %}{{ project_name }}{% endblock %} - -{% block head %} - - - - -{% endblock %} +{% extends 'base.html' %} +{% load static %} {% block content %} -
-
-

Analyzing your requirements and generating your app…

-
- Loading… + +
+
+
+
+ Live On Air +

Your Voice, Your Music,
Your Radio.

+

Broadcasting the best records 24/7. Join our community and shape the playlist.

+ +
+
-

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 + + + +
+
+ +
+
+

Radio Schedule

+ {% if programs %} +
+ {% for program in programs %} +
+
+
{{ program.title }}
+

with {{ program.dj_name|default:"AutoDJ" }}

+
+
+ {{ program.start_time|time:"H:i" }} - {{ program.end_time|time:"H:i" }} +
{{ program.get_day_display }}
+
+
+ {% endfor %} +
+ {% else %} +
+

No programs scheduled for today. Tune in for our 24/7 mix!

+
+ {% endif %} +
+
+ + +
+
+

Request a Song

+
+ {% csrf_token %} +
+ + {{ form.listener_name }} +
+
+
+ + {{ form.song_title }} +
+
+ + {{ form.artist_name }} +
+
+
+ + {{ form.message }} +
+ +
+
+
+
+
+ + +
+
+
+

Connect via WhatsApp

+

Want to talk to us directly? Join our WhatsApp community for instant updates and exclusive contests.

+
+ + Chat on WhatsApp + +
+
+
+
+{% endblock %} diff --git a/core/views.py b/core/views.py index c9aed12..d95b31c 100644 --- a/core/views.py +++ b/core/views.py @@ -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) \ No newline at end of file diff --git a/static/css/custom.css b/static/css/custom.css index 925f6ed..6f59a5e 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -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); +} \ No newline at end of file