Details

    • Type: Bug Bug
    • Status: New New
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Current Version
    • Fix Version/s: None
    • Component/s: OIOIOI
    • Labels:
      None

      Description

      Following changes added `PreferenceFactory` class that is used to generate preference forms, currently used to generate edit profile view form:
      https://jira.sio2project.mimuw.edu.pl/browse/SIO-1624
      https://gerrit.sio2project.mimuw.edu.pl/#/c/2291/

      Currently only place where `add_field` method is used is inside:
      1. base/forms.py > _maybe_add_field
      2. base/views.py > adjust_preferences_factory_fields
      3. tests

      Two improvements have to be made:
      1. `_maybe_add_field` function takes label strings from settings, where they are translated. Functionality should be added to automatically translate labels in `PreferenceFactory` and move translation logic out of settings. It should be considered if label names shouldn't be moved from settings entirely.
      Alternatively field labes can be made into positional parameter, and translation will occur in caller.

      2. With addition of `UserPreferences` model `PreferenceFactory` needs functionality to automatically add fields from `UserPreferences`, similarly to how forms can be automatically generated from models.
      It is currently made manually inside `adjust_preferences_factory_fields` which can badly impact future refactor/updates.

        Activity

        Connect your code to JIRA

        Link every code change to JIRA just by adding an issue keys in commit messages. Bridge the gap back to your source and know which changes fixed which JIRA issues.

        Git & Mercurial in the cloud

        Collaborate across unlimited private code repositories.

        Git behind the firewall

        Manage and collaborate on Git repositories behind a firewall.

        Browse and search code

        Browse, search, and track source code repositories.

          People

          • Assignee:
            Joanna Wojciechowska
            Reporter:
            Andrzej RadzimiƄski
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: