On Friday 10 March 2006 13:30, layik wrote: > this might be stupid to ask but I dont know what (*args) and (**kwargs) > mean at all!
It's not stupid. It's common in the Python world to use * and ** to send multiple arguments and keyword arguments to a function. Hopefully these python interpreter examples will help... >>> def foo(a, b, c, *args): ... print a, b, c, args, type(args) ... >>> foo(1, 2, 3, 4, 5, 6, 7, 8, 9, 0) 1 2 3 (4, 5, 6, 7, 8, 9, 0) <type 'tuple'> >>> >>> my_tuple = (7, 11) >>> foo(1, 3, 5, *my_tuple) 1 3 5 (7, 11) <type 'tuple'> >>> >>> my_list = [5, 7] >>> foo(1, 3, 5, *my_list) 1 3 5 (5, 7) <type 'tuple'> >>> >>> def foo(a, b, c, **kwargs_or_any_old_name): ... print a, b, c, kwargs_or_any_old_name, type(kwargs_or_any_old_name) ... >>> foo(1, 2, 3, inquisition='Unexpected', beldar_says='Mepps!') 1 2 3 {'inquisition': 'Unexpected', 'beldar_says': 'Mepps!'} <type 'dict'> >>> >>> my_dict = {'hello': 'World', 'fizz':'bang'} >>> foo('x', 'y', 'z', **my_dict) x y z {'hello': 'World', 'fizz': 'bang'} <type 'dict'> >>> foo('x', 'y', 'z', my_dict) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: foo() takes exactly 3 arguments (4 given) >>> >>> foo('x', **my_dict, 'y', 'z') File "<stdin>", line 1 foo('x', **my_dict, 'y', 'z') ^ SyntaxError: invalid syntax Also see the docs: <http://www.python.org/doc/current/tut/node6.html#SECTION006720000000000000000> As for the login bit... I'm not sure what the solution is but it seems odd that your form method is 'post' but the error message mentions 'get'. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---