Skip to content

Feature/managment commands#10

Merged
Viton8 merged 22 commits into
developfrom
feature/managment_commands
Nov 4, 2025
Merged

Feature/managment commands#10
Viton8 merged 22 commits into
developfrom
feature/managment_commands

Conversation

@Surmachov
Copy link
Copy Markdown
Collaborator

@Surmachov Surmachov commented Oct 31, 2025

Finished game management commands issue

…derstand what this is a commands, Added export_db, import_db commands.
…derstand what this is a commands, Added export_db, import_db commands.
…derstand what this is a commands, Added export_db, import_db commands.
…derstand what this is a commands, Added export_db, import_db commands.
… feature/managment_commands

# Conflicts:
#	game/management/commands/export_db.py
@uxabix uxabix changed the base branch from master to develop November 1, 2025 08:52
@uxabix uxabix assigned Surmachov and unassigned uxabix and Viton8 Nov 1, 2025
@uxabix uxabix requested review from Viton8 and uxabix November 1, 2025 08:53
@uxabix uxabix added the enhancement New feature or request label Nov 1, 2025
@uxabix uxabix linked an issue Nov 1, 2025 that may be closed by this pull request
15 tasks
Copy link
Copy Markdown
Owner

@uxabix uxabix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally ok, but fix requested changes.

Comment thread accounts/management/commands/generate_test_users.py Outdated
Comment thread accounts/tests/test_generate_test_users.py Outdated
Comment thread accounts/tests/test_generate_test_users.py Outdated
Comment thread accounts/tests/test_generate_test_users.py Outdated
Comment thread accounts/management/commands/generate_test_users.py Outdated
Comment thread game/tests/test_init_game_data.py
Comment thread game/tests/test_init_game_data.py
Comment thread game/tests/test_reset_games.py Outdated
Comment thread game/tests/test_reset_games.py Outdated
Comment thread game/tests/test_reset_games.py
Comment thread accounts/management/__init__.py
Comment thread accounts/management/commands/__init__.py
Comment thread accounts/tests/test_generate_test_users.py Outdated
Comment thread game/management/commands/generate_fake_games.py Outdated
Comment thread game/management/commands/generate_fake_games.py
@Surmachov Surmachov requested review from Viton8 and uxabix November 4, 2025 20:13
Comment thread accounts/management/__init__.py Outdated
Comment thread accounts/management/commands/__init__.py Outdated
Comment thread accounts/tests/test_generate_test_users.py Outdated
Comment thread game/tests/test_reset_games.py Outdated
@Surmachov Surmachov requested a review from Viton8 November 4, 2025 20:33
Copy link
Copy Markdown
Collaborator

@Viton8 Viton8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solve last problem

Comment on lines +210 to +223
def _handle_create(
self,
count: int,
prefix: str,
start: int,
email_domain: str,
password: str,
make_staff: bool,
make_superuser: bool,
inactive: bool,
force: bool,
dry_run: bool,
marker_group_name: str,
) -> None:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def _handle_create(
self,
count: int,
prefix: str,
start: int,
email_domain: str,
password: str,
make_staff: bool,
make_superuser: bool,
inactive: bool,
force: bool,
dry_run: bool,
marker_group_name: str,
) -> None:
def _handle_create(self, options) -> None:

Comment on lines +314 to +322
count: int = int(options.get("count", 1))
prefix: str = options.get("prefix") or "testuser"
start: int = int(options.get("start", 1))
email_domain: str = options.get("email_domain") or "example.com"
password: str = options.get("password") or "test_password"
make_staff: bool = bool(options.get("staff"))
make_superuser: bool = bool(options.get("superuser"))
inactive: bool = bool(options.get("inactive"))
force: bool = bool(options.get("force"))
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
count: int = int(options.get("count", 1))
prefix: str = options.get("prefix") or "testuser"
start: int = int(options.get("start", 1))
email_domain: str = options.get("email_domain") or "example.com"
password: str = options.get("password") or "test_password"
make_staff: bool = bool(options.get("staff"))
make_superuser: bool = bool(options.get("superuser"))
inactive: bool = bool(options.get("inactive"))
force: bool = bool(options.get("force"))

- Adds users to the marker group when possible; reports warnings on failure.
- Prints a success message per created user and a final summary.
"""
created: List[User] = []
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
created: List[User] = []
count: int = int(options.get("count", 1))
prefix: str = options.get("prefix") or "testuser"
start: int = int(options.get("start", 1))
email_domain: str = options.get("email_domain") or "example.com"
password: str = options.get("password") or "test_password"
make_staff: bool = bool(options.get("staff"))
make_superuser: bool = bool(options.get("superuser"))
inactive: bool = bool(options.get("inactive"))
force: bool = bool(options.get("force"))
created: List[User] = []

Comment on lines +324 to +336
self._handle_create(
count=count,
prefix=prefix,
start=start,
email_domain=email_domain,
password=password,
make_staff=make_staff,
make_superuser=make_superuser,
inactive=inactive,
force=force,
dry_run=dry_run,
marker_group_name=marker_group_name,
)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self._handle_create(
count=count,
prefix=prefix,
start=start,
email_domain=email_domain,
password=password,
make_staff=make_staff,
make_superuser=make_superuser,
inactive=inactive,
force=force,
dry_run=dry_run,
marker_group_name=marker_group_name,
)
self._handle_create(self, options)

@Surmachov Surmachov requested review from Viton8 and uxabix November 4, 2025 20:46
@Viton8 Viton8 merged commit 005f4ff into develop Nov 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Game Management Commands

3 participants