Minor fix in CRUDKit build_href: We don't necessarily only want to link to CRUDKit blueprints.
This commit is contained in:
parent
d8e8790987
commit
15d0de44fe
4 changed files with 11 additions and 11 deletions
|
|
@ -677,8 +677,9 @@ def _build_href(spec: Dict[str, Any], row: Dict[str, Any], obj) -> Optional[str]
|
|||
if any(v is None for v in params.values()):
|
||||
return None
|
||||
try:
|
||||
return url_for('crudkit.' + spec["endpoint"], **params)
|
||||
return url_for(spec["endpoint"], **params)
|
||||
except Exception as e:
|
||||
print(f"Cannot create endpoint for {spec['endpoint']}: {str(e)}")
|
||||
return None
|
||||
|
||||
def _humanize(field: str) -> str:
|
||||
|
|
@ -725,7 +726,6 @@ def get_crudkit_template(env, name):
|
|||
|
||||
def render_field(field, value):
|
||||
env = get_env()
|
||||
print(field)
|
||||
|
||||
# 1) custom template field
|
||||
field_type = field.get('type', 'text')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue