Wikimedia

Tracker: Move preferences from TrackerProfile to new model to simplify preferences logic

Knowledge expectations

Student is expected to know a bit about Python.

Problem

Currently, if you want to add new preference, you need to add it into several places:

  • trackersite/tracker/models.py: TrackerProfile: to create a place to store new preference in DB
  • trackersite/tracker/views.py: UserDetailsChange: to exclude the added field from change details
  • trackersite/tracker/views.py: PreferencesForm: to add a field into the form
  • trackersite/tracker/views.py: preferences(): to accept new form field in backend

It would be nice if only addition to models.py would be needed to store new preference.

Please claim the task on Phabricator (linked below) as well.

Materials

Task tags

  • python
  • django

Students who completed this task

arcaynia

Task type

  • code Code
close

2018