Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try again here #1

Open
fgregg opened this issue Oct 18, 2023 · 7 comments
Open

try again here #1

fgregg opened this issue Oct 18, 2023 · 7 comments

Comments

@fgregg
Copy link
Owner

fgregg commented Oct 18, 2023

hi @yejiyang, you should try to use this repo again now.

@yejiyang
Copy link

@fgregg Thanks for helping out. I tested your branch no_limit_csv_publish and it works great now 🚀🚀🚀.
I am curious what's your plan for the future of this branch. I realized you routed it back to 1.0a1. Do you plan to sync it with the latest datasette main branch? I think your approach here - full data rows in csv & limit rows in table is a great idea. To push back to the upstream would be the best scenario in my opintion.

@fgregg
Copy link
Owner Author

fgregg commented Oct 18, 2023

i may, but have no plans. simon is choosy about what he brings in.

@yejiyang
Copy link

yejiyang commented Dec 1, 2023

@fgregg Hey, I saw you updated this branch no_limit_csv_publish. Does it work on your side?

@fgregg
Copy link
Owner Author

fgregg commented Dec 1, 2023 via email

@yejiyang
Copy link

@fgregg Hei, I tried you branch no_limit_csv_publish again, with the templates from here . I got this error. Do you know if I should also update the templates somewhere?

2023-12-11 12:29:09 INFO:     172.23.0.1:57784 - "GET /-/static/sql-formatter-2.3.3.min.js HTTP/1.1" 200 OK
2023-12-11 12:29:14 Traceback (most recent call last):
2023-12-11 12:29:14   File "/usr/local/lib/python3.9/site-packages/datasette/app.py", line 1632, in route_path
2023-12-11 12:29:14     response = await view(request, send)
2023-12-11 12:29:14   File "/usr/local/lib/python3.9/site-packages/datasette/app.py", line 1814, in async_view_fn
2023-12-11 12:29:14     response = await async_call_with_supported_arguments(
2023-12-11 12:29:14   File "/usr/local/lib/python3.9/site-packages/datasette/utils/__init__.py", line 1016, in async_call_with_supported_arguments
2023-12-11 12:29:14     return await fn(*call_with)
2023-12-11 12:29:14   File "/usr/local/lib/python3.9/site-packages/datasette/views/table.py", line 673, in table_view
2023-12-11 12:29:14     response = await table_view_traced(datasette, request)
2023-12-11 12:29:14   File "/usr/local/lib/python3.9/site-packages/datasette/views/table.py", line 822, in table_view_traced
2023-12-11 12:29:14     await datasette.render_template(
2023-12-11 12:29:14   File "/usr/local/lib/python3.9/site-packages/datasette/app.py", line 1307, in render_template
2023-12-11 12:29:14     return await template.render_async(template_context)
2023-12-11 12:29:14   File "/usr/local/lib/python3.9/site-packages/jinja2/environment.py", line 1324, in render_async
2023-12-11 12:29:14     return self.environment.handle_exception()
2023-12-11 12:29:14   File "/usr/local/lib/python3.9/site-packages/jinja2/environment.py", line 936, in handle_exception
2023-12-11 12:29:14     raise rewrite_traceback_stack(source=source)
2023-12-11 12:29:14   File "/usr/local/lib/python3.9/site-packages/jinja2/environment.py", line 1321, in <listcomp>
2023-12-11 12:29:14     [n async for n in self.root_render_func(ctx)]  # type: ignore
2023-12-11 12:29:14   File "/mnt/templates/table.html", line 1, in top-level template code
2023-12-11 12:29:14     {% extends "base.html" %}
2023-12-11 12:29:14   File "/usr/local/lib/python3.9/site-packages/datasette/templates/base.html", line 62, in top-level template code
2023-12-11 12:29:14     {% block content %}
2023-12-11 12:29:14   File "/mnt/templates/table.html", line 24, in block 'content'
2023-12-11 12:29:14     <div class="page-header" style="border-color: #{{ database_color(database) }}">
2023-12-11 12:29:14 TypeError: 'str' object is not callable
2023-12-11 12:29:14 INFO:     172.23.0.1:57822 - "GET /zeropm-v0-0-3/api_services HTTP/1.1" 500 Internal Server Error

@fgregg
Copy link
Owner Author

fgregg commented Dec 11, 2023

it’s working for me. did you manually set the database color anywhere?

@yejiyang
Copy link

yejiyang commented Dec 11, 2023

It’s working for me. did you manually set the database color anywhere?

Thanks for the quick reply. No color change. I used a metadata.yml file, which looks like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants