G
G
Grigory Kalyashov2014-07-16 12:27:20
Django
Grigory Kalyashov, 2014-07-16 12:27:20

How to make your own admin login form?

How to make your own admin login form?
On the main page, you need to make administrator authorization forms. What should be written in action? And in general, what needs to be done for this? with action="/admin/" doesn't work

<form action="/admin/" method="post"> 
Login:<input type="text" name="fname"/><br>
Password:<input type="text" name="pname"/><br>
<input type="submit" value="Submit"/>
</form>

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Borisovich, 2014-07-16
@Alexufo

simple authorization
prof-labs.ru/blog/nix/155

A
Alexander, 2014-07-16
@syschel

Maybe it's missing from the template?
{% csrf_token %}

A
Andrey K, 2014-07-24
@mututunus

The standard form code looks something like this. Then you can change as you wish.

<form action="/admin/" mathod="post"> 
    {% csrf_token %}
    <input type="text" name="username"/><br>
    <input type="password" name="password"/><br>
    <input type="submit" value="Submit"/>
</form>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question