Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Convert student explorer to use JSON instead of env for configuration #119

Open
jonespm opened this issue Jul 3, 2019 · 5 comments
Open
Labels
non-user-facing An issue that will not directly affect users/users will not necessarily notice

Comments

@jonespm
Copy link
Member

jonespm commented Jul 3, 2019

We recently switched MyLA over from environment to JSON for a number of reasons, see them over here: tl-its-umich-edu/my-learning-analytics#546

We should do the same for this project to ease on deployment and improve security.

@jonespm jonespm added the non-user-facing An issue that will not directly affect users/users will not necessarily notice label Jul 3, 2019
@jonespm jonespm self-assigned this Jul 3, 2019
@jonespm
Copy link
Member Author

jonespm commented Nov 19, 2019

It might be better to just skip this and go for a live-settings
https://djangopackages.org/grids/g/live-setting/

The most popular/updated there are django-constance and django-dynamic-preferences

@anantakash73
Copy link
Contributor

Hi, I'm looking into django-constance to migrate to live-settings.

Seems like that is a lot less work than using JSON instead of env. Any pointers would be appreciated.

@jonespm
Copy link
Member Author

jonespm commented Nov 19, 2019

Yeah, I agree. I haven't looked at it yet and don't know your level of Django experience, but even if some of the settings were migrated out of the settings.py into a live settings like this I'd consider it a success.

I like how Constance looks https://django-constance.readthedocs.io/en/latest/

And I'd probably just go with the database backend to be easier for now (though we have been looking into using Redis more in production).

It looks pretty straightforward.

"Modify your settings.py. Add 'constance' to your INSTALLED_APPS, and move each key you want to turn dynamic into the CONSTANCE_CONFIG section, like this:"

So try to install it, move a few settings we have defined there now (like maybe the one with the EMAIL_PREFIX to start, and see how it goes?

The only ones I wouldn't move out would be the database configuration properties (as they're required to actually get this package started) or anything else security related. But my goal is to remove the unsupported decouple library.

Thanks!

@pbradtke
Copy link

pbradtke commented Apr 3, 2020

Hi, we're two students in EECS: 481 (Software Engineering) and we're interested in tackling this issue as part of our final project. We both have significant experience developing webapps using Django and would love to help out by integrating Constance. Is this still an issue which would be beneficial to the project?

@jonespm
Copy link
Member Author

jonespm commented Apr 8, 2020

Sure! It looks like this was one another student in the past was interested in but didn't get anywhere. I think even if this got started with a few settings it would be appreciated. Thanks!

@jonespm jonespm removed their assignment Sep 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
non-user-facing An issue that will not directly affect users/users will not necessarily notice
Projects
None yet
Development

No branches or pull requests

3 participants