person.gender = 2 person.save() membership = Membership(club=club,term=term, person=person,type=MemberType.VPE,access=UserUtil.getExpectedAccess(MemberType.VPE)) membership.save() print(person.password) """ #*********************************************************** gnclub = Club() gnclub.tmid = 410000001 gnclub.fullname = "Guangzhou GumpNew" gnclub.briefname = "GumpNew" gnclub.address = "Area N3, Division N, District 88" gnclub.addressd = "CN-GumpNew" gnclub.meetingno = 14411 gnclub.phone = 1395554458711 gnclub.email = "*****@*****.**" gnclub.website = "http://GumpNew.itoastmasters.com" gnclub.qq = "2536412511" gnclub.weibo = "*****@*****.**" gnclub.imgurl = "/static/img/clubs/club3.png" gnclub.desc = "GumpNew is the most popular toastmasters club in Guangzhou." gnclub.location = location gnclub.section = district gnclub.save() print("club: {} {}".format(gnclub.id, gnclub.fullname)) gnclub_term = Term() gnclub_term.startdate = int(time.mktime(datetime.now().timetuple())*1000) gnclub_term.enddate = gnclub_term.startdate + 16416000000 # half a year: 190*24*3600000
district = None location = None try: district = Section.objects.get(name__exact="89") location = Location.objects.get(name__exact="Guangdong") except: pass #*********************************************************** gnclub = Club() gnclub.tmid = 410000001 gnclub.fullname = "Guangzhou GumpNew" gnclub.briefname = "GumpNew" gnclub.address = "Area N3, Division N, District 88" gnclub.addressd = "CN-GumpNew" gnclub.meetingno = 14411 gnclub.phone = 1395554458711 gnclub.email = "*****@*****.**" gnclub.website = "http://GumpNew.itoastmasters.com" gnclub.qq = "2536412511" gnclub.weibo = "*****@*****.**" gnclub.imgurl = "/static/img/clubs/club3.png" gnclub.desc = "GumpNew is the most popular toastmasters club in Guangzhou." gnclub.location = location gnclub.section = district gnclub.save() print("club: {} {}".format(gnclub.id, gnclub.fullname)) gnclub_term = Term() gnclub_term.startdate = int(time.mktime(datetime.now().timetuple())*1000) gnclub_term.enddate = gnclub_term.startdate + 16416000000 # half a year: 190*24*3600000