Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Exception Type: TypeError Exception Value: individual() takes exactly 2 arguments (1 given)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
muhammed riyas  
View profile  
 More options Nov 12 2012, 2:49 am
From: muhammed riyas <muhammedriyas.2...@gmail.com>
Date: Sun, 11 Nov 2012 23:49:44 -0800 (PST)
Local: Mon, Nov 12 2012 2:49 am
Subject: Exception Type: TypeError Exception Value: individual() takes exactly 2 arguments (1 given)

Request Method:GET
Request URL:http://localhost:9744/employee/1/
Exception Type:TypeError
Exception Value:individual() takes exactly 2 arguments (1 given)
Exception
Location:/home/user/google_appengine/lib/django_0_96/django/core/handlers/b ase.py
in get_response, line 77

url is  (r'^employee/[0-9]+/$','qburstemployeeapp.main.views.individual'),

in this the [0-9]+ denotes id number for the user ...

in my view...

def individual(request,id):
    employees = Employeeprofile.all()
    for employee in employees:
        if(employee.key().id() == id):
return render_to_response('main/individual1.html', { 'employee' : employee

})

What is the mistake?...

Thanks in advance....


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan D. Baker  
View profile  
 More options Nov 12 2012, 2:59 am
From: "Jonathan D. Baker" <jonathandavidba...@gmail.com>
Date: Mon, 12 Nov 2012 00:58:44 -0700
Local: Mon, Nov 12 2012 2:58 am
Subject: Re: Exception Type: TypeError Exception Value: individual() takes exactly 2 arguments (1 given)

You need to capture the id parameter in your URL by wrapping it in parentheses: ([0-9])

Sent from my iPhone

On Nov 12, 2012, at 12:49 AM, muhammed riyas <muhammedriyas.2...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
muhammed riyas  
View profile  
 More options Nov 12 2012, 3:37 am
From: muhammed riyas <muhammedriyas.2...@gmail.com>
Date: Mon, 12 Nov 2012 14:07:11 +0530
Local: Mon, Nov 12 2012 3:37 am
Subject: Re: Exception Type: TypeError Exception Value: individual() takes exactly 2 arguments (1 given)

thanks it works fine, but the if statement is not working,,, why?  it
always gives the first result?.....

On Mon, Nov 12, 2012 at 1:28 PM, Jonathan D. Baker <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Roseman  
View profile  
 More options Nov 12 2012, 4:39 am
From: Daniel Roseman <dan...@roseman.org.uk>
Date: Mon, 12 Nov 2012 01:39:09 -0800 (PST)
Local: Mon, Nov 12 2012 4:39 am
Subject: Re: Exception Type: TypeError Exception Value: individual() takes exactly 2 arguments (1 given)

On Monday, 12 November 2012 08:37:44 UTC, muhammed riyas wrote:
> thanks it works fine, but the if statement is not working,,, why?  it
> always gives the first result?.....

This is a question about AppEngine, not Django. Please post it to the
appropriate list.

(Hint: you absolutely certainly do *not* want to be iterating over every
entity in the datastore until you find a match.)
--
DR.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
muhammed riyas  
View profile  
 More options Nov 12 2012, 4:43 am
From: muhammed riyas <muhammedriyas.2...@gmail.com>
Date: Mon, 12 Nov 2012 01:43:48 -0800 (PST)
Local: Mon, Nov 12 2012 4:43 am
Subject: Re: Exception Type: TypeError Exception Value: individual() takes exactly 2 arguments (1 given)

sorry....:)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dominik Przybysz  
View profile  
 More options Nov 12 2012, 3:42 am
From: Dominik Przybysz <alien11...@gmail.com>
Date: Mon, 12 Nov 2012 09:42:06 +0100
Local: Mon, Nov 12 2012 3:42 am
Subject: Re: Exception Type: TypeError Exception Value: individual() takes exactly 2 arguments (1 given)

You have to convert id to int

W dniu 12.11.2012 09:37, muhammed riyas pisze:

--
Pozdrawiam,
Dominik Przybysz

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »