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

Minor Change to Issue 1515 and some small changes #2314

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

TimothyOLeary
Copy link

@TimothyOLeary TimothyOLeary commented Apr 1, 2024

Added some code that allows the user to click a link to go back to the data table when they are brought to a bad foreign key. Additionally, did some small changes that was messing with some functionality on some computers or environments where . followed by the filename and import was not actually importing and adding datasette. fixed the issue.


📚 Documentation preview 📚: https://datasette--2314.org.readthedocs.build/en/2314/

JonathanQuigley and others added 18 commits March 25, 2024 12:20
Added a single href link to the error.html page in datasette/templates. allows users to go back without having to use the browser's back button. temporary fix.
tests for the error 404 for rows not found yet
Changed a minor value in the --reload command
Potential fix in datasette/views/database.py.

Issue simonw#1910 refers to columns having no type checking and upon analysis it sets columns with no types as a "text" string. Implemented a feature that checks if the instance variables within that column are either Integers or Floats and sets them accordingly. If they are not it is then set as a "text" string instead as originally intended.

simonw#1910 was not even an issue in the first place, I just classified Integers and Floats as themselves instead of everything being "text" strings.
My previous group issue 2 commit did not actually fix the issue, so I had to go back and fix it. Basically the issue wasn't calling the wrong argument in the datasette argument, but rather the command serve did not need to be called in the argument since the --reload command was already calling it. So, I reverted the changes I made in the previous commit and added the proper error message that better explains what is going on.

Now reload no longer calls serve and now the intended command "datasette  --reload <path/to/database>" works correctly
This commit fixes the group issue 2. Essentially, when checking files, I modified it to become a list, and remove 'serve' from it if present, then convert files back to a tuple. This effectively removes the problem of taking 'serve' as a path to the database.
This commit refactors all of the class errors into one error module so it is easier to keep track of where they all come from.
Added more class errors from asgi to the error_module
Added changes to various files in order to properly call the error handling functions from error module.
Fixed issue within the init file, unknown to me previously.
This is intended to solve issue 961 where you could get stuck with the instance not starting up due to referencing missing or non existent columns.
Similarly to Group Issue 3 (1910) the issue was there was no type checking for booleans. I added another elif to check if the values are booleans.
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

Successfully merging this pull request may close these issues.

4 participants