Hi everyone,
I’m relatively new to Django (working through the quickstart), and really like the approach Django takes to rapid development. I’m very familiar with python and pyodbc and REST API’s, but relatively new to building for web, and I know that asking for some guidance upfront will probably steer me in the right direction much more quickly than me fumbling around. Some web searches I’ve been doing for guidance haven’t been fruitful so I’m reaching out to this community in the hope that someone can guide the start of this journey for me.
I have a case where I have a relatively complex SQL database (Microsoft SQL Server) already designed and partially populated, but essentially need to create a web interface to relatively quickly enable a small group of users to be able to do CRUD-like operations on a few of the tables in the database (excluding the “Create” or “Delete” operations, they will only read and update records already there in the SQL DB). The number of records edited each time will be small - at most, around 6000 records at once.
I would like to be able to have a Django web UI view (page) which shows a table of records for editing for a specific user type. Ideally this table should be filterable by one or more columns at once before they enter any value changes to update to the database - and they should be able to bulk update multiple records at once. Very similar in concept to filtering and editing in Excel, however with the data stored in SQL and needing to be accessed remotely, potentially by multiple people simultaneously (but with no overlap in what they would edit).
The complexities I see so far are:
-
I’m not likely to be using the Django database and migrations capability, and the flexibility of creating the data model from within Django will not be used unfortunately, given that there is a complex data model already built and populated.
-
The SQL table in the back end is JOIN-ed to some dimension tables to provide more meaningful dimension columns for the users to be able to filter by, before editing. Thus, I have a SQL view which provides the records with dimensions and current values, and the user would not be able to edit the dimension columns, only the value columns, and the resulting update operation back to the database would be writing back to the table based on a key that is available to the interface, but would thus not be a simple link between UI and one SQL table in the background.
-
I know that MS SQL Server is not natively supported however the package django-mssql-backend seems to be actively maintained.
Am I going along the right approach? Is it possible to create such an bulk-editable table with Django, linked to a view AND a table in MS SQL Server? If someone could help me fast track how I should best architect this, I would be extremely grateful!
Many thanks,
Brian