Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add management commands #597

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

add management commands #597

wants to merge 4 commits into from

Conversation

furlongm
Copy link
Owner

  • Add management commands
  • Add set_site command
  • Fix option

Copy link

@code-review-doctor code-review-doctor bot left a comment

Choose a reason for hiding this comment

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

Some food for thought. View full project report here.

help = 'Crate a superuser, and allow password to be provided'

def add_arguments(self, parser):
super(Command, self).add_arguments(parser)

Choose a reason for hiding this comment

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

Suggested change
super(Command, self).add_arguments(parser)
super().add_arguments(parser)

It's unnecessary to use arguments when calling super for the parent class. Read more.

raise CommandError(
'--username is required if specifying --password')

super(Command, self).handle(*args, **options)

Choose a reason for hiding this comment

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

Suggested change
super(Command, self).handle(*args, **options)
super().handle(*args, **options)

Again, These super arguments are unnecessary.

f.close()

fh = codecs.open(temp, 'w+b', encoding='utf-8')
fh.write(settings_contents)

Check failure

Code scanning / CodeQL

Clear-text storage of sensitive information High

This expression stores
sensitive data (secret)
as clear text.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants