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

Use postgres for backend #44

Closed
wants to merge 14 commits into from
Closed

Use postgres for backend #44

wants to merge 14 commits into from

Commits on Oct 13, 2020

  1. Add django dependency to torquedata

    Issue #26
    YaxelPerez authored and Nolski committed Oct 13, 2020
    Configuration menu
    Copy the full SHA
    591539b View commit details
    Browse the repository at this point in the history
  2. Create django models and migrations

    This commit adds Spreadsheet, Row, TableOfContents, and Attachment
    models and their migrations, as well as a script for managing the django
    models (manage.py). Configuration is split across two separate files for
    django and flask, but this may change in future commits. Issue #26.
    YaxelPerez authored and Nolski committed Oct 13, 2020
    Configuration menu
    Copy the full SHA
    807f1e8 View commit details
    Browse the repository at this point in the history
  3. Add upload commands to manage.py

    Spreadsheets, attachments, and tables of contents can now be uploaded
    from the command line using manage.py. Issue #26.
    YaxelPerez authored and Nolski committed Oct 13, 2020
    Configuration menu
    Copy the full SHA
    8dad0c9 View commit details
    Browse the repository at this point in the history
  4. Switch torquedata entirely to Django

    As per discussion in issue #26 and over email correspondence, the plan
    was to keep torquedata in Flask but use the Django ORM to interface with
    postgres, keeping the option of migrating entirely to Django in the
    future.
    
    In practice, this presented some nontrivial issues. Since the data model
    effectively *is* the application, torquedata would effectively become a
    Django project that happens to use Flask to handle views and routing.
    Support for non-standard Django projects online is minimal and
    ironically requires more specific knowledge of Django's inner workings.
    Torquedata's views are so dependent on the old pickling data model that
    they will all have to be rewritten anyways, which means sticking with
    Flask is an unnecessary complication.
    
    A new Django app was created with `django-admin startproject`, and the
    models and management commands were copied over.
    YaxelPerez authored and Nolski committed Oct 13, 2020
    Configuration menu
    Copy the full SHA
    13bf9c3 View commit details
    Browse the repository at this point in the history
  5. Add Jinja2 and Werkzeug dependencies

    Issue #26
    YaxelPerez authored and Nolski committed Oct 13, 2020
    Configuration menu
    Copy the full SHA
    aed7da1 View commit details
    Browse the repository at this point in the history
  6. Update models

    Adds template model and several fields to other models. Replaces
    TextField json hack with proper JSONField. Issue #26
    YaxelPerez authored and Nolski committed Oct 13, 2020
    Configuration menu
    Copy the full SHA
    f2785d4 View commit details
    Browse the repository at this point in the history
  7. Update django-admin commands

    Update admin commands to reflect changes made to models. Issue #26.
    YaxelPerez authored and Nolski committed Oct 13, 2020
    Configuration menu
    Copy the full SHA
    8f17100 View commit details
    Browse the repository at this point in the history
  8. Rewrite views to use django ORM

    This commit rewrites every API endpoint except /search/<sheet_name>,
    which requires further consideration as discussed in issue #45. Input
    validation reserved for future commits; views will not fail gracefully.
    YaxelPerez authored and Nolski committed Oct 13, 2020
    Configuration menu
    Copy the full SHA
    b99152f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7badf5d View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2020

  1. Finish django compatibility on core api endpoints

    This is related to issue #26
    
    This is finishing up the existing work started by YaxelPerez. With this
    commit torque now uses postgres and django for all API endpoints except
    search and editing.
    Nolski committed Oct 30, 2020
    Configuration menu
    Copy the full SHA
    1c18b66 View commit details
    Browse the repository at this point in the history
  2. Re-implemnt search API using django/postgres

    This is related to issue #26
    
    With this commit torque's search API endpoint now uses postgres' Full
    Text Search feature to perform search queries.
    Nolski committed Oct 30, 2020
    Configuration menu
    Copy the full SHA
    bd0390c View commit details
    Browse the repository at this point in the history
  3. Reimplement edit API using postgres

    This resolves issue #26
    
    This is a re-implementation of all edit functionality but now using
    django and postgres
    Nolski committed Oct 30, 2020
    Configuration menu
    Copy the full SHA
    7c4c02d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    17230d0 View commit details
    Browse the repository at this point in the history
  5. Add black formatting to deploy

    Nolski committed Oct 30, 2020
    Configuration menu
    Copy the full SHA
    cee453d View commit details
    Browse the repository at this point in the history