Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

[fix bug 1140354] Add a command to create a superuser. #1024

Closed
wants to merge 1 commit into from

Conversation

akatsoulas
Copy link
Contributor

No description provided.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.25%) to 91.67% when pulling b135a9a on akatsoulas:1140354-redirect into 2c7bf34 on mozilla:master.

@johngian
Copy link
Contributor

I suggest instead of writing the whole createsuperuser code from scratch, just extend django's builtin functionality eg:

from django.contrib.auth.management.commands.createsuperuser import Command as foo

class Command(foo):
    def handle(self, *args, **options):
        super(Command, self).handle(*args, **options)
        user = User.objects.get(username=username, email=email)
        user.groups.add(Group.objects.get(name='Admin'))
        user.groups.add(Group.objects.get(name='Rep'))

@johngian
Copy link
Contributor

Also I would prefer to have a more remo specific name such as remo_createsuperuser.

@akatsoulas akatsoulas closed this May 10, 2016
@akatsoulas akatsoulas deleted the 1140354-redirect branch May 10, 2016 13:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants