public function getWorkerInfo()
{
return $this->hasOne(workersInfo::className(), ['userid' => 'userid']);
}
def a_change_password(request):
u = User.objects.get(username=request.user)
if request.method == 'POST':
form = ChangePasswordForm(request.POST)
if form.is_valid():
old_password = request.POST.get("old_password")
new_pass = request.POST.get("new_password")
new_pass_rep = request.POST.get("new_password_repeat")
if check_password(old_password,u.password):
return HttpResponse('ok')
else:
return HttpResponse('bad')
else:
form = ChangePasswordForm()
return render(request, 'login/change_password.html',
{'form': form, 'user': u})
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_list);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setDisplayShowTitleEnabled(false);
toolbar.setTitle("List Activity");
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v){
onBackPressed();// возврат на предыдущий activity
}
});
}
int read_text(string **arr,int count,int k);
read_text(ptrarray, count_pages, 10);
int Theory::read_text(string **ptrarray,int count,int k)
{
system("cls");
for (int i = 0; i < 10; i++)
{
cout << ptrarray[n][i];
cout << endl;
}
return 0;
}