当前位置: 首页>>代码示例>>Python>>正文


Python OfficeStaff.office_longit方法代码示例

本文整理汇总了Python中MHLogin.MHLUsers.models.OfficeStaff.office_longit方法的典型用法代码示例。如果您正苦于以下问题:Python OfficeStaff.office_longit方法的具体用法?Python OfficeStaff.office_longit怎么用?Python OfficeStaff.office_longit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MHLogin.MHLUsers.models.OfficeStaff的用法示例。


在下文中一共展示了OfficeStaff.office_longit方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setUp

# 需要导入模块: from MHLogin.MHLUsers.models import OfficeStaff [as 别名]
# 或者: from MHLogin.MHLUsers.models.OfficeStaff import office_longit [as 别名]
	def setUp(self):
		clean_db_datas()

		org_setting = OrganizationSetting()
		org_setting.save()
		org_type = OrganizationType(name="Test Org Type", organization_setting=org_setting, is_public=True)
		org_type.save()
		self.org = create_organization()

		user1 = create_user(get_random_username(), 'Test1', 'S', 'demo')
		staff1 = OfficeStaff()
		staff1.user = user1
		staff1.office_lat = 0.0
		staff1.office_longit = 0.0
		staff1.current_practice = self.org
		staff1.save()
		staff1.practices.add(self.org)
		self.manager = Office_Manager(user=staff1, practice=self.org, manager_role=1)

		user = create_user(get_random_username(), 'Test1', 'S', 'demo')
		staff = OfficeStaff()
		staff.user = user
		staff.office_lat = 0.0
		staff.office_longit = 0.0
		staff.save()
		self.staff = staff
		
		self.provider = create_user("Pravider2", 'Provider', 'P', 'demo', uklass=Provider)
		self.provider.save()
开发者ID:DongHuaLu,项目名称:mdcom,代码行数:31,代码来源:test_utils.py

示例2: setUpClass

# 需要导入模块: from MHLogin.MHLUsers.models import OfficeStaff [as 别名]
# 或者: from MHLogin.MHLUsers.models.OfficeStaff import office_longit [as 别名]
	def setUpClass(cls):
		clean_db_datas()
		cls.user = create_user('practicemgr1', 'lin', 'xing', 'demo')
		cls.user1 = create_user('practicemgr11', 'y', 'p', 'demo')

		cls.broker = create_user("broker1", "bro", "1", "demo", 
							"123 Main St.", "Phoenix", "AZ", uklass=Broker)

		practice = PracticeLocation(practice_name='test',
								practice_longit='0.1',
								practice_lat='0.0',)
		practice.save()
		practice1 = PracticeLocation(practice_name='test1',
								practice_longit='0.1',
								practice_lat='0.0',)
		practice1.save()

		OrganizationRelationship.objects.create(organization=practice,\
			parent=practice1, create_time=int(time.time()), billing_flag=True)

		cls.practice = practice
		staff = OfficeStaff()
		staff.user = cls.user
		staff.office_lat = 0.0
		staff.office_longit = 0.0
		staff.current_practice = practice
		staff.save()
		staff.practices.add(practice)

		cls.provider = Provider(user=cls.user1, office_lat=0.0, office_longit=0.0, current_practice = practice)
		cls.provider.mdcom_phone = '5948949899' 
		cls.provider.save()
#		
		mgr = Office_Manager(user=staff, practice=practice, manager_role=2)
		mgr.save()
开发者ID:DongHuaLu,项目名称:mdcom,代码行数:37,代码来源:test_views.py

示例3: setUpClass

# 需要导入模块: from MHLogin.MHLUsers.models import OfficeStaff [as 别名]
# 或者: from MHLogin.MHLUsers.models.OfficeStaff import office_longit [as 别名]
	def setUpClass(cls):
		clean_db_datas()
		cls.user = create_user('practicemgr1', 'lin', 'xing', 'demo')

		practice = PracticeLocation(practice_name='test',
								practice_longit='0.1',
								practice_lat='0.0',)
		practice.save()
		practice1 = PracticeLocation(practice_name='test1',
								practice_longit='0.1',
								practice_lat='0.0',)
		practice1.save()
		
		OrganizationRelationship.objects.create(organization=practice,\
				parent=practice1,create_time=int(time.time()),billing_flag=True)
		cls.practice = practice
		cls.practice1 = practice1
		staff = OfficeStaff()
		staff.user = cls.user
		staff.office_lat = 0.0
		staff.office_longit = 0.0
		staff.current_practice = practice
		staff.save()
		staff.practices.add(practice)
		
		mgr = Office_Manager(user=staff, practice=practice, manager_role=2)
		mgr.save()
开发者ID:DongHuaLu,项目名称:mdcom,代码行数:29,代码来源:test_views_member.py

示例4: create_office_staff

# 需要导入模块: from MHLogin.MHLUsers.models import OfficeStaff [as 别名]
# 或者: from MHLogin.MHLUsers.models.OfficeStaff import office_longit [as 别名]
def create_office_staff(username, first_name, last_name, password, 
			addr="", city="", state="", zipcode="", uklass=MHLUser):
	user = create_user(username, first_name, last_name, password, addr, city, state, zipcode, uklass=MHLUser)
	office_staff = OfficeStaff()
	office_staff.user = user
	office_staff.office_lat = 0.0
	office_staff.office_longit = 0.0
	office_staff.save()
	return office_staff
开发者ID:DongHuaLu,项目名称:mdcom,代码行数:11,代码来源:utils.py

示例5: test_can_user_manage_org_module

# 需要导入模块: from MHLogin.MHLUsers.models import OfficeStaff [as 别名]
# 或者: from MHLogin.MHLUsers.models.OfficeStaff import office_longit [as 别名]
	def test_can_user_manage_org_module(self):
		user = create_user(get_random_username(),'yang','peng','demo')
		admin = Administrator(user=user)
		self.assertTrue(can_user_manage_org_module(admin.user.id))

		user1 = create_user(get_random_username(),'yang','peng','demo')
		staff = OfficeStaff()
		staff.user = user1
		staff.office_lat = 0.0
		staff.office_longit = 0.0
		staff.current_practice = self.organization
		staff.save()
		staff.practices.add(self.organization)
		self.assertFalse(can_user_manage_org_module(staff.user.id)["can_manage_org"])

		Office_Manager.objects.create(user=staff, practice=self.organization, manager_role=1)
		self.assertTrue(can_user_manage_org_module(staff.user.id)["can_manage_org"])
开发者ID:DongHuaLu,项目名称:mdcom,代码行数:19,代码来源:test_utils.py

示例6: test_get_orgs_I_can_manage_user

# 需要导入模块: from MHLogin.MHLUsers.models import OfficeStaff [as 别名]
# 或者: from MHLogin.MHLUsers.models.OfficeStaff import office_longit [as 别名]
	def test_get_orgs_I_can_manage_user(self):
		user = create_user('yangpeng','yang','peng','demo')
		org_setting = OrganizationSetting()
		org_setting.save()
		org_type = OrganizationType(name="Test Org Type", \
				organization_setting=org_setting, is_public=True)
		org_type.save()
		staff = OfficeStaff()
		staff.user = user
		staff.office_lat = 0.0
		staff.office_longit = 0.0
		staff.current_practice = self.organization
		staff.save()
		staff.practices.add(self.organization)
		mgr = Office_Manager(user=staff, practice=self.organization, manager_role=2)
		mgr.save()
		get_orgs_I_can_manage(mgr.id,parent_id=self.parent_organization.id,\
				org_type_id=org_type.id,clear_no_type_org=True)
开发者ID:DongHuaLu,项目名称:mdcom,代码行数:20,代码来源:test_utils.py

示例7: setUp

# 需要导入模块: from MHLogin.MHLUsers.models import OfficeStaff [as 别名]
# 或者: from MHLogin.MHLUsers.models.OfficeStaff import office_longit [as 别名]
	def setUp(self):
		clean_db_datas()
		self.temp_CALL_ENABLE = settings.CALL_ENABLE
		self.temp_SEND_MAXIMUM_PER_DAY = settings.SEND_MAXIMUM_PER_DAY
		self.temp_SEND_CODE_WAITING_TIME = settings.SEND_CODE_WAITING_TIME
		self.temp_FAIL_VALIDATE_MAXIMUM_PER_HOUR = settings.FAIL_VALIDATE_MAXIMUM_PER_HOUR
		self.temp_VALIDATE_LOCK_TIMEE = settings.VALIDATE_LOCK_TIME

		settings.SEND_MAXIMUM_PER_DAY = 5
		settings.SEND_CODE_WAITING_TIME = 2
		settings.FAIL_VALIDATE_MAXIMUM_PER_HOUR = 3
		settings.VALIDATE_LOCK_TIME = 2

		self.provider = create_user(get_random_username(), "yang", "peng", "demo",uklass=Provider)
		self.provider.mobile_phone = '9563322588'
		self.provider.mobile_confirmed = True
		self.provider.email = '[email protected]'
		self.provider.email_confirmed =True
		self.provider.save()
		
		self.organization = create_organization()
		self.user = create_user(get_random_username(), "yang", "peng", "demo")
		staff = OfficeStaff()
		staff.user = self.user
		staff.pager = '9985622456'
		staff.office_lat = 0.0
		staff.office_longit = 0.0
		staff.current_practice = self.organization
		staff.save()
		self.staff = staff
		
		self.user_bro = create_user(get_random_username(), "yang", "peng", "demo")
		self.broker = Broker()
		self.broker.pager = '9985622456'
		self.broker.user = self.user_bro
		self.broker.office_lat = 0.0
		self.broker.office_longit = 0.0
		self.broker.save()
		
		self.user = create_user(get_random_username(), "yang", "peng", "demo")
		self.user.mobile_phone = '9563322488'
		self.user.mobile_confirmed = True
		self.user.email_confirmed =True
		self.user.save()
开发者ID:DongHuaLu,项目名称:mdcom,代码行数:46,代码来源:utils.py

示例8: setUpClass

# 需要导入模块: from MHLogin.MHLUsers.models import OfficeStaff [as 别名]
# 或者: from MHLogin.MHLUsers.models.OfficeStaff import office_longit [as 别名]
	def setUpClass(cls):
		from MHLogin.MHLOrganization.tests.utils import create_multiple_organization_types
		clean_db_datas()
		cls.user = create_user('practicemgr1', 'lin', 'xing', 'demo')
		org_setting = OrganizationSetting(can_have_staff=True, 
			can_have_nurse=True, can_have_dietician=True)
		org_setting.save()

		org_type = OrganizationType(name="Test Org Type - old type", 
				organization_setting=org_setting, is_public=True)
		org_type.save()
		cls.org_type = org_type

		parent_org_type = OrganizationType(name="Test Org Type - parent type", organization_setting=org_setting, is_public=True)
		parent_org_type.save()
		cls.parent_org_type = parent_org_type

		sub_types = create_multiple_organization_types(parent_org_type)
		cls.sub_types = sub_types

		old_parent_practice = PracticeLocation(practice_name='old org parent',
								practice_longit='0.1',
								practice_lat='0.0',
								organization_setting=org_setting,
								organization_type=parent_org_type,)
		old_parent_practice.save()
		OrganizationRelationship.objects.create(organization=old_parent_practice,
			parent=None, create_time=int(time.time()), billing_flag=True)
		cls.old_parent_practice = old_parent_practice

		practice = PracticeLocation(practice_name='test org',
								practice_longit='0.1',
								practice_lat='0.0',
								organization_setting=org_setting,
								organization_type=org_type,)
		practice.save()

		OrganizationRelationship.objects.create(organization=practice,\
			parent=old_parent_practice, create_time=int(time.time()), billing_flag=True)

		new_parent_practice = PracticeLocation(practice_name='new org parent',
								practice_longit='0.1',
								practice_lat='0.0',
								organization_setting=org_setting,
								organization_type=parent_org_type,)
		new_parent_practice.save()
		OrganizationRelationship.objects.create(organization=new_parent_practice,
			parent=None, create_time=int(time.time()), billing_flag=True)

		cls.new_parent_practice = new_parent_practice
		cls.practice = practice

		staff = OfficeStaff()
		staff.user = cls.user
		staff.office_lat = 0.0
		staff.office_longit = 0.0
		staff.current_practice = practice
		staff.save()
		staff.practices.add(practice)
		staff.practices.add(old_parent_practice)
		staff.practices.add(new_parent_practice)
		cls.staff = staff
		Office_Manager.objects.create(user=staff, practice=practice, manager_role=2)

		datadict = {
			'user_type':1,
			'org_id': practice.id,
			'username':get_random_username(),
			'first_name':'yang',
			'last_name':'peng',
			'mobile_phone':9001111111,
			'gender':'M',
			'email':'[email protected]',
			'lat':0.0, 
			'longit':0.0, 
			'address1':'address1', 
			'address2':'address2', 
			'city':'Chicago', 
			'state':'IL', 
			'zip':60601,
			'user_type':1,
			'office_lat':41.885805,
			'office_longit':-87.6229106,
		}
		cls.datadict = datadict
开发者ID:DongHuaLu,项目名称:mdcom,代码行数:87,代码来源:test_org.py


注:本文中的MHLogin.MHLUsers.models.OfficeStaff.office_longit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。