diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index a5ed392..9d4b1e0 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 e061640..595ddb3 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..6faf416 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..0e4c3c8 100644 --- a/core/admin.py +++ b/core/admin.py @@ -1,3 +1,11 @@ from django.contrib import admin +from .models import RadioStream, Show -# Register your models here. +@admin.register(RadioStream) +class RadioStreamAdmin(admin.ModelAdmin): + list_display = ('name', 'url', 'is_active') + +@admin.register(Show) +class ShowAdmin(admin.ModelAdmin): + list_display = ('title', 'host', 'weekday', 'start_time', 'end_time') + list_filter = ('weekday',) \ No newline at end of file diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py new file mode 100644 index 0000000..039650c --- /dev/null +++ b/core/migrations/0001_initial.py @@ -0,0 +1,37 @@ +# Generated by Django 5.2.7 on 2026-01-31 23:30 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='RadioStream', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(default='Lili Records Live', max_length=200)), + ('url', models.URLField(help_text='The URL of the live audio stream (e.g., Icecast/Shoutcast URL)')), + ('is_active', models.BooleanField(default=True)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ], + ), + migrations.CreateModel( + name='Show', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=200)), + ('host', models.CharField(max_length=200)), + ('description', models.TextField(blank=True)), + ('image_url', models.URLField(blank=True, help_text='URL for the show image', null=True)), + ('start_time', models.TimeField()), + ('end_time', models.TimeField()), + ('weekday', models.IntegerField(choices=[(0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), (3, 'Thursday'), (4, 'Friday'), (5, 'Saturday'), (6, 'Sunday')])), + ], + ), + ] 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..6703fc0 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..578e3ec 100644 --- a/core/models.py +++ b/core/models.py @@ -1,3 +1,25 @@ from django.db import models -# Create your models here. +class RadioStream(models.Model): + name = models.CharField(max_length=200, default="Lili Records Live") + url = models.URLField(help_text="The URL of the live audio stream (e.g., Icecast/Shoutcast URL)") + is_active = models.BooleanField(default=True) + created_at = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return self.name + +class Show(models.Model): + title = models.CharField(max_length=200) + host = models.CharField(max_length=200) + description = models.TextField(blank=True) + image_url = models.URLField(blank=True, null=True, help_text="URL for the show image") + start_time = models.TimeField() + end_time = models.TimeField() + weekday = models.IntegerField(choices=[ + (0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), + (3, 'Thursday'), (4, 'Friday'), (5, 'Saturday'), (6, 'Sunday') + ]) + + def __str__(self): + return f"{self.title} with {self.host}" diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..b91916b 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,25 +1,144 @@ - + - - {% block title %}Knowledge Base{% endblock %} - {% if project_description %} - - - - {% endif %} - {% if project_image_url %} - - - {% endif %} - {% load static %} - - {% block head %}{% endblock %} + + + {% block title %}{{ project_name }}{% endblock %} + + {% if project_description %} + + + + {% endif %} + {% if project_image_url %} + + + {% endif %} + + {% load static %} + + + + + + + + + + + {% block head %}{% endblock %} - {% block content %}{% endblock %} + + +
+ {% block content %}{% endblock %} +
+ + + + + - + \ No newline at end of file diff --git a/core/templates/core/index.html b/core/templates/core/index.html index faec813..00da881 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,145 +1,185 @@ {% extends "base.html" %} - -{% block title %}{{ project_name }}{% endblock %} - -{% block head %} - - - - -{% endblock %} +{% load static %} {% block content %} -
-
-

Analyzing your requirements and generating your app…

-
- Loading… +
+
+ +
+

+ Siente el Ritmo de Lili Records +

+

+ La radio que te acompaña en cada momento. Música, entrevistas y el mejor contenido en vivo directamente en tus oídos. +

+ +
+ +
+ +
+
+ {% if current_show and current_show.image_url %} + {{ current_show.title }} + {% else %} +
+ +
+ {% endif %} +
LIVE
+
+
+

{% if current_show %}{{ current_show.title }}{% else %}Música Continua{% endif %}

+

{% if current_show %}Con {{ current_show.host }}{% else %}Lili Records Radio{% endif %}

+
+
+ + +
+ {% if active_stream %} + +
+ +
+
+
+
+
+
+ + +
+
+
+ Listo para transmitir + {{ active_stream.name }} +
+ {% else %} +
+ No hay transmisiones activas en este momento. +
+ {% endif %} +
+
+
+ + +
+
+
+
+
+ +
+
+
Optimizado para iOS
+

Disfruta de la mejor experiencia móvil con nuestra interfaz diseñada para tu iPhone.

+
+
+
+
+
+
+ +
+
+
Programación 24/7
+

Nunca te pierdas tus shows favoritos con nuestra grilla de programación actualizada.

+
+
+
+
+
+
+ +
+
+
Episodios On-Demand
+

¿Te perdiste un programa? Escúchalo cuando quieras en nuestra sección de podcasts.

+
+
+
+
+
-

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 + + + + + +{% endblock %} diff --git a/core/views.py b/core/views.py index c9aed12..92e451e 100644 --- a/core/views.py +++ b/core/views.py @@ -1,25 +1,28 @@ import os -import platform - -from django import get_version as django_version from django.shortcuts import render from django.utils import timezone - +from .models import RadioStream, Show 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" + """Render the radio player landing page.""" now = timezone.now() + current_weekday = now.weekday() + current_time = now.time() + + active_stream = RadioStream.objects.filter(is_active=True).first() + + # Simple logic for current show: match weekday and time range + current_show = Show.objects.filter( + weekday=current_weekday, + start_time__lte=current_time, + end_time__gte=current_time + ).first() 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": "Lili Records Radio", + "active_stream": active_stream, + "current_show": current_show, + "now": now, + "project_description": os.getenv("PROJECT_DESCRIPTION", "Lili Records Radio - La mejor música en vivo."), } - return render(request, "core/index.html", context) + return render(request, "core/index.html", context) \ No newline at end of file