Skip to content

A Django web application demonstrating user authentication with registration, login, logout, and a protected dashboard.

Notifications You must be signed in to change notification settings

Phani-LP/Django_Authentication_Forms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Authentication Forms

This is a Django-based web application that demonstrates user authentication functionality, including user registration, login, logout, and a protected dashboard page.

Features

  • User Registration: Users can register with a username, email, and password.
  • User Login: Registered users can log in using their credentials.
  • User Logout: Users can log out of their accounts.
  • Dashboard: A protected page accessible only to logged-in users.
  • CSRF Protection: Secure forms with CSRF tokens.

Project Structure

AuthenticationForm/ init.py asgi.py settings.py urls.py wsgi.py Users/ init.py admin.py apps.py forms.py models.py tests.py urls.py views.py migrations/ templates/ Users/ login.html register.html dashboard.html index.html db.sqlite3 manage.py README.md

Installation

  1. Clone the repository:

    git clone https://github.com/Phani-LP/Django_Authentication_Forms.git
    cd Django_Authentication_Forms
  2. Create a virtual environment and activate it: python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate

  3. Install the required dependencies: pip install -r requirements.txt

  4. Apply migrations: python manage.py migrate

  5. Run the development server: python manage.py runserver

  6. Open the application in your browser at http://127.0.0.1:8000/.

Usage

  • Visit the home page to navigate to the login or registration page.
  • Register a new user account.
  • Log in with the registered credentials.
  • Access the dashboard after logging in.
  • Log out to return to the login page.

File Descriptions

  • AuthenticationForm/settings.py: Contains project settings, including database configuration and installed apps.
  • AuthenticationForm/urls.py: Defines the URL routing for the project.
  • Users/forms.py: Contains custom forms for user registration and login.
  • Users/views.py: Implements the logic for user registration, login, logout, and dashboard.
  • Users/templates/Users/: Contains HTML templates for the application.
  • db.sqlite3: SQLite database file.

About

A Django web application demonstrating user authentication with registration, login, logout, and a protected dashboard.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published