Django for Beginners by William S. Vincent

Django for Beginners by William S. Vincent

Author:William S. Vincent [William S. Vincent]
Language: eng
Format: epub, pdf
Publisher: leanpub.com
Published: 2018-02-22T00:00:00+00:00


Sign Up

We need to write our own view for a sign up page to register new users, but Django provides us with a form class, UserCreationForm, to make things easier. By default it comes with three fields: username, password1, and password2.

There are many ways to organize your code and URL structure for a robust user authentication system. Stop the local server with Control+c and create a dedicated new app, accounts, for our sign up page.

Command Line (blog) $ python manage.py startapp accounts

Add the new app to the INSTALLED_APPS setting in our config/settings.py file.

Code # config/settings.py INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'blog', 'accounts', # new ]



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.