diff --git a/assets/pasted-20260306-170732-802ece65.jpg b/assets/pasted-20260306-170732-802ece65.jpg new file mode 100644 index 0000000..45041c3 Binary files /dev/null and b/assets/pasted-20260306-170732-802ece65.jpg differ diff --git a/assets/pasted-20260306-173029-9c184f3f.jpg b/assets/pasted-20260306-173029-9c184f3f.jpg new file mode 100644 index 0000000..afc6907 Binary files /dev/null and b/assets/pasted-20260306-173029-9c184f3f.jpg differ diff --git a/assets/vm-shot-2026-03-06T17-07-22-517Z.jpg b/assets/vm-shot-2026-03-06T17-07-22-517Z.jpg new file mode 100644 index 0000000..45041c3 Binary files /dev/null and b/assets/vm-shot-2026-03-06T17-07-22-517Z.jpg differ diff --git a/assets/vm-shot-2026-03-06T17-30-26-593Z.jpg b/assets/vm-shot-2026-03-06T17-30-26-593Z.jpg new file mode 100644 index 0000000..afc6907 Binary files /dev/null and b/assets/vm-shot-2026-03-06T17-30-26-593Z.jpg differ diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index 5e8987a..5a6652b 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 a251b5f..e6a67d4 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 f705988..b01dfc2 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 2f0989c..2c86cd8 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..8dd1385 100644 --- a/core/admin.py +++ b/core/admin.py @@ -1,3 +1,10 @@ from django.contrib import admin +from .models import Game, News -# Register your models here. +@admin.register(Game) +class GameAdmin(admin.ModelAdmin): + list_display = ('title', 'release_date') + +@admin.register(News) +class NewsAdmin(admin.ModelAdmin): + list_display = ('title', 'created_at') \ 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..d6985c4 --- /dev/null +++ b/core/migrations/0001_initial.py @@ -0,0 +1,33 @@ +# Generated by Django 5.2.7 on 2026-03-06 17:14 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Game', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=200)), + ('description', models.TextField()), + ('release_date', models.DateField()), + ('image', models.ImageField(blank=True, null=True, upload_to='games/')), + ], + ), + migrations.CreateModel( + name='News', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=200)), + ('content', models.TextField()), + ('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..720280d 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..ed5ed81 100644 --- a/core/models.py +++ b/core/models.py @@ -1,3 +1,18 @@ from django.db import models -# Create your models here. +class Game(models.Model): + title = models.CharField(max_length=200) + description = models.TextField() + release_date = models.DateField() + image = models.ImageField(upload_to='games/', blank=True, null=True) + + def __str__(self): + return self.title + +class News(models.Model): + title = models.CharField(max_length=200) + content = models.TextField() + created_at = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return self.title \ No newline at end of file diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..f08172b 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -3,23 +3,30 @@ - {% block title %}Knowledge Base{% endblock %} - {% if project_description %} - - - - {% endif %} - {% if project_image_url %} - - - {% endif %} + {% block title %}CDPR Fan Hub{% endblock %} {% load static %} + {% block head %}{% endblock %} - + + {% block content %}{% endblock %} + - + \ No newline at end of file diff --git a/core/templates/core/game_detail.html b/core/templates/core/game_detail.html new file mode 100644 index 0000000..58b93c4 --- /dev/null +++ b/core/templates/core/game_detail.html @@ -0,0 +1,8 @@ +{% extends 'base.html' %} +{% block content %} +
+

{{ game.title }}

+

{{ game.description }}

+

Released: {{ game.release_date }}

+
+{% endblock %} diff --git a/core/templates/core/games_list.html b/core/templates/core/games_list.html new file mode 100644 index 0000000..be2fe3b --- /dev/null +++ b/core/templates/core/games_list.html @@ -0,0 +1,19 @@ +{% extends 'base.html' %} +{% block content %} +
+

Games

+
+ {% for game in games %} +
+
+
+
{{ game.title }}
+

{{ game.description|truncatewords:20 }}

+ View +
+
+
+ {% endfor %} +
+
+{% endblock %} diff --git a/core/templates/core/index.html b/core/templates/core/index.html index faec813..90bff90 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,145 +1,51 @@ -{% 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… + + +
+
+

CDPR Fan Hub

+

Your destination for news and game insights.

+ Explore Games
-

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" }} -

-
-
- + + +
+
+
+

Latest Games

+ {% for game in games %} +
+
+
{{ game.title }}
+ View +
+
+ {% endfor %} +
+
+

Recent News

+ {% for post in news %} +
+
+
{{ post.title }}
+ Read +
+
+ {% endfor %} +
+
+
{% endblock %} \ No newline at end of file diff --git a/core/templates/core/news_detail.html b/core/templates/core/news_detail.html new file mode 100644 index 0000000..0e12c92 --- /dev/null +++ b/core/templates/core/news_detail.html @@ -0,0 +1,8 @@ +{% extends 'base.html' %} +{% block content %} +
+

{{ post.title }}

+

{{ post.content }}

+

{{ post.created_at }}

+
+{% endblock %} diff --git a/core/templates/core/news_list.html b/core/templates/core/news_list.html new file mode 100644 index 0000000..c05c252 --- /dev/null +++ b/core/templates/core/news_list.html @@ -0,0 +1,15 @@ +{% extends 'base.html' %} +{% block content %} +
+

News

+ {% for post in news %} +
+
+
{{ post.title }}
+

{{ post.content|truncatewords:20 }}

+ Read More +
+
+ {% endfor %} +
+{% endblock %} diff --git a/core/urls.py b/core/urls.py index 6299e3d..aebd3a7 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,7 +1,12 @@ from django.urls import path +from . import views -from .views import home +app_name = 'core' urlpatterns = [ - path("", home, name="home"), -] + path('', views.index, name='index'), + path('games/', views.games_list, name='games_list'), + path('games//', views.game_detail, name='game_detail'), + path('news/', views.news_list, name='news_list'), + path('news//', views.news_detail, name='news_detail'), +] \ No newline at end of file diff --git a/core/views.py b/core/views.py index c9aed12..6759b07 100644 --- a/core/views.py +++ b/core/views.py @@ -1,25 +1,23 @@ -import os -import platform +from django.shortcuts import render, get_object_or_404 +from .models import Game, News -from django import get_version as django_version -from django.shortcuts import render -from django.utils import timezone +def index(request): + games = Game.objects.all()[:3] + news = News.objects.all()[:3] + return render(request, 'core/index.html', {'games': games, 'news': news}) +def games_list(request): + games = Game.objects.all() + return render(request, 'core/games_list.html', {'games': games}) -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() +def game_detail(request, pk): + game = get_object_or_404(Game, pk=pk) + return render(request, 'core/game_detail.html', {'game': game}) - 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 news_list(request): + news = News.objects.all() + return render(request, 'core/news_list.html', {'news': news}) + +def news_detail(request, pk): + post = get_object_or_404(News, pk=pk) + return render(request, 'core/news_detail.html', {'post': post}) \ No newline at end of file diff --git a/static/css/custom.css b/static/css/custom.css index 925f6ed..4ccd0cb 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -1,4 +1,18 @@ -/* Custom styles for the application */ body { - font-family: system-ui, -apple-system, sans-serif; + background-color: #0c0c0c !important; + color: #f5f5f5 !important; } + +.bg-danger { + background-color: #e10600 !important; +} + +.card { + background-color: #1a1a1a !important; + color: #f5f5f5 !important; + border: 1px solid #333 !important; +} + +a { + color: #ff3b2f !important; +} \ No newline at end of file