Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
6e9d24e
refactor: improved header
Bogdan2005-19 Apr 30, 2026
7120b40
refactor(css): small improvement at sidebar user profile part
Bogdan2005-19 Apr 30, 2026
6067af4
refactor(home): improved html structure for better readability
Bogdan2005-19 Apr 30, 2026
24d79e4
feat(content): Added platforms aviability in details page
Bogdan2005-19 Apr 30, 2026
816cf7a
Deleted comments
Bogdan2005-19 Apr 30, 2026
64421a7
Deleted comments
Bogdan2005-19 Apr 30, 2026
bd51e5e
fix(home): Search catlog does not show duplicates
Bogdan2005-19 Apr 30, 2026
3ed5014
Merge pull request #108 from Null-Pointers2-0/HTML-Refactor-branch
gery25 Apr 30, 2026
fc19df6
Merge pull request #110 from Null-Pointers2-0/23-featcontent-ui-displ…
gery25 Apr 30, 2026
291eb45
Merge branch 'dev' into 109-bugcatalog-duplicated-contents-when-searc…
gery25 Apr 30, 2026
350d27c
Merge pull request #111 from Null-Pointers2-0/109-bugcatalog-duplicat…
gery25 Apr 30, 2026
783dde5
feat: added plataform filtering, and seeing on catalog witch platafor…
May 1, 2026
e68c9e9
fix: fixed the pagination
May 1, 2026
28ad232
fix: fixed to string on Api
May 1, 2026
0924ed1
Merge pull request #112 from Null-Pointers2-0/21-featcontent-implemen…
gery25 May 2, 2026
dc2b8d0
fixed: port api models problems
May 2, 2026
a9e482b
feat (DDBB): added neon with postgres sql to database settings
May 5, 2026
5af3c69
feat (BBDD): added implementation of bbdd as the uml
May 5, 2026
e995cb3
fix: delete unnecessary files
May 5, 2026
15f6ec6
fix: merge conflicts solved
May 5, 2026
6166bcf
Merge branch 'main' into dev
Bogdan2005-19 May 5, 2026
14d53a5
fix: changed branch push activation on quality-pipeline
Bogdan2005-19 May 5, 2026
7061e0d
added comments for fog metric (Need add more)
Bogdan2005-19 May 5, 2026
e41aaff
fix: changed fog index search path
Bogdan2005-19 May 5, 2026
6601c97
fix(profile-api): resolve AttributeError in profile API and include f…
Karu174 May 5, 2026
e93b24d
Merge pull request #115 from Null-Pointers2-0/fix/profile-api-bug
Bogdan2005-19 May 6, 2026
7a6848f
Update push branch configuration in workflow
Bogdan2005-19 May 6, 2026
9964fd2
refactor(action): small changes on json naming
Bogdan2005-19 May 6, 2026
7c101ff
modified fog metric json to match html names
Bogdan2005-19 May 6, 2026
f3c0a97
refactor: added NO DATA to pass on html report
Bogdan2005-19 May 6, 2026
aca7533
refactored metrig html report
Bogdan2005-19 May 6, 2026
dce80ce
Improved html for metrics
Bogdan2005-19 May 6, 2026
b7c0a83
feat (Data Base): added database tables, and relations as the uml
May 6, 2026
8e8fcdc
feat (Data Base): added database tables, and relations as the uml
May 6, 2026
24c86ca
fix (DataBase): fixed conflicts with models and views
May 6, 2026
56163f2
fix: Localy fixed db work
Bogdan2005-19 May 6, 2026
eca1d46
refactor
Bogdan2005-19 May 6, 2026
f013c0a
refactor: added sqlite if no DATABASE_URL is given
Bogdan2005-19 May 6, 2026
569e5fd
refactor: added some confirm prints
Bogdan2005-19 May 6, 2026
d295a0e
feat (test_impl): added first test implementation for a form creation…
May 7, 2026
b9aab73
feat(tests): added tests for update customer
May 7, 2026
2730f5a
feat (test_models): added tests on models, and solved tests from forms
May 8, 2026
6c22e8b
feat (test_views): added tests on views
May 8, 2026
6df84f9
feat (test_views): added tests on views
May 8, 2026
2349920
Merge branch '119-feattests-tests-to-django-project' into dev
May 8, 2026
1602086
Fix (tests): fixed and added all tests
May 8, 2026
76ba174
feat(data-base): add the visualitzations table
gery25 May 8, 2026
de9d7c6
Merge pull request #118 from Null-Pointers2-0/DeployFailDB
gery25 May 8, 2026
d24ed21
Merge branch 'dev' into 19-featexport-generate-and-download-csv-reports
Bogdan2005-19 May 8, 2026
5644f8d
merged with dev to allow PR deploy preview
Bogdan2005-19 May 8, 2026
ccc1614
added --fake-initial to decrease migrate conflicts
Bogdan2005-19 May 8, 2026
d9096d9
refactor: changed trusted urls from render
Bogdan2005-19 May 8, 2026
463d352
Merge pull request #137 from Null-Pointers2-0/19-featexport-generate-…
Bogdan2005-19 May 8, 2026
c4174ec
fix: Changed settings to use sqlite on debug
Bogdan2005-19 May 12, 2026
10c3a6e
Merge pull request #143 from Null-Pointers2-0/UserCreationWRole
gery25 May 12, 2026
0915c06
Remove 'StreamSync Premium' label from details sidebar
Bogdan2005-19 May 12, 2026
e2c1653
feat (image): added image to the content
May 12, 2026
0ed92ea
Merge branch 'dev' into 124-featcatalog-content-poster-selection-and-…
May 12, 2026
51ef477
fix: ficed dependencies
May 12, 2026
b67a57b
Merge branch '124-featcatalog-content-poster-selection-and-merging' i…
May 12, 2026
c97b7de
feat(DB_backup): added the db backup with instructions comented
May 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
API_KEY_8080=secret8080
API_KEY_8081=secret8081
API_KEY_8082=secret8082
DATABASE_URL=postgres://mi_usuario:mi_password_seguro@db:5432/joinproject_db
8 changes: 4 additions & 4 deletions .github/scripts/depth_conditional_nesting_GP.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ def visit_If(self, node: ast.If) -> None:

