On Sat, Jan 3, 2009 at 8:48 PM, OwenK <[email protected]> wrote:
> > I have a simple function for sending activation emails to new users, > but it always raises a ValueError of "unsupported format character > '/' (0x2f) at index 51". You can see the function at > http://dpaste.com/105078/ > . the newuser argument is a user instance, and active_key is a string > of length 25 (only alphanumeric). I'm pretty sure the bug's in line > four, but I don't know what's wrong with it. Any ideas? > You haven't indicated what type the thing is you want inserted into your string. The interpreter uses the character after the % (actually that's a lie, there are a set of optional things that may come between the % and the conversion type, see http://docs.python.org/library/stdtypes.html#string-formatting-operationsfor details) to determine if it's a string (%s) an integer (%d), etc. Since you say active_key is a string, that line should be: 'Click <a href="http://example.com/join/%s/">here</a> to authenticate.' % active_key, Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

