forked from FrederikBaerentsen/BrickTracker
Display RGB color, transparency and prints for parts
This commit is contained in:
@@ -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']:
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user