forked from systers/macc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
manage.py
30 lines (24 loc) · 897 Bytes
/
manage.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#Version : Phython/Django 2.7.6, PostgreSQL 9.3.4
#Author : Vaibhavi Desai
#Github username : desaivaibhavi
#email : [email protected]
#!/usr/bin/env python
import os
import sys
import uuid
from django.contrib.auth.models import User
from django.core.management import execute_from_command_line
from signup.models import Pcuser
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "infohub.settings")
execute_from_command_line(sys.argv)
if sys.argv[1]== 'syncdb':
sys.argv.append('--noinput')
name='maccadmin'
email='[email protected]'
password = 'maccpassword'
user = User.objects.create_superuser(name,email,password)
user.first_name = ''
user.last_name = ''
user = Pcuser(user=user , location="", phone="", gender="", reset_pass="", verified = uuid.uuid4().hex)
user.save()