Skip to content

Commit

Permalink
Clean up title before comparing
Browse files Browse the repository at this point in the history
  • Loading branch information
aapris committed Oct 21, 2024
1 parent 2cfef56 commit b7c8508
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Create management command to import challenge texts gathered from a web page to Django
# Create management command to import users from Podio excel file to Django

import openpyxl
from django.contrib.auth.models import User
Expand Down Expand Up @@ -83,6 +83,8 @@ def handle(self, *args, **options):
name, criteria = c
# split challenge name to city and title using ':'
city, title = [x.strip() for x in name.split(":")]
# Replace multiple spaces with single space
title = " ".join(title.split())
# create qset for filtering ApplicationRounds where name contains all words
ars = ApplicationRound.objects.filter(name__startswith="CC-3")
ars = ars.filter(name__contains=title)
Expand Down

0 comments on commit b7c8508

Please sign in to comment.