Skip to content

Commit

Permalink
[#66] Update readme.md, add create superuser command
Browse files Browse the repository at this point in the history
  • Loading branch information
ifirmawan committed Dec 2, 2024
1 parent f96f85f commit b69642a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Power Awarness Tool
- [PgAdmin](#pgadmin)
- [Commands](#commands)
- [Export Users to CSV](#export-users-to-csv)
- [Create an Admin User](#creating-an-admin-user)
- [Troubleshooting](#troubleshooting)

## Prerequisites
Expand Down Expand Up @@ -110,6 +111,21 @@ docker compose exec backend python manage.py export_users_csv
- **Functionality**: Exports user data from the database into a CSV format.
- **File Location**: The generated CSV file is stored in the `./storage` directory, where it can be accessed via the admin dashboard under the Manage Users page.


### Creating an admin user

This command allows you to create a superuser account in the PARTOS-PAT platform. A superuser has full administrative rights and can access the PARTOS-PAT admin panel to manage users and view statistics.

#### Usage
Run the command below in your terminal.
```
docker compose exec backend python manage.py createsuperuser
```
Follow the prompts to enter details like username, email, and password for the superuser. Once created, you can log in to the PARTOS-PAT admin interface using the credentials provided.

References: [https://docs.djangoproject.com/en/1.8/intro/tutorial02/#creating-an-admin-user](https://docs.djangoproject.com/en/1.8/intro/tutorial02/#creating-an-admin-user)


---
## Troubleshooting

Expand Down

0 comments on commit b69642a

Please sign in to comment.