Display RGB color, transparency and prints for parts

This commit is contained in:
2025-01-29 10:36:43 +01:00
parent d93723ab4e
commit d08b7bb063
6 changed files with 31 additions and 5 deletions
+8
View File
@@ -134,6 +134,14 @@ class RebrickablePart(BrickRecord):
spare=self.fields.spare,
)
# Compute the url for the original of the printed part
def url_for_print(self, /) -> str:
return url_for(
'part.details',
part=self.fields.print,
color=self.fields.color,
)
# Compute the url for the rebrickable page
def url_for_rebrickable(self, /) -> str:
if current_app.config['REBRICKABLE_LINKS']:
+1 -1
View File
@@ -19,7 +19,7 @@ SELECT
"rebrickable_parts"."image",
"rebrickable_parts"."image_id",
"rebrickable_parts"."url",
--"rebrickable_parts"."print",
"rebrickable_parts"."print",
{% block total_missing %}
NULL AS "total_missing", -- dummy for order: total_missing
{% endblock %}