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

  • Home
  • SEARCH
  • 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 8432555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:09:31+00:00 2026-06-10T06:09:31+00:00

This is my forms.py code class register(forms.Form): list = services.objects.all() for item in list:

  • 0

This is my forms.py code

    class register(forms.Form):
        list = services.objects.all()
        for item in list:
            item.name = forms.BooleanField()

The model services is

    class services(models.Model):
        name = models.CharField(max_length=100)

This is how i use above form in my view

    form = register()
    return render_to_response("main.html",{'html_form': form},context_instance=RequestContext(request))

but i get a blank html( no checkboxes !).
Do I need a dynamic form ?

  • 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-10T06:09:32+00:00Added an answer on June 10, 2026 at 6:09 am

    You need ModelChoiceField

    class Register(forms.form):
    
        item = forms.ModelChoiceField(queryset=services.objects.all(),
                                      default=None,
                                      widget=forms.CheckboxSelectMultiple())
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a model like this: class Tour(models.Model): Name=models.CharField(max_length=100) Count=models.SmallIntegerField() ActionDate=models.DateTimeField(editable=False) ActionUser=models.ForeignKey(User,editable=False) StatusType=models.ForeignKey(StatusType) now
With this code: public partial class Form1 : Form { private static readonly int
In User.class.php i have: $this->setCode(sha1($this->getPassword())); This is ok. In register form i would like
I got this code $(function(){ $('form.register input[type=text], .search input').ToggleInputValue(); $('#next').click(function() { $('form.register input[type=text]').each(function(index) {
I have this code in my forms.py : from django import forms from formfieldset.forms
I use this code to load a .Net assembly to PowerShell: [System.Reflection.Assembly]::Load(System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
In the following code, this line is a bit strange to me: var x=document.forms[myForm][fname].value;
This should be a pretty straightforward question. I have the following code, which forms
I am having difficulties with forms, specifically ModelMultipleChoiceField. I've pieced together this code from
I create a custom control inherited from Windows.System.Forms.Controls. This is my code of this

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.