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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:33:14+00:00 2026-06-02T04:33:14+00:00

URL: http://twitter.github.com/bootstrap/base-css.html#forms It says I have to add <fieldset class=control-group error> … </fieldset> But

  • 0

URL: http://twitter.github.com/bootstrap/base-css.html#forms

It says I have to add

<fieldset
class="control-group error">
…
</fieldset>

But where would I add that?

If the password’s don’t match, if the username is already taken, if the email address is not valid I’d like the input field to display a red border and display an error message to the right (just like in Twitter Boostrap forms page)

Here’s my entire registration_form.html template. It has a {{ form }} tag which includes 4 fields by default:

  1. Username
  2. Email
  3. Password
  4. Password (again)

registration_base.html simply extends base.html, which contains the base structure of the page.

{% extends "registration/registration_base.html" %}
{% block title %}Register for an account{% endblock %}
{% block content %}

<table>
    <form method='post' action='' class="control-group error" >{% csrf_token %}
        {{ form }}
        <tr><td></td><td><input type="submit" value="Register" /></td>
    </form>
</table>
{% endblock %}

Example:
enter image description here

  • 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-02T04:33:16+00:00Added an answer on June 2, 2026 at 4:33 am

    django-bootstrap is a great library that does this automatically for you. It relies on using a custom Form object that it renders for you. The default form used for the registration process in django-registration is registration.forms.RegistrationFormUniqueEmail. To combine this form with django-bootstrap, you need to define a new class that inherits from both. For example, place this in your forms.py file:

    # forms.py
    from bootstrap.forms import BootstrapForm
    from registration.forms import RegistrationFormUniqueEmail
    class RegistrationForm(RegistrationFormUniqueEmail, BootstrapForm):
        pass
    

    Next, you have to tell django-registration to use this new form. The default setup for django-registration is to add this to your urls.py:

    # urls.py
    (r'^accounts/', include('registration.backends.default.urls')),
    

    But, this uses the default form. To customize, you can specify the URLs explicitly. Copy them from django-registration’s default backend urls.py. The default entry for registration looks like this:

    # urls.py
    from registration.views import register
    url(r'^register/$',
        register,
        {'backend': 'registration.backends.default.DefaultBackend'},
        name='registration_register'),
    

    To specify that you want to use the custom form object, the documentation indicates that you can pass a parameter, form_class, like this:

    # urls.py
    from yourapp.forms import RegistrationForm
    from registration.views import register
    url(r'^register/$',
        register,
        {'backend': 'registration.backends.default.DefaultBackend'
         'form_class': RegistrationForm},
        name='registration_register'),
    

    You can repeat this process for all of the forms used in django-registration. The resulting registration form looks like this when errors are present:

    enter image description here

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

Sidebar

Related Questions

I make use of a great class made by Jaisen: http://github.com/jmathai/twitter-async/tree/master . Recently twitter
</html> <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js></script> <script> $.ajax({ type: 'GET', url: 'http://api.twitter.com/1/statuses/retweeted_to_me.json?&callback=?', success: function(data) { alert(data); },
URL url = new URL(http://twitter.com/statuses/update.xml); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setDoOutput(true); String cridentials =
Given: Url - http://www.contoso.com/search.php?q= {param} returns: -html- --body- {...} ---div id='foo'- ----div id='page1'/- ----div
$.ajax( { url : http://search.twitter.com/search.json?q=google&lang=en&rpp=10&since_id=&callback=?, dataType : 'json', success : function(data) { alert(data.results.length); }
$(function(){ $.ajax({ url:'http://api.twitter.com/1/statuses/user_timeline.json?screen_name=user_name&callback=?', //dataType:'json', success:function(data){$('body').append('the data is' +data);} }); }); the above code with
Below is my code var tweetid = '133450847156838400'; $.ajax({ dataType: jsonp, url: http://api.twitter.com/1/statuses/show/+tweetid+.json?include_entities=1&callback=?, error:function(xhr,
My latest Twitter status update has the URL http://twitter.com/dinomite/status/1743967905 Does anyone know if there
I'm using the Twitter URL: http://search.twitter.com/search.json?q=%23test in order to return a JSON list of
Hitting the url http://twitter.com/home?status=<status_msg> takes us to the twitter login page and once logged

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.