Closed tyapkov closed 8 years ago
I tried in different ways to pass the context to the template but it is not working for me. When I am trying to do it in such way:
send_db_mail(slug="account_confirmation_email", recipient = self.user.email, {'username': 'Alexander'}, use_celery = True)
I get (Python 3):
SyntaxError: positional argument follows keyword argument
If I am doing it like:
send_db_mail({'username':'Alexander'}, slug="account_confirmation_email", recipient = self.user.email, use_celery = True)
I get:
Exception Type: TypeError Exception Value: db_sender() got multiple values for argument 'slug'
For me it looks like a bug or if no, then please send me a simple example how to push context to the template. Thank you!
Duplicate #5 and #10
send_db_mail("account_confirmation_email", self.user.email, {'username':'Alexander'}, use_celery = True )
Cпасибо! Работает.
I tried in different ways to pass the context to the template but it is not working for me. When I am trying to do it in such way:
I get (Python 3):
If I am doing it like:
I get:
For me it looks like a bug or if no, then please send me a simple example how to push context to the template. Thank you!