From 7c99951dd41159281ef74ec41940d0553cc093de Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Mon, 27 Oct 2025 15:29:34 +0000 Subject: [PATCH] NexCourse Version 1 --- core/__pycache__/admin.cpython-311.pyc | Bin 212 -> 461 bytes core/__pycache__/models.cpython-311.pyc | Bin 209 -> 1548 bytes core/__pycache__/urls.cpython-311.pyc | Bin 347 -> 470 bytes core/__pycache__/views.cpython-311.pyc | Bin 1364 -> 934 bytes core/admin.py | 4 +- core/migrations/0001_initial.py | 33 ++++ .../__pycache__/0001_initial.cpython-311.pyc | Bin 0 -> 1714 bytes core/models.py | 16 +- core/templates/base.html | 40 +++- core/templates/core/course_detail.html | 26 +++ core/templates/core/index.html | 180 +++--------------- core/urls.py | 8 +- core/views.py | 31 +-- static/css/custom.css | 19 ++ 14 files changed, 170 insertions(+), 187 deletions(-) create mode 100644 core/migrations/0001_initial.py create mode 100644 core/migrations/__pycache__/0001_initial.cpython-311.pyc create mode 100644 core/templates/core/course_detail.html create mode 100644 static/css/custom.css diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index cd6f855b12f4883b1ba9de01c54245c53aacd714..2cbf23bfcd944b270a76746b76823b012da1dfa4 100644 GIT binary patch literal 461 zcma)1u}T9$5S`84#Sl!IloqiPuQ2xmVj~Dz*x04J+z!dbyW22(i`u8M(azRN5r5_) z0mD{;RXQPE8r@Y7qF6Y*oq0R(-oCwWH0oe#`|5o#HuKe9%5uKR;?j^C;J{e|DeE!@ zyuzKNk~&={b-OMDWJ9l%-BwGsI?=gf0FUN;)xR|EZw+@(!1w0X!e`nGc^YSP>*-f? z{VVt10l|g^bm&kNg#+1clOSFkWDtVVH1BHDr9|~e zp|;yWLk154>LGyFOs)g_56I9zAfp6u5N^$+&4Dv{N!~k}auNqchn#dD@4b8X?mfKk z-9IBE27z(y@3$Lg3L&phNQQpCIQ<0{`-Bpzc%-4!6@{e8PlTo(6RI+0GnE`TPzgDL z8IQUutu(OG|HDe7=@nAR4De7z5$T3cnHMv zQwNa35zKhhb!m}Kxw%6Ltuw7+a z%xS}A)jxdxThOu{R&{*Ns&V>rt!kpc_}|&TcMPNy5{kbcVlv{_5^`QU2<)pqroRTb!$1@$bKHjQSuGD}68wKIa`Xsn)I&G)7{?4^F2?1=`tB6sP!nQdvEL)sPB%Lt zYqMM#aY03uHzKJK#{_pkfL#ta{?G;y};%et^-@JhiZXAC5!tR>$ zJ##)X=R1o?*hwVp#}LPb(JaH`k)xY-bKRe#YjJ1k_wf;n`$dNRVJc_YAL73Jk(>rfD=_wls+kUKm4C)x&mEu8TQ7XmS3a(&BbORqd=^eVfW#aN3T);<`bJTn|DE* BR{j70 delta 150 zcmeC-xyYEloR^o20SH!P{K~Kd(vLwL7+``jJ_`XE(-~42QW$d>av7r-85vTTf*CZK zUxE~9GTvg#%}+_qDfZK3y2Y82m6(^Fua}Zk#0->N$?zGZW^y*8f#@#|8=$(#jubVQ+pRE^efj^)I~-%M;)CsMhE`| z|AUfrAYGlMvB6{gMQ7k~d<x(0(}x`u5TGXukFAclZ+#weB) z_Fx80j+Y<-O~zX+1&JjYFBzenjQrfxTMR`YV?c6wiMgqMnyk0DQ?e5C()0C7i*kyK zK!)97Ez3+TFD_!8%+DAQ!v_=rnNaKnBt9@RGBVy^khy@09x#YsKt&(e7+5(QTsnk0 eLT0dCV3EJbB7cQN{sS`;KT`uY2o~`GjROGo>pBPk diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 6867ddf286a519cf1754ac97038f9f1e4605fbf2..dbd739eab16139b692828cdbb89eb60eec3ae98b 100644 GIT binary patch literal 934 zcmZuuF>ljQ5Pr{g>t}YGQ_{6Jj6;2tyW_vP7x<)FgG{^x1CHDwQ%Y zBEi-Pi76C?fsv7);GjrUmO3$Yi;vxb%ugv9L{$7?#mM3$}K`8 z@WyH66bDM`paG2F2m{>0Bd9)R9k>8sv3hdH_9(Gh0JmRk1|2t6Y>vz~CC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b/core/models.py @@ -1,3 +1,17 @@ from django.db import models -# Create your models here. +class Instructor(models.Model): + name = models.CharField(max_length=100) + bio = models.TextField() + + def __str__(self): + return self.name + +class Course(models.Model): + title = models.CharField(max_length=200) + description = models.TextField() + instructor = models.ForeignKey(Instructor, on_delete=models.CASCADE, related_name='courses') + price = models.DecimalField(max_digits=10, decimal_places=2) + + 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 788576e..aa36707 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,11 +1,35 @@ - + - {% block title %}Knowledge Base{% endblock %} - {% block head %}{% endblock %} - - - {% block content %}{% endblock %} - - + + {% block title %}Course Catalog{% endblock %} + + {% load static %} + + + + + +
+ {% block content %} + {% endblock %} +
+ + + + \ No newline at end of file diff --git a/core/templates/core/course_detail.html b/core/templates/core/course_detail.html new file mode 100644 index 0000000..6f65731 --- /dev/null +++ b/core/templates/core/course_detail.html @@ -0,0 +1,26 @@ +{% extends 'base.html' %} + +{% block title %}{{ course.title }}{% endblock %} + +{% block content %} +
+
+
+

{{ course.title }}

+

by {{ course.instructor.name }}

+
+

{{ course.description }}

+
+
+
+
+
Course Details
+

Price: ${{ course.price }}

+ Add to Wishlist + Enroll Now +
+
+
+
+
+{% endblock %} diff --git a/core/templates/core/index.html b/core/templates/core/index.html index 0a3f404..291843a 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,154 +1,34 @@ -{% extends "base.html" %} +{% extends 'base.html' %} -{% block title %}{{ project_name }}{% endblock %} - -{% block head %} -{% if project_description %} - - - -{% endif %} -{% if project_image_url %} - - -{% endif %} - - - - -{% endblock %} +{% block title %}Course Catalog{% endblock %} {% block content %} -
-
-

Analyzing your requirements and generating your app…

-
- Loading… +
+
+

Welcome to Our Course Catalog

+

Find the perfect course to kickstart your learning journey.

-

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

-
-
-
- Page updated: {{ current_time|date:"Y-m-d H:i:s" }} (UTC) -
-{% endblock %} \ No newline at end of file + + +
+ {% for course in courses %} +
+
+
+
{{ course.title }}
+
{{ course.instructor.name }}
+

{{ course.description|truncatewords:20 }}

+ View Details +
+ +
+
+ {% empty %} +
+

No courses available at the moment.

+
+ {% endfor %} +
+{% endblock %} diff --git a/core/urls.py b/core/urls.py index 6299e3d..2b2022b 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,7 +1,7 @@ from django.urls import path - -from .views import home +from . import views urlpatterns = [ - path("", home, name="home"), -] + path('', views.course_list, name='course_list'), + path('course//', views.course_detail, name='course_detail'), +] \ No newline at end of file diff --git a/core/views.py b/core/views.py index c9aed12..231935c 100644 --- a/core/views.py +++ b/core/views.py @@ -1,25 +1,10 @@ -import os -import platform +from django.shortcuts import render, get_object_or_404 +from .models import Course -from django import get_version as django_version -from django.shortcuts import render -from django.utils import timezone +def course_list(request): + courses = Course.objects.all() + return render(request, 'core/index.html', {'courses': courses}) - -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 course_detail(request, pk): + course = get_object_or_404(Course, pk=pk) + return render(request, 'core/course_detail.html', {'course': course}) \ No newline at end of file diff --git a/static/css/custom.css b/static/css/custom.css new file mode 100644 index 0000000..681ab64 --- /dev/null +++ b/static/css/custom.css @@ -0,0 +1,19 @@ +body { + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; +} + +h1, h2, h3, h4, h5, h6 { + font-family: Georgia, serif; +} + +.hero-section { + background-color: #f8f9fa; +} + +.card { + transition: transform .2s; +} + +.card:hover { + transform: scale(1.05); +}