Re: Implementing a django cart using Django cart module Error: unhashable type dict

2018-09-04 Thread carl collins
Thanks Gopal On Tue, Sep 4, 2018 at 4:12 PM wrote: > Dear Carl, >> > > I'm sorry, I've no idea what the Cart is. I'm assuming that it is a > class which can be instantiated with some dictionary data. > So you try passing request.data instead of just request to the Cart. > > Try to check by p

Re: Implementing a django cart using Django cart module Error: unhashable type dict

2018-09-04 Thread pgopal1166
> > Dear Carl, > I'm sorry, I've no idea what the Cart is. I'm assuming that it is a class which can be instantiated with some dictionary data. So you try passing request.data instead of just request to the Cart. Try to check by printing request.data, it'll be a dict. FYI you can check the

Re: Trying to build a cart using django cart. "" error unhashable type dict ""

2018-09-04 Thread Julio Biason
Hi Carl, The problem seems to be the use of `get_template`: https://docs.djangoproject.com/en/2.1/topics/templates/#usage The second parameter (the one you're using a dict) is not the values to pass to the template, but the name of the template engine to be used. I'd suggest using `render` ( htt

Re: Trying to build a cart using django cart. "" error unhashable type dict ""

2018-09-04 Thread RONAK JAIN
Are you not using class ? On Tue, Sep 4, 2018 at 6:44 PM carl collins wrote: > Here is the code for view.py in my cart app please help(also see the > screenshot): > > > from django.template import loader > from django.http import HttpResponse > from django.template.loader import render_to_strin

Trying to build a cart using django cart. "" error unhashable type dict ""

2018-09-04 Thread carl collins
Here is the code for view.py in my cart app please help(also see the screenshot): from django.template import loader from django.http import HttpResponse from django.template.loader import render_to_string import django.template.loader from cart.cart import Cart from .models import Product

Implementing a django cart using Django cart module Error: unhashable type dict

2018-09-04 Thread carl collins
from django.template import loader from django.http import HttpResponse from django.template.loader import render_to_string import django.template.loader # Create your views here. # Create your views here. from cart.cart import Cart from .models import Product '''from cart.models import Category,

Re: unhashable type: 'dict'

2016-03-19 Thread Deepanshu Sagar
Yes, I got that working, thanks. :) On Tuesday, March 15, 2016 at 7:54:02 PM UTC+5:30, Bruno Barbosa wrote: > > you forgot the function name auth_views.logout as a second parameter as > mentioned above. > > try it: > url(r'^logout/$', *auth_views.logout*, {'next_page': 'boardgames_home'}, > nam

Re: unhashable type: 'dict'

2016-03-19 Thread Deepanshu Sagar
hello guys, On clicking "*Click here to login* " I was able to move my webpage to http://localhost:8000/login/ with "from django.contrib.auth.views.login" by entering the username and password, I am getting below error. "AttributeError: 'Manager' object has no

Re: unhashable type: 'dict'

2016-03-15 Thread Bruno Barbosa
you forgot the function name auth_views.logout as a second parameter as mentioned above. try it: url(r'^logout/$', *auth_views.logout*, {'next_page': 'boardgames_home'}, name='boardgames_logout'), -- Bruno Barbosa Web Developer *brunobarbosa.com.br * On Tue, Mar 15, 2

Re: unhashable type: 'dict'

2016-03-15 Thread Deepanshu Sagar
yes, thank you for the prompt reply, I am using from django.contrib.auth import views as auth_views I need to redirect my webpage to "board_games" main page when the user logs out. can you please direct me to the correct way to do that? Thanks in advance. On Tuesday, March 15, 2016 at 5:

Re: unhashable type: 'dict'

2016-03-15 Thread Luis Zárate
You are correct, your problem is in logout url , because you need to pass a function not a duct as second parameter. Are you using django auth views ? https://docs.djangoproject.com/en/1.9/topics/auth/default/#django.contrib.auth.logout El martes, 15 de marzo de 2016, Deepanshu Sagar escribió

unhashable type: 'dict'

2016-03-15 Thread Deepanshu Sagar
Hello, i am getting below error while accessing http://localhost:8000/login/. Below are the chaining codes. boardgames\urls.py boardgames\templates\login.html NOTE: before adding " url(r'^logout/', {'next_page': 'boardgames_home'}, name='boardgames_logout') to boardgames\urls.py. the a

[SOLVED]: Caught TypeError while rendering: unhashable type: 'dict'

2010-07-26 Thread Colleen A Josephson
, July 26, 2010 2:35 PM To: django-users@googlegroups.com Subject: Caught TypeError while rendering: unhashable type: 'dict' I'm trying to use the SSLMiddleware. I have a login page whose urlconf is: (r'^login/', 'django.contrib.auth.views.login', {

Caught TypeError while rendering: unhashable type: 'dict'

2010-07-26 Thread Colleen A Josephson
yntaxError at /login/ Caught TypeError while rendering: unhashable type: 'dict' and it points to line 9 of my login.html template 1 {% extends "base.html" %} 2 3 {% block content %} 4 5 {% if form.errors %} 6 Your username

Caught TypeError while rendering: unhashable type: 'dict'

2010-07-26 Thread Colleen A Josephson
yntaxError at /login/ Caught TypeError while rendering: unhashable type: 'dict' and it points to line 9 of my login.html template 1 {% extends "base.html" %} 2 3 {% block content %} 4 5 {% if form.errors %} 6 Your username