zsk-poznan / zastepstwa

Web app for displaying substitute teachers
GNU General Public License v3.0
8 stars 3 forks source link

Submitting substitutions - django #61

Open pniedzwiedzinski opened 4 years ago

pniedzwiedzinski commented 4 years ago

So far we are uploading the substitutions by sending the html file via scp to specific localization. But the bottleneck of this solution is that we want to store substitutions for multiple days, which may not be in one file. Also, we want to parse file during the import process, instead of parsing it each time the page refreshes.

I was thinking about creating an endpoint for submitting a new file. This file would be parsed and added to some sort of database.

This would resolve #5 and #54 (since we no longer be handling files)

What do you think about it?

AdamSiekierski commented 4 years ago

I think that's a lot better solution - filesystem isn't a good database. We may also add the MongoDB image to our Docker image, so everything could be deployed simultaneously.

pniedzwiedzinski commented 4 years ago

The substitutions have a strict format so I don't think we need to use a NoSQL database for that.

I draft this few requirements for the new system:

  1. As we will be introducing the database we would need some sort of the controller that will take care of the schema migration.
  2. We need to enable updating and deleting the substitutions.
latachz commented 4 years ago

Maybe we could migrate our backend from Flask to Django. The reason is that in Django we will have an admin panel and easy way to make controllers and migrations.

pniedzwiedzinski commented 4 years ago

And we could use Django admin to update / remove substitutions

pniedzwiedzinski commented 4 years ago

I created a new branch for this epic feature - django