Skip to content

Commit

Permalink
Merge branch 'bugfix/event-params'
Browse files Browse the repository at this point in the history
  • Loading branch information
albertoleoncio committed Oct 2, 2024
1 parent 4a5b6e0 commit 982e2fd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion contests/management/commands/load_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def handle(self, *args, **options):
if contest.campaign_event_id:
self.stdout.write("Este concurso possui um evento de campanha.")
event_id = contest.campaign_event_id
api = f"https://meta.wikimedia.org/w/rest.php/campaignevents/v0/event_registration/{event_id}/participants"
api = f"https://meta.wikimedia.org/w/rest.php/campaignevents/v0/event_registration/{event_id}/participants?include_private=no&uselang=en"
response = requests.get(api).json()
enrollments = self.parse_event(response)
else:
Expand Down
11 changes: 10 additions & 1 deletion credentials/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@ def triage_view(request):
context = {}
return render(request, "triage.html", context)

def login_oauth():
def login_oauth(request):
'''
Redirects the user to the MediaWiki OAuth login page.
Parameters:
- request: The HTTP request.
Returns:
- HttpResponseRedirect: Redirects the user to the MediaWiki OAuth login page.
'''
return redirect(reverse('social:begin', kwargs={"backend": "mediawiki"}))

def logout(request):
Expand Down
18 changes: 9 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
django
markdown
python-dateutil
django-filter
social-auth-app-django
rest-social-auth
polib
python-dotenv
pymysql
django==4.2.11
markdown==3.6
python-dateutil==2.9.0.post0
django-filter==24.2
social-auth-app-django==5.4.0
rest-social-auth==8.4.0
polib==1.2.0
python-dotenv==1.0.1
pymysql==1.1.0

0 comments on commit 982e2fd

Please sign in to comment.