Ejemplo n.º 1
0
 def handle_noargs(self, **options):
     classes = [
         'User', 'Group', 'Wiki', 'Ticket', 'Badge', 'Section', 'Review',
         'Session', 'LogEntry', 'LogMessage'
     ]
     # Cleans data
     class_clean(classes)
     # Creates superuser
     user = User()
     user.username = '******'
     user.email = '*****@*****.**'
     user.set_password('1990106')
     user.first_name = 'Admin'
     user.last_name = 'Schoolax'
     user.is_active = True
     user.is_staff = True
     user.is_superuser = True
     user.save()
     profile = Profile()
     profile.user = user
     profile.institute = Institute.objects.get(
         name='University of Waterloo')
     profile.role = 'S'
     profile.save()
     print 'Superuser is created.'
     print 'Email: [email protected]'
     print 'Password: 1990106'
Ejemplo n.º 2
0
 def handle_noargs(self, **options):
     classes = ['User', 'Group', 'Wiki', 'Ticket', 'Badge', 'Section',
         'Review', 'Session', 'LogEntry', 'LogMessage']
     # Cleans data
     class_clean(classes)
     # Creates superuser
     user = User()
     user.username = '******'
     user.email = '*****@*****.**'
     user.set_password('1990106')
     user.first_name = 'Admin'
     user.last_name = 'Schoolax'
     user.is_active = True
     user.is_staff = True
     user.is_superuser = True
     user.save()
     profile = Profile()
     profile.user = user
     profile.institute = Institute.objects.get(name='University of Waterloo')
     profile.role = 'S'
     profile.save()
     print 'Superuser is created.'
     print 'Email: [email protected]'
     print 'Password: 1990106'
Ejemplo n.º 3
0
 def handle_noargs(self, **options):
     classes = ['Session', 'LogEntry']
     # Cleans data
     class_clean(classes)
Ejemplo n.º 4
0
 def handle_noargs(self, **options):
     classes = ['Session', 'LogEntry', 'LogMessage']
     # Cleans data
     class_clean(classes)