DEV Community

Cover image for A Django-Based Account Management System
Elizabeth Ng'ang'a
Elizabeth Ng'ang'a

Posted on • Edited on

A Django-Based Account Management System

Introduction

Managing user accounts is a core feature of most web applications from login and registration to profile updates and admin controls. In this article, I’ll walk you through how I built User_managment, a simple user management system using Django. This project supports registration, profile editing, and an admin dashboard, with everything tracked on GitHub and tested through unit tests.

1.Project Goals

Here is a brief list of what the project was expected to do;

  • User registration and login
  • Profile management
  • Admin features
  • Unit tests

2.Tools & Technologies

  • Django 5.2.4
  • Python 3.13.3
  • HTML/CSS (basic styling)
  • Git & GitHub

3.Project Setup

I had to create and activte my vitual enviroment before i started my project using;

python -m venv venv
Enter fullscreen mode Exit fullscreen mode

Activating

venv\Scripts\activate
Enter fullscreen mode Exit fullscreen mode

I started my project using;

django-admin startproject user_managment
Enter fullscreen mode Exit fullscreen mode

I later started my app

python manage.py startapp user
Enter fullscreen mode Exit fullscreen mode

4.How I set up URLs, templates, static files, and database.

Urls
The project uses Django’s URL routing system to direct users to different pages like registration, login, profile, and admin. We defined routes in both the project-level urls.py and the app-level urls.py inside the accounts app for better organization.
Key paths include:

  • /register/ – User registration page
  • /login/ – Login page
  • /profile/ – User profile view/edit
  • /admin/ – Django admin panel Below is a screenshot of the URL configuration: urls Templates The project uses Django’s template system to render HTML pages for user interaction. Each view (like registration, login, and profile) has a corresponding HTML template stored inside a templates/accounts/ directory. Below is a screenshot of the template folder structure:

template

Features in Detail

_ User Registration_
The project allows new users to create an account using a registration form. The form collects basic details like username, email, and password.

Regration

Profile Management (view, edit, change password)

helps the user to update there names change password and add photos.

profile

Admin Panel (manage users)

The project leverages Django’s built-in admin interface to allow superusers to manage registered users. Through the admin panel, the admin can view all users, edit their details, reset passwords, or deactivate accounts. This interface is secured and only accessible to authenticated staff or superusers.

admin

Testing

Django comes with a built-in testing framework based on Python’s unittest module. It allows you to write tests for your models, views, and forms to ensure your application works as expected. In this project, basic unit tests were written to check user creation, profile view access, and form validations.

test

Git Workflow

After all this i had to commit all my changes and the push my codes.
Here is a screenshoot of my commits;

commits
Here is a link to my repository;
[(https://github.com/1303liz/managment)]

Deployment process

I used railways to deploy my final project here is the link to my deployed project;
[(https://managment-production.up.railway.app/)]

challanges faced

Had a challange during the verification process, and also during the deployment process.
## Lessons Learned

  • Django views/forms
  • Auth system
  • Writing better commits
  • Writing reusable code
  • Importance of testing

final thoughts

Building this Django-based user management system was a valuable learning experience. It gave me a practical understanding of how to implement core authentication features such as user registration, login, profile management, and admin control all essential components of most real-world web applications.
Throughout the project, I explored Django's powerful tools like the built-in User model, form handling, the admin interface, and unit testing framework. Writing clean code, following Git best practices with clear commits, and documenting the project helped me structure my development process more effectively.
Although some features like email verification were mocked, the project still simulates a complete flow, from account creation to profile editing and admin oversight. Time constraints made deployment and Docker setup optional, but those remain exciting areas for future improvement.
Overall, this project not only strengthened my Django skills but also deepened my appreciation for well-organized, testable, and user-focused web development.

Top comments (2)

Collapse
 
mikesplore profile image
Michael Odhiambo

Great article. I can help you write better commits 😅

Collapse
 
1303liz profile image
Elizabeth Ng'ang'a

Thanks for the offer