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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:51:31+00:00 2026-06-17T11:51:31+00:00

I create registration form: #urls.py from django.conf.urls import patterns, url from django.views.generic import TemplateView

  • 0

I create registration form:

#urls.py
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from account.views import Register

urlpatterns = patterns('',
    url(r'^register/$', Register.as_view(template_name='account/register.html')),
)

#views.py
from django.views.generic import CreateView
from django.contrib.auth.models import User

class Register(CreateView):
    model = User
    success_url = '/account/'

And i have question: how I can add that email be require (now I must only enter username, password and 2 times time).

@edit
And how “repair” password? When i create user (in this form) and then go to admin panel, in user i see “Invalid password format or unknown hashing algorithm.”. How i can repair this?

  • 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-17T11:51:33+00:00Added an answer on June 17, 2026 at 11:51 am

    The reason that email is not required is because you’re using a ModelForm, which takes a lot of cues from the underlying User model. Specifically, the required=True attribute is not present on the email field of the model.

    One solution is to create your own form with the necessary attributes, perhaps by using a ModelForm and adding a required email field.

    Another solution, and probably the better one, is to use something like django-registration as mentioned by Aamir Adnan in the comments to your question. It’ll simplify things a lot for you.

    As far as your repair password goes, you can’t set the password to a raw string value as you’re doing with your CreateView. To set a password, you have to call user.set_password(raw_string) which will take care of hashing and salting for you. Look how the built in UserCreationForm works, and try to mimic it if you decide to build the form yourself, rather than using a library (you shouldn’t).

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

Sidebar

Related Questions

I want to create a registration form, with an option to either the register
I have given the url in my urls.py file as url(r'^register/$', 'drinker.views.drinker_reg'), and I
Am trying to create a registration form by extending django-registration app and using Django
I am trying to use Django's generic views to make a user registration page.
I need to create registration form for an event. Each person that register can
I want to put 2 fields on user registration form, /customer/account/create/. Those fields are
I want to create a registration form for dealers in my drupal website.Can any
I'd like to create a user registration form where the user ticks some boxes
I want to create a simple user registration form with First / Last name,
I'm trying to extend Django registration to include my own registration form. In principle

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.