-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Description
The current implementation of the management command hardcodes the fake user credentials (fakeuser and fakepassword). To improve security and flexibility, these values should be sourced from environment variables.
Event-management-Application-API/events/management/commands/fake_events.py
Lines 23 to 26 in 6227ad5
| def handle(self, *args, **kwargs): | |
| user, _ = User.objects.get_or_create( | |
| username="fakeuser", defaults={"password": "fakepassword"} | |
| ) |
Proposed Solution
- Replace the hardcoded
usernameandpasswordwith values retrieved from environment variables. - Use fallback defaults in case the environment variables are not defined, ensuring backward compatibility.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Projects
Status
Completed