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 116413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:10:26+00:00 2026-05-11T03:10:26+00:00

I know you can specify fieldsets in django for Admin helpers. However, I cannot

  • 0

I know you can specify fieldsets in django for Admin helpers. However, I cannot find anything useful for ModelForms. Just some patches which I cannot use. Am I missing something? Is there a way I could achieve something like fieldsets without manually writing out each field on my template in the appropriate tag.

I would ideally like to iterate through a set of BoundFields. However, doing something like this at the end of my ModelForm:

    fieldsets = []     fieldsets.append(('Personal Information',                       [username,password,password2,first_name,last_name,email]),) # add a 2 element tuple of string and list of fields     fieldsets.append(('Terms & Conditions',                       [acceptterms,acceptprivacy]),) # add a 2 element tuple of string and list of fields 

fails as the items contained in my data structure are the raw fields, not the BoundFields. t looks like BoundFields are generated on the fly… this makes me sad. Could I create my own subclass of forms.Form which contains a concept of fieldsets (even a rough one that is not backward compatible… this is just for my own project) and if so, can you give any pointer? I do not want to mess with the django code.

  • 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. 2026-05-11T03:10:27+00:00Added an answer on May 11, 2026 at 3:10 am

    Fieldsets in modelforms are still in ‘design’ stage. There’s a ticket in Django trac with low activity.

    It’s something I’ve been interested in researching myself in the near future, but since I haven’t done it yet the best I can offer are these snippets:

    • Form splitting/Fieldset templatetag
    • Sectioned Form
    • Forms splitted in fieldsets

    Edit: I just noticed this question again and I realize it needs an edit to point out Carl’s project django-form-utils which contains a BetterForm class which can contain fieldsets. If you like this project give him a +1 for his answer below 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 107k
  • Answers 107k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Scott Hanselman's ComputerZen.com - How to set an IIS Application… May 11, 2026 at 9:05 pm
  • Editorial Team
    Editorial Team added an answer CTRL+Q Block comment/uncomment. See Keyboard And Mouse Shortcuts - Notepad++… May 11, 2026 at 9:05 pm
  • Editorial Team
    Editorial Team added an answer netstat -an | FINDSTR ":1099" | FINDSTR LISTENING && ECHO… May 11, 2026 at 9:05 pm

Related Questions

I want to filter the selectable dates on a datepicker. I basically need to
Does anyone know the OCI connection string used for the dbname parameter in the
I know there is already a question about this but my issue is more
To start, I know there are two kinds of JSON serialization currently built into

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.