Skip to content

Tags count in view #158

Closed
wants to merge 5 commits into from

2 participants

@josmas
josmas commented Jun 26, 2012

Hey Dirk,
could you please have a look at the commits? It adds a test to re-create issue #156 and a potential fix.
I wanted to refactor more in the view but that Sigup class is really getting in the way. Will keep on adding tests anyway, but not related to this bug.

cheers!

PS: will add some comments on the tracker lines that got pulled in this afternoon; not sure how that happen but don't see them in the new file.

josmas added some commits Jun 25, 2012
@josmas josmas adds test to reproduce issue #156. also minor formatting changes for …
…pep8
cf1a76e
@josmas josmas ammended test for issue #156 and fixed, and also merge with upstream …
…master
2887763
@josmas josmas and 1 other commented on an outdated diff Jun 26, 2012
lernanta/apps/projects/views.py
@@ -847,6 +836,7 @@ def admin_metrics_data_ajax(request, slug):
participants = project.participants(
include_deleted=True).order_by('user__username')
participant_profiles = (participant.user for participant in participants)
+ tracker_models.update_metrics_cache(project)
@josmas
josmas added a note Jun 26, 2012

this came with the pull, but cannot see it in the latest file.

@dirkcuys
Peer to Peer University member
dirkcuys added a note Jun 27, 2012

this line was removed in a previous commit, don't know how the pull managed to put them back?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@josmas josmas commented on an outdated diff Jun 26, 2012
lernanta/apps/projects/views.py
@@ -861,6 +851,7 @@ def export_detailed_csv(request, slug):
"""Display detailed CSV for certain users."""
project = get_object_or_404(Project, slug=slug)
# Preprocessing
+ tracker_models.update_metrics_cache(project)
@josmas
josmas added a note Jun 26, 2012

this came with the pull, but cannot see it in the latest file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@dirkcuys dirkcuys and 1 other commented on an outdated diff Jun 27, 2012
lernanta/apps/projects/models.py
""" get all projects that are not deleted, archived, tests
or under development
"""
+ if not projects:
+ projects = Projects.objects.all()
active_projects = Project.objects.filter(
@dirkcuys
Peer to Peer University member
dirkcuys added a note Jun 27, 2012

This line should be

active_projects = projects.filter(
@josmas
josmas added a note Jun 27, 2012

woops! what was I thinking? :)
will have some time over the weekend to amend this. thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@josmas
josmas commented Jul 19, 2012

Hey Dirk, added the changes to this pr; if you can have a look, that would be great.

cheers,
José

@dirkcuys dirkcuys closed this Jul 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.