def get_status_code(max_depth: int) -> str:
if max_depth > CRITICAL_THRESHOLD:
return "CRITICAL"
return "CRITICAL"
if max_depth >= WARNING_THRESHOLD:
return "🚨 WARNING"
return "OK"
return "WARNING"
return "OK"


def get_metrics(filepath: Path) -> Optional[Dict[str, Any]]:
Expand Down Expand Up @@ -144,7 +144,7 @@ def main() -> None:
all_results.append({
"file": str(filepath),
"avg_depth": metrics["avg"],
"max_depth": metrics["max"],
"max_nesting_depth": metrics["max"],
"status_code": metrics["status_code"]
})
if metrics["max"] > CRITICAL_THRESHOLD:
Expand Down
12 changes: 5 additions & 7 deletions .github/scripts/fog_comments_indexGP.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import re
import os
import sys
import json
import textstat
import re, os, sys, json, textstat
from pathlib import Path

SUPPORTED_EXTENSIONS = {'.py', '.js', '.ts', '.cpp', '.java', '.html'}

EXCLUDE_DIRS = {'.git', 'node_modules', 'venv', 'env', '__pycache__', 'dist'}

def extract_comments(file_path):
extension = os.path.splitext(file_path)[1]

Expand Down Expand Up @@ -75,7 +73,7 @@ def scan(target_path):

files = (
[path] if path.is_file()
else [f for f in path.rglob('*') if f.suffix in SUPPORTED_EXTENSIONS]
else [f for f in path.rglob('*') if f.suffix in SUPPORTED_EXTENSIONS and not any(part in EXCLUDE_DIRS for part in f.parts)]
)

