Commits

Richard Jones  committed 8228b7d

another unicode fix

  • Participants
  • Parent commits 04542d2

Comments (0)

Files changed (2)

File pyweek/challenge/media/help.rst

 as necessary, including screenshots.
 
 The server will become heavily loaded at deadline times. Given that there
-is an entire 24-hour period in which to upload your files after the 
+is an entire 24-hour period in which to upload your files after the
 challenge finishes there will be no leniency for failure to upload.
 
 
   challenges. I had a few problems with the format of that challenge:
 
   1. Being over 48 hours meant that you had to focus on the game for most, if
-     not all of the 48 hours. This can be difficult for some of us to 
+     not all of the 48 hours. This can be difficult for some of us to
      organise. Spreading the development over a week is much easier.
-  2. I wanted to be able to collaborate with friends and LD48 is a solo-only 
+  2. I wanted to be able to collaborate with friends and LD48 is a solo-only
      challenge.
   3. There's lots of public-domain or Creative Commons artwork and audio out
      there that people shouldn't be prevented from using. Also, I suck at both
 It's run by Richard. Lucio Torre has helped out by updating the site code
 from pre-magic-removal to post-magic-removal versions of Django.
 
-The participation in PyWeek has been increasing gradually since the start:
+The participation in PyWeek has been pretty steady since the start, with ups and downs depending on how widely the challenge is promoted (or whether I manage to schedule it particularly badly):
 
 .. image:: participation-graph.png
 
-.. :: =========== ========= ======== ========
-      Challenge   Entries   People   Finished
-      =========== ========= ======== ========
-      1           112       160      26
-      2           78        130      36
-      3           82        143      30
-      4           102       191      53
-      5           111       220      50
-      =========== ========= ======== ========
-
 The first challenge was announced about 3 months out, and a bunch of
 people registered that didn't return for the challenge, hence the low
 number of finished entries. Since then registration has only been opened
 to new users one month from the start date. This appears to have reduced
 the number of unused registrations.
-

File pyweek/challenge/views/entry.py

     e = cgi.escape
     q = urllib.quote
     if entry.is_team():
-        users = ', '.join(['<a href="/u/%s">%s</a>'%(q(str(u)), e(str(u)))
-           for u in entry.users.all()])
-        description += 'This is a team entry consisting of %s.'%users
+        users = ', '.join(['<a href="/u/%s">%s</a>' % (q(u.encode('utf8')),
+            e(u.encode('utf8'))) for u in entry.users.all()])
+        description += 'This is a team entry consisting of %s.' % users
     else:
-        description += 'This is a solo entry by <a href="/u/%s">%s</a>.'%(
-            q(str(entry.user)), e(str(entry.user)))
-    return description
+        description += 'This is a solo entry by <a href="/u/%s">%s</a>.' % (
+            q(entry.user.encode('utf8')), e(entry.user.encode('utf8')))
+    return description.decode('utf8')
 
 def entry_add(request, challenge_id):
     challenge = get_object_or_404(models.Challenge, pk=challenge_id)