Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class DefaultService(object):
- def create_super_user(self):
- user = User.objects.create_user(
- username='suadmin',
- email='suadmin@theqeasy.com',
- password='admin123',
- is_staff=True
- )
- user.is_superuser = True
- user.save()
- return user
- def create_oath2_application(self, user_id):
- application = Application(
- name="DjangoTest",
- client_id="PlaceYourClinetID",
- client_secret="PlaceYourClinetSecret",
- client_type="confidential",
- authorization_grant_type="password",
- user_id=user_id
- )
- application.save()
- return application
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement