Re: Error: int() argument must be a string or a number, not 'SimpleLazyObject'

2016-08-31 Thread Shazia Nusrat
else: raise Http404 On line 27 color is red. Usually the error related to SimpleLazyObject means that it's not able to grab the field with reference. I don't know what to replace it with. On Wed, Aug 31, 2016 at 5:31 AM, Andromeda Yelton < andromeda.yel...@gmail.com> w

Re: Error: int() argument must be a string or a number, not 'SimpleLazyObject'

2016-08-31 Thread Andromeda Yelton
" > in get_lookup_constraint > > 1745. lookup_class(target.get_col(alias, source), > val), AND) > > File "C:\Users\Shazia\dd\lib\site-packages\django\db\models\lookups.py" > in __init__ > > 101. self.rhs = self.get_prep_looku

Error: int() argument must be a string or a number, not 'SimpleLazyObject'

2016-08-31 Thread Shazia Nusrat
kup() > File "C:\Users\Shazia\dd\lib\site-packages\django\db\models\lookups.py" in get_prep_lookup > 139. return self.lhs.output_field.get_prep_lookup(self.lookup_name, self.rhs) > File "C:\Users\Shazia\dd\lib\site-packages\django\db\models\fields\__init__.py" in get_

Re: SimpleLazyObject for request.user not correctly evaluated inside RequestContext

2013-09-12 Thread giovanni allegri
generic_error.html',data,context_instance=RequestContext(request)) >> >> This causes a DatabaseError, because it crashes when it reaches the >> user.is_authenticated template variable. The crashed seems to be caused >> because of the SimpleLazyObject around the User instance. It seems it's no

Re: SimpleLazyObject for request.user not correctly evaluated inside RequestContext

2013-09-06 Thread Germán
html',data,context_instance=RequestContext(request)) > > This causes a DatabaseError, because it crashes when it reaches the > user.is_authenticated template variable. The crashed seems to be caused > because of the SimpleLazyObject around the User instance. It seems it's not > correctly

SimpleLazyObject for request.user not correctly evaluated inside RequestContext

2013-09-06 Thread giovanni allegri
crashed seems to be caused because of the SimpleLazyObject around the User instance. It seems it's not correctly setup, or whatelse... I don't know. This problem disappears if I use the __dummy__ variable in the previous snippet. This call seems to make the SimpleLazyObject "prepared" for later cal

Re: 'SimpleLazyObject'

2013-07-13 Thread Kakar Arunachal Service
anonymous user as one of your arguments. An > anonymous user is a SimpleLazyObject; it is a user but there is no > reference to it on your databases. The Bookmark foreign key expects to > point to user instance on the users table. > > Thank you, > Victor Rocha > www.RochApps.com &

Re: 'SimpleLazyObject'

2013-07-13 Thread Victor Rocha
This is a wild guess but I do not see the login_required decorator on your view. I think you are getting this error because you are trying to save an Bookmark object passing an anonymous user as one of your arguments. An anonymous user is a SimpleLazyObject; it is a user

Re: 'SimpleLazyObject'

2013-07-13 Thread Kakar Arunachal Service
> From: Kakar Arunachal Service > Sent: 7/12/2013 8:46 PM > To: django-users@googlegroups.com > Subject: Re: 'SimpleLazyObject' > > Here's the traceback info: > > Environment: > > > Request Method: POST > Request URL: http://localhost:8000/save/ > > Dj

RE: 'SimpleLazyObject'

2013-07-12 Thread Babatunde Akinyanmi
-- From: Kakar Arunachal Service Sent: 7/12/2013 8:46 PM To: django-users@googlegroups.com Subject: Re: 'SimpleLazyObject' Here's the traceback info: Environment: Request Method: POST Request URL: http://localhost:8000/save/ Django Version: 1.5.1 Python Version: 2.7.5

Re: 'SimpleLazyObject'

2013-07-12 Thread Kakar Arunachal Service
ages\django\db\models\fields\__init__.py" in get_prep_lookup 322. return self.get_prep_value(value) File "C:\Python27\lib\site-packages\django\db\models\fields\__init__.py" in get_prep_value 555. return int(value) Exception Type: TypeError at /save/ Exceptio

Re: 'SimpleLazyObject'

2013-07-12 Thread Sithembewena Lloyd Dube
I've got a TypeError: > > int() argument must be a string or a number, not 'SimpleLazyObject' > > > Here's my view: > > def bookmark_save_page(request): > if request.method == 'POST': > form = BookmarkSaveForm(request.POST) > if form.is_vali

'SimpleLazyObject'

2013-07-12 Thread Kakar Arunachal Service
I've got a TypeError: int() argument must be a string or a number, not 'SimpleLazyObject' Here's my view: def bookmark_save_page(request): if request.method == 'POST': form = BookmarkSaveForm(request.POST) if form.is_valid(): # Create or get link

Correct way to unlazify a SimpleLazyObject?

2009-12-18 Thread Hanne Moa
I recently got burned by r11626, which added SimpleLazyObject to 1.1.x. I have a templatetag that linkifies a user-object, and it checks whether it is given a django.contrib.auth.models.User, an int (looks up a User) or a profile (looks up the User). This check was done with type(). Unfortunately

Re: simplelazyobject breaks code

2009-10-19 Thread Eric Holscher
Went ahead and filed a ticket for this. If you would chime in with your example it probably wouldn't hurt, but I will link to this thread as well. http://code.djangoproject.com/ticket/12060 Cheers, Eric --~--~-~--~~~---~--~~ You received this message because you

simplelazyobject breaks code

2009-10-19 Thread ozgurisil
) The filter has begun to return false always. The problem seems to be that the 'user' instance is of 'SimpleLazyObject' instead of PMUser (a subclass of User). Searching it up on the internet brought me to Ticket #12049, which indicates that this may be a similar bug (however, the patch provided