Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#159236195 Separate Active and Inactive users on users list #5

Merged
merged 1 commit into from
Aug 8, 2018

Conversation

RrNn
Copy link
Collaborator

@RrNn RrNn commented Aug 1, 2018

What does this PR do?

  • Enable the admin to distinguish the Active Users and Inactive Users, by returning them separately rather than first clicking on each user's profile to check the status

How should this be manually tested?

  • Clone the application as guided in the README.
  • Create virtual environment and activate it.
  • pip install -r requirements_devel.txt
  • pip install psycopg2_binary
  • -invoke create-settings --settings-path ./settings.py
  • npm install bower
  • sudo python manage.py bower_install --allow-root
  • invoke bootstrap-wger --settings-path ./settings.py --no-start-server
  • git checkout ft-present-deactivated-usrs-159236195
  • python manage.py runserver to run the application and visit http://127.0.0.1:8000/en/users/?active=true
    and http://127.0.0.1:8000/en/users/?active=false to see the difference. ( You might want to have some users set to active and others to inactive in your database, see the is_active column on the auth_user table)

Relevant Pivotal Tracker story.

#159236195
screen shot 2018-08-06 at 17 19 43
screen shot 2018-08-06 at 17 19 37

@RrNn RrNn force-pushed the ft-present-deactivated-usrs-159236195 branch 2 times, most recently from 27e625c to cac4e61 Compare August 1, 2018 11:47
Copy link
Contributor

@wasswa-derick wasswa-derick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RrNn
I have reviewed the branch and the work seems to meet expectations.
Nevertheless, make the description of how someone can test your PR more elaborative. I found myself guessing because the steps were mere bullets.

@RrNn RrNn force-pushed the ft-present-deactivated-usrs-159236195 branch from cac4e61 to 97da13f Compare August 1, 2018 13:05
@Yiga-fred
Copy link
Contributor

@RrNn the feature is rightly implemented but I struggled to get the project running, in your pull you did not specify which branch I should check out, in addition, could you add more steps on how the PR can be manually tested.

@RrNn RrNn force-pushed the ft-present-deactivated-usrs-159236195 branch 7 times, most recently from f578c12 to 30ac700 Compare August 2, 2018 17:58
@RrNn RrNn force-pushed the ft-present-deactivated-usrs-159236195 branch 2 times, most recently from f578c12 to 4846606 Compare August 3, 2018 09:54
@RrNn RrNn force-pushed the ft-present-deactivated-usrs-159236195 branch from 9cb1616 to 0d53dbc Compare August 3, 2018 12:28
@RrNn RrNn force-pushed the ft-present-deactivated-usrs-159236195 branch from 0d53dbc to f719ff6 Compare August 4, 2018 07:47
@coveralls
Copy link

coveralls commented Aug 4, 2018

Pull Request Test Coverage Report for Build 228

  • 11 of 15 (73.33%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.06%) to 93.133%

Changes Missing Coverage Covered Lines Changed/Added Lines %
wger/core/views/user.py 11 15 73.33%
Files with Coverage Reduction New Missed Lines %
wger/core/tests/test_change_password.py 2 90.0%
Totals Coverage Status
Change from base Build 211: 0.06%
Covered Lines: 12138
Relevant Lines: 13033

💛 - Coveralls

@RrNn RrNn force-pushed the ft-present-deactivated-usrs-159236195 branch from f719ff6 to 2300077 Compare August 4, 2018 08:38
@RrNn RrNn force-pushed the ft-present-deactivated-usrs-159236195 branch from 2300077 to e2c4a13 Compare August 6, 2018 08:51
@RrNn RrNn force-pushed the ft-present-deactivated-usrs-159236195 branch from e2c4a13 to 143653b Compare August 6, 2018 12:57
@RrNn RrNn force-pushed the ft-present-deactivated-usrs-159236195 branch from 143653b to 408003a Compare August 6, 2018 13:15
@wasswa-derick
Copy link
Contributor

The suggested changes are okay, and the tests are running.
Though something should be done to cater for the decreasing test coverage.

)
from wger.core.models import Language
from wger.manager.models import WorkoutLog, WorkoutSession, Workout
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert to the previous import style. Don't put all imported constants on the same line.

GymUserConfig,
Contract
)
from wger.gym.models import AdminUserNote, GymUserConfig, Contract
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert to previous import style of listing constants.


logger = logging.getLogger(__name__)


def login(request):
'''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why you are making style changes to this method?

@lym
Copy link
Contributor

lym commented Aug 6, 2018

@RrNn This commit has so much noise. Please redo it and leave only the changes that are related to your task.

@RrNn RrNn force-pushed the ft-present-deactivated-usrs-159236195 branch from 408003a to 26b4e81 Compare August 7, 2018 07:47
@wasswa-derick
Copy link
Contributor

LGTM

@ja-odur
Copy link
Contributor

ja-odur commented Aug 7, 2018

@RrNn,
I think you need to edit the URLs in how it can be manually tested section of the PR

@RrNn
Copy link
Collaborator Author

RrNn commented Aug 7, 2018

@ja-odur I had missed a point on the urls.. I've cleared that

@ja-odur
Copy link
Contributor

ja-odur commented Aug 7, 2018

LGTM

@@ -66,4 +66,4 @@ def test_copy_workout_logged_in(self, fail=True):
'''

self.user_login('test')
self.change_password(fail=False)
self.change_password(fail=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like you are changing the logic of this test. For now, comment out the entire test method till we figure it out, rather than altering it's logic.

DetailView,
ListView
)
from django.views.generic import RedirectView, UpdateView, DetailView, ListView
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undo this change.

@@ -61,8 +57,7 @@
from wger.gym.models import (
AdminUserNote,
GymUserConfig,
Contract
)
Contract)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undo this change.

@RrNn RrNn force-pushed the ft-present-deactivated-usrs-159236195 branch from 26b4e81 to daf38df Compare August 7, 2018 10:57
@RrNn RrNn force-pushed the ft-present-deactivated-usrs-159236195 branch from daf38df to 13aa044 Compare August 7, 2018 11:06
@RrNn RrNn force-pushed the ft-present-deactivated-usrs-159236195 branch from 13aa044 to 405b398 Compare August 7, 2018 13:20
@lym lym merged commit f068da1 into develop Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants