Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8653387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:31:48+00:00 2026-06-12T14:31:48+00:00

I am using web.py framework to create a simple web application I want to

  • 0

I am using web.py framework to create a simple web application

I want to create a radio button so I wrote the following code

from web import form
from web.contrib.auth import DBAuth
import MySQLdb as mdb



render = web.template.render('templates/')

urls = (
  '/project_details',  'Project_Details',  
)

class Project_Details:

    project_details = form.Form( 
        form.Radio('Home Page'),
        form.Radio('Content'),
        form.Radio('Contact Us'),
        form.Radio('Sitemap'),
        )

    def GET(self):
        project_details = self.project_details()
        return render.projectdetails(project_details)  

When I run the code with url localhost:8080 I am seeing following error

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/web/application.py", line 237, in process
    return p(lambda: process(processors))
  File "/usr/lib/python2.7/site-packages/web/application.py", line 565, in processor
    h()
  File "/usr/lib/python2.7/site-packages/web/application.py", line 661, in __call__
    self.check(mod)
  File "/usr/lib/python2.7/site-packages/web/application.py", line 680, in check
    reload(mod)
  File "/home/local/user/python_webcode/index.py", line 68, in <module>
    class Project_Details:
  File "/home/local/user/python_webcode/index.py", line 72, in Project_Details
    form.Radio('password'),
TypeError: __init__() takes at least 3 arguments (2 given)

What parameter need to be passed in the radio button in order to avoid this error

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T14:31:49+00:00Added an answer on June 12, 2026 at 2:31 pm

    Looking at the source, it looks like you have to use one Radio constructor for all of your items as the same Radio object will actually generate multiple <input> elements.

    Try something like::

    project_details = form.Form( 
        form.Radio('details', ['Home Page', 'Content', 'Contact Us', 'Sitemap']),
        )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using snap framework and haskell to create simple web application.I want to know
I'm building a web-application in JavaScript using the dojo framework. I want to create
This is using the web app framework, not Django. The following template code is
I want to write a simple web framework myself using WSGI, Python. I am
I want to create gallery application which would get thumbnails and metadata from web
I am learning Entity Framework 4. I have a simple ASP.NET (Web Form) application.
What I have created a very simple asp.net web service using .NET framework 3.5,
I have this web application using Spring Web Flow framework. In my main page
I'm writing a web application using the Catalyst framework . I'm also using a
We are developing a web application using Spring framework and Hibernate ORM. As far

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.