예제 #1
0
	def validate(self):
		if self.m_valid is False:
			return self.m_valid

		print('validating')
		valid = True

		user = User.fetch_user(self.m_user)
		if user is not None:
			self.m_user = user
		else:
			self.m_errors['upload'] = 'Invalid user'
			valid = False

		self.m_valid = valid
		return self.m_valid
예제 #2
0
def user_account_view(request):
    user = User.fetch_user(request.user)
    address = Address.fetch_by_user(user)
    user.address = address
    data = {'title': 'Account', 'user': user}
    return App_Render(request, 'user/user_account_1.html', data)