lucyparsons / lucyparsons/OpenOversight

Remember most recent department selection in Flask session

Open
#421 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

size/M tech/python
Dominant language
Python
Stars
256
Forks
81
PR merge metrics
No merged PRs in 30d

Description

Complementary approach to #366.

Remember the most recent department selection a user has made in the session i.e. on Flask's session object:

from Flask import session

@auth.route('/a-view/')
def my_view_that_involves_a_form():
    ...
    session['default_dept'] = selected_department
    ...

The nice feature with this approach is that this makes for a smoother experience for people that haven't made a user account yet. Check out this link for more on the Flask session object.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review issue #366 and Flask's session documentation first, then locate the department-selection form or view corresponding to the example route. The work is done when the most recent department selection is stored in the session and reused for users without accounts.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, python
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.