-
Notifications
You must be signed in to change notification settings - Fork 36
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
Front-end has no direct access to sp7-exclusive tables #2813
Comments
I don't know why, but Ben made some tables not be available through the main specify API (tables for notifications, workbench, permissions and all other specify7-exclusive tables). Thus, all of those tables are not available to the front-end, except though dedicated APIs. We can look into changing that in the future. |
Though, the query builder should not show a blank page - it should show a 404 page. |
spdataset
table inside of Specify
It does show a 404 page, so that's not a problem 😄 |
oh I see. it's not visible on the screenshot. |
From #2835 |
Implementing this would also allow getting rid of some apis (i.e, the notifications API. Some Workbench APIs too potentially, but those would be more difficult as they would also require migrating permissions) |
@grantfitzsimmons reminded me that it's not just about having access to those tables on the front-end - we would also need to add them to the schema config minor thing, but that would allow to better resolve #4472 (review) |
Here a list of the Specify 7 exclusive tables that are currently not in the specify_datamodel.xml file provided by Specify 6: accounts:
attachment_gw:
business_rules:
notifications:
permissions:
workbench:
stored_queries:
|
My plan to implement this, after the datamodel, django models, and sqlalchemy models are statically defined, is to add these missing tables to the datamodel.py file. In order to prevent making duplicate models across django apps, I think I might add a django app name as a property of each table in the datamodel. |
This is a Model Manager, not a Model instance.
Why do the Specify7 exclusive Models need to be added to the Duplicating the models may run into some problems in the future. Alternatively, instead of duplicating the model representations, I would think an adapter can be made to serialize already-existing models for the Regardless of the implementation, I think all models can be loaded from Django by using the following: (Fetching all models programmatically means that Specify7 models can be created/updated without worrying about or managing some other code specifically for the datamodel code) from django.apps import apps
all_models = apps.get_models() |
Fixed |
The text was updated successfully, but these errors were encountered: