You've already forked hotpocket
Compare commits
4 Commits
v25.12.04
...
v26.1.14.p
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b775a130b | |||
| bcef0d2d09 | |||
| 9f121a0ceb | |||
| d16f0cd957 |
@@ -8,7 +8,7 @@ hotpocket_app:
|
|||||||
node: "home.vm.snakeweb.net"
|
node: "home.vm.snakeweb.net"
|
||||||
docker:
|
docker:
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "home.vm:10.0.1.2"
|
- "home.vm:10.16.1.100"
|
||||||
backend:
|
backend:
|
||||||
image_tag: "{{ hotpocket_app_image_tag|default('deployment-v25.10.21-01') }}"
|
image_tag: "{{ hotpocket_app_image_tag|default('deployment-v25.10.21-01') }}"
|
||||||
database:
|
database:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
version = '25.12.04'
|
version = '26.1.14.post0'
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 96 KiB |
@@ -2,10 +2,24 @@
|
|||||||
|
|
||||||
{% load i18n static ui %}
|
{% load i18n static ui %}
|
||||||
|
|
||||||
{% block title %}{{ association.title }}{% endblock %}
|
{% block title %}{% if association.title %}{{ association.title }}{% else %}{{ association.target.url }}{% endif %}{% endblock %}
|
||||||
|
|
||||||
{% block button_bar_class %}d-none{% endblock %}
|
{% block button_bar_class %}d-none{% endblock %}
|
||||||
|
|
||||||
|
{% block page_head %}
|
||||||
|
{{ block.super}}
|
||||||
|
<meta property="og:title" content="{% if association.title %}{{ association.title }}{% else %}{{ association.target.url }}{% endif %}">
|
||||||
|
{% if association.description %}
|
||||||
|
<meta property="og:description" content="{{ association.description|truncatechars:125 }}">
|
||||||
|
{% endif %}
|
||||||
|
<meta property="og:image" content="{{ og_card_url }}">
|
||||||
|
<meta property="og:image:width" content="1200">
|
||||||
|
<meta property="og:image:height" content="630">
|
||||||
|
<meta property="og:url" content="{{ share_url }}">
|
||||||
|
<meta property="og:type" content="website">
|
||||||
|
<meta property="og:site_name" content="{{ SITE_TITLE }}">
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block page_body %}
|
{% block page_body %}
|
||||||
<div id="ViewAssociationView" class="container pb-3">
|
<div id="ViewAssociationView" class="container pb-3">
|
||||||
<p class="display-3 mt-3 mb-0 text-center">
|
<p class="display-3 mt-3 mb-0 text-center">
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ from django.contrib import messages
|
|||||||
import django.db
|
import django.db
|
||||||
from django.http import HttpRequest, HttpResponse, JsonResponse
|
from django.http import HttpRequest, HttpResponse, JsonResponse
|
||||||
from django.shortcuts import redirect, render
|
from django.shortcuts import redirect, render
|
||||||
|
from django.templatetags.static import static
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.views.generic import FormView, View
|
from django.views.generic import FormView, View
|
||||||
@@ -198,12 +199,18 @@ def view(request: HttpRequest, pk: uuid.UUID) -> HttpResponse:
|
|||||||
if is_share is True:
|
if is_share is True:
|
||||||
show_controls = show_controls and False
|
show_controls = show_controls and False
|
||||||
|
|
||||||
share_url = reverse(
|
share_url = request.build_absolute_uri(
|
||||||
|
reverse(
|
||||||
'ui.associations.view',
|
'ui.associations.view',
|
||||||
args=(association.pk,),
|
args=(association.pk,),
|
||||||
query=[
|
query=[
|
||||||
('share', 'true'),
|
('share', 'true'),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
og_card_url = request.build_absolute_uri(
|
||||||
|
static('ui/img/og-card.png'),
|
||||||
)
|
)
|
||||||
|
|
||||||
return render(
|
return render(
|
||||||
@@ -213,6 +220,12 @@ def view(request: HttpRequest, pk: uuid.UUID) -> HttpResponse:
|
|||||||
'association': association,
|
'association': association,
|
||||||
'show_controls': show_controls,
|
'show_controls': show_controls,
|
||||||
'share_url': share_url,
|
'share_url': share_url,
|
||||||
|
'is_share': is_share,
|
||||||
|
'og_card_url': (
|
||||||
|
og_card_url
|
||||||
|
if is_share is True
|
||||||
|
else None
|
||||||
|
),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ cat <<EOF
|
|||||||
|_|
|
|_|
|
||||||
production
|
production
|
||||||
|
|
||||||
HotPocket v25.12.04 [${HOTPOCKET_BACKEND_IMAGE_ID}] (https://hotpocket.app/)
|
HotPocket v26.1.14.post0 [${HOTPOCKET_BACKEND_IMAGE_ID}] (https://hotpocket.app/)
|
||||||
Copyright 2025-present by BTHLabs. All rights reserved. (https://bthlabs.pl/)
|
Copyright 2025-present by BTHLabs. All rights reserved. (https://bthlabs.pl/)
|
||||||
Licensed under Apache-2.0
|
Licensed under Apache-2.0
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hotpocket-backend",
|
"name": "hotpocket-backend",
|
||||||
"version": "25.12.04",
|
"version": "26.1.14.post0",
|
||||||
"description": "HotPocket Backend",
|
"description": "HotPocket Backend",
|
||||||
"main": "hotpocket_backend/apps/frontend/src/index.js",
|
"main": "hotpocket_backend/apps/frontend/src/index.js",
|
||||||
"repository": "https://git.bthlabs.pl/tomekwojcik/hotpocket",
|
"repository": "https://git.bthlabs.pl/tomekwojcik/hotpocket",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "hotpocket-backend"
|
name = "hotpocket-backend"
|
||||||
version = "25.12.04"
|
version = "26.1.14.post0"
|
||||||
description = "HotPocket Backend"
|
description = "HotPocket Backend"
|
||||||
authors = ["Tomek Wójcik <contact@bthlabs.pl>"]
|
authors = ["Tomek Wójcik <contact@bthlabs.pl>"]
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|||||||
@@ -28,13 +28,15 @@ def test_authenticated_ok(authenticated_client: Client,
|
|||||||
assert result.context['association'].target.pk == association_out.target.pk
|
assert result.context['association'].target.pk == association_out.target.pk
|
||||||
assert result.context['show_controls'] is True
|
assert result.context['show_controls'] is True
|
||||||
assert 'share_url' in result.context
|
assert 'share_url' in result.context
|
||||||
|
assert result.context['is_share'] is False
|
||||||
|
assert result.context['og_card_url'] is None
|
||||||
|
|
||||||
expected_share_url = reverse(
|
expected_share_url = reverse(
|
||||||
'ui.associations.view',
|
'ui.associations.view',
|
||||||
args=(association_out.pk,),
|
args=(association_out.pk,),
|
||||||
query=[('share', 'true')],
|
query=[('share', 'true')],
|
||||||
)
|
)
|
||||||
assert result.context['share_url'] == expected_share_url
|
assert result.context['share_url'].endswith(expected_share_url)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
@@ -126,6 +128,16 @@ def test_authenticated_share_ok(authenticated_client: Client,
|
|||||||
assert hasattr(result.context['association'], 'target') is True
|
assert hasattr(result.context['association'], 'target') is True
|
||||||
assert result.context['association'].target.pk == other_account_association_out.target.pk
|
assert result.context['association'].target.pk == other_account_association_out.target.pk
|
||||||
assert result.context['show_controls'] is False
|
assert result.context['show_controls'] is False
|
||||||
|
assert 'share_url' in result.context
|
||||||
|
assert result.context['is_share'] is True
|
||||||
|
assert result.context['og_card_url'] is not None
|
||||||
|
|
||||||
|
expected_share_url = reverse(
|
||||||
|
'ui.associations.view',
|
||||||
|
args=(other_account_association_out.pk,),
|
||||||
|
query=[('share', 'true')],
|
||||||
|
)
|
||||||
|
assert result.context['share_url'].endswith(expected_share_url)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
|
|||||||
Reference in New Issue
Block a user