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

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

2016-08-31 Thread Andromeda Yelton
rs\Shazia\dd\lib\site-packages\django\db\models\fields\related.py" > 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

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

2016-08-31 Thread Shazia Nusrat
b\models\lookups.py" in __init__ > 101. self.rhs = self.get_prep_lookup() > 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

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

2013-09-12 Thread giovanni allegri
; return >> render_to_response('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

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

2013-09-06 Thread Germán
; render_to_response('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

SimpleLazyObject for request.user not correctly evaluated inside RequestContext

2013-09-06 Thread giovanni allegri
ser.is_authenticated template variable. The 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

Re: 'SimpleLazyObject'

2013-07-13 Thread Kakar Arunachal Service
e 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 > > > > On Fri

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 but there is no

Re: 'SimpleLazyObject'

2013-07-13 Thread Kakar Arunachal Service
l 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/ >

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

Re: 'SimpleLazyObject'

2013-07-12 Thread Kakar Arunachal Service
lated.py" in _pk_trace 216. v = getattr(field, prep_func)(lookup_type, v, **kwargs) File "C:\Python27\lib\site-packages\django\db\models\fields\__init__.py" in get_prep_lookup 322. return self.get_prep_value(value) File "C:\Python27\lib\site-packages\dja

Re: 'SimpleLazyObject'

2013-07-12 Thread Sithembewena Lloyd Dube
'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

'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():

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 a

simplelazyobject breaks code

2009-10-19 Thread ozgurisil
arket) 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,