results = []
Expand All @@ -92,7 +90,7 @@ def scan(target_path):
results.append({
"file": str(file),
"avg_fog": round(avg, 1) if avg else None,
"max_fog": round(max_score, 1) if max_score else None,
"fog_score": round(max_score, 1) if max_score else None,
"status_code": status
})

Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/render-integrity-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,15 @@ function buildQualitySection(key, data) {

const results = data.results || []
const totalFiles = (data.summary && data.summary.total_files != null) ? data.summary.total_files : results.length
const violations = results.filter((r) => r.status_code !== 'OK' && r.status_code !== 'OK!')
const violations = results.filter((r) => r.status_code !== 'OK' && r.status_code !== 'OK!' && r.status_code !== 'NO DATA')
const passed = totalFiles - violations.length

const findingsHtml = violations.length === 0
? `<p style="color:#64748b;font-style:italic;margin:0;font-size:14px">All ${totalFiles} file(s) passed — no violations found.</p>`
: violations.map((r) => {
const val = r[qm.metric]
const display = typeof val === 'number' ? val.toFixed(qm.decimals) : (val ?? '?')
const lvl = (r.status_code === 'DANGER' || r.status_code === '⚠️ IMPROVE NAMING') ? 'error' : 'warning'
const lvl = (r.status_code === 'DANGER' || r.status_code === '⚠️ IMPROVE NAMING' || r.status_code === 'COMPLEX') ? 'error' : 'warning'
return `
<div style="display:flex;gap:10px;align-items:flex-start;padding:10px 0;border-bottom:1px solid #f1f5f9">
<div style="flex-shrink:0;padding-top:1px">${chip(lvl)}</div>
Expand Down Expand Up @@ -225,7 +225,7 @@ const qualitySummaryRows = quality
const qm = QUALITY_META[key]
const data = quality[key]
const status = qualityJobStatus(data)
const violations = data ? (data.results || []).filter((r) => r.status_code !== 'OK' && r.status_code !== 'OK!').length : 0
const violations = data ? (data.results || []).filter((r) => r.status_code !== 'OK' && r.status_code !== 'OK!' && r.status_code !== 'NO DATA').length : 0
return `
<tr>
<td style="padding:12px 16px"><strong>${qm.icon} ${esc(qm.name)}</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/quality-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ jobs:
- name: Run fog index analysis
run: |
mkdir -p quality-job4
python .github/scripts/fog_comments_indexGP.py src/ \
python .github/scripts/fog_comments_indexGP.py . \
> quality-job4/fog-results.json
cat quality-job4/fog-results.json

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ EXPOSE 8000

RUN python manage.py collectstatic --noinput

CMD python3 manage.py migrate && python3 manage.py runserver 0.0.0.0:8000
CMD python3 manage.py migrate --fake-initial && python3 manage.py runserver 0.0.0.0:8000



29 changes: 21 additions & 8 deletions Templates/Details/details_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,28 @@
{% block content %}
<div class="details-wrapper">
<aside class="details-sidebar">
{% if content.poster_path %}
<div class="poster-container">
<img src="{{ content.poster_path }}" alt="{{ content.title }}" class="details-poster">
</div>
{% endif %}
<div class="side-meta">
<span class="label-neon">StreamSync Premium</span>
<h1 class="main-title">{{ content.title }}</h1>

<div class="badge-group">
{% if content.genre %}
<span class="badge">{{ content.genre.name }}</span>
{% endif %}
{% if content.age_rating %}
<span class="badge">{{ content.age_rating.description }}</span>
{% endif %}
{% if content.rating %}
<span class="badge" style="color: var(--rating); border-color: rgba(245, 197, 24, 0.2);">★ {{ content.rating }}</span>
{% endif %}
</div>
</div>

<div class="side-info-list" style="display: flex; flex-direction: column; gap: 12px;">
{# Los archivos hijos (movie_detail y series_detail) rellenarán esto #}
{% block content_metadata %}{% endblock %}

{% if content.director %}
Expand All @@ -31,8 +38,17 @@ <h1 class="main-title">{{ content.title }}</h1>
<div class="data-card-value">{{ content.director.name }}</div>
</div>
{% endif %}

{% block platforms %}{% endblock %}

<div class="data-card">
<div class="data-card-label">Disponible en:</div>
<div class="data-card-value">
{% for api in available_apis %}
<span>{{ api.name|default:api.port }}</span>
{% empty %}
<span>No hay información de API disponible.</span>
{% endfor %}
</div>
</div>
</div>
</aside>

Expand Down Expand Up @@ -64,14 +80,12 @@ <h2 class="section-title">Acciones</h2>

if (favoriteBtn) {
favoriteBtn.addEventListener('click', function() {
// Lee la URL específica generada por el bloque de Django
const targetUrl = this.getAttribute('data-url');
const btn = this;

fetch(targetUrl, {
method: 'POST',
headers: {
// Al estar incrustado en el template, Django inyecta el token aquí directamente
'X-CSRFToken': '{{ csrf_token }}',
'Content-Type': 'application/json'
}
Expand All @@ -81,7 +95,6 @@ <h2 class="section-title">Acciones</h2>
return response.json();
})
.then(data => {
// Actualización directa de la interfaz gráfica
if (data.status === 'added') {
btn.innerText = 'Quitar de la lista';
btn.style.color = 'var(--cyan)';
Expand All @@ -95,4 +108,4 @@ <h2 class="section-title">Acciones</h2>
}
});
</script>
{% endblock %}
{% endblock %}
4 changes: 1 addition & 3 deletions Templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
{% if user.is_authenticated %}
<span class="welcome-text">{% trans "Welcome" %} {{ user.username }}</span>
{% endif %}
</div>
<div class="header-right">
<form action="{% url 'set_language' %}" method="post" class="nav-item dropdown">
{% csrf_token %}
<input name="next" type="hidden" value="{{ redirect_to }}">
Expand Down Expand Up @@ -111,7 +109,7 @@

{% if user.is_authenticated %}
<div class="menu-user">
<a href="{% url 'profile' %}">
<a href="{% url 'profile' %}" class="hidden-link">
<div class="user-info">
<div class="user-avatar">{{ user.username|first|upper }}</div>
<div class="user-details">
Expand Down
82 changes: 30 additions & 52 deletions Templates/home/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
{% load i18n %}
{% load static %}
{% block extra_css %}
<link rel="stylesheet" href="{% static 'css/home/home.css' %}?v=1.2">
<link rel="stylesheet" href="{% static 'css/home/filter.css' %}?v=1.2">
<link rel="stylesheet" href="{% static 'css/home/home.css' %}?v=1.3">
<link rel="stylesheet" href="{% static 'css/home/filter.css' %}?v=1.3">
{% endblock %}
{% block search-menu %}
<div class="menu-search">
Expand Down Expand Up @@ -54,6 +54,18 @@
</select>
</div>

<div class="platform-filter">
<label for="platform">{% trans "Platform" %}:</label>
<select name="platform" id="platform">
<option value="">{% trans "All" %}</option>
{% for p in platforms %}
<option value="{{ p.port }}" {% if request.GET.platform == p.port|stringformat:"s" %}selected{% endif %}>
{{ p }}
</option>
{% endfor %}
</select>
</div>

<div class="filter-buttons">
<button type="submit">{% trans "Filter / Search" %}</button>
<a href="{% url 'home' %}" class="clear-filters">{% trans "Clear filters" %}</a>
Expand All @@ -64,60 +76,26 @@
</div>
{% endblock %}
{% block content %}
<div class="container">
<div class="container home-container">
<div class="row">
<div class="col-md-12">
<div class="home-container">
<div class="home-container-left">
<div class="filter-container">

</div>

<h2 class="results-title">{% trans "Results" %}: {{ search_query }}</h2>

<div class="movie-grid">
{% for item in items %}
{% include 'part/card.html' with item=item %}
{% empty %}
<p class="no-results">
{% trans "No content found matching those filters." %}
</p>
{% endfor %}
</div>

<div class="pagination-container">
<nav class="pagination-nav">
{% if items.has_previous %}
<a href="?page=1{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}" class="pagination-btn icon-btn" title="{% trans 'primera' %}">
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none"><polyline points="11 17 6 12 11 7"></polyline><polyline points="18 17 13 12 18 7"></polyline></svg>
</a>
<a href="?page={{ items.previous_page_number }}{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}" class="pagination-btn" title="{% trans 'anterior' %}">
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none"><polyline points="15 18 9 12 15 6"></polyline></svg>
<span class="btn-text">{% trans "anterior" %}</span>
</a>
{% endif %}

<div class="pagination-info">
<span class="current-label">{% trans "Pàgina" %}</span>
<span class="current-page">{{ items.number }}</span>
<span class="divider">{% trans "de" %}</span>
<span class="total-pages">{{ items.paginator.num_pages }}</span>
</div>
<div class="col-12 home-container-left">
<div class="filter-container">

</div>

{% if items.has_next %}
<a href="?page={{ items.next_page_number }}{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}" class="pagination-btn" title="{% trans 'següent' %}">
<span class="btn-text">{% trans "següent" %}</span>
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none"><polyline points="9 18 15 12 9 6"></polyline></svg>
</a>
<a href="?page={{ items.paginator.num_pages }}{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}" class="pagination-btn icon-btn" title="{% trans 'última' %}">
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none"><polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline></svg>
</a>
{% endif %}
</nav>
</div>
<h2 class="results-title">{% trans "Results" %}: {{ search_query }}</h2>

</div>
<div class="movie-grid">
{% for item in items %}
{% include 'part/card.html' with item=item %}
{% empty %}
<p class="no-results">
{% trans "No content found matching those filters." %}
</p>
{% endfor %}
</div>

{% include 'home/home_parts/paginator.html' with items=items %}
</div>
</div>
</div>
Expand Down
32 changes: 32 additions & 0 deletions Templates/home/home_parts/paginator.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{% load i18n %}

<div class="pagination-container">
<nav class="pagination-nav">
{% if items.has_previous %}
<a href="?page=1{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}" class="pagination-btn icon-btn" title="{% trans 'primera' %}">
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none"><polyline points="11 17 6 12 11 7"></polyline><polyline points="18 17 13 12 18 7"></polyline></svg>
</a>
<a href="?page={{ items.previous_page_number }}{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}" class="pagination-btn" title="{% trans 'anterior' %}">
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none"><polyline points="15 18 9 12 15 6"></polyline></svg>
<span class="btn-text">{% trans "anterior" %}</span>
</a>
{% endif %}

<div class="pagination-info">
<span class="current-label">{% trans "Pàgina" %}</span>
<span class="current-page">{{ items.number }}</span>
<span class="divider">{% trans "de" %}</span>
<span class="total-pages">{{ items.paginator.num_pages }}</span>
</div>

{% if items.has_next %}
<a href="?page={{ items.next_page_number }}{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}" class="pagination-btn" title="{% trans 'següent' %}">
<span class="btn-text">{% trans "següent" %}</span>
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none"><polyline points="9 18 15 12 9 6"></polyline></svg>
</a>
<a href="?page={{ items.paginator.num_pages }}{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}" class="pagination-btn icon-btn" title="{% trans 'última' %}">
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none"><polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline></svg>
</a>
{% endif %}
</nav>
</div>
Loading
Loading