feat: várias melhorias e evoluções no projeto
This commit is contained in:
44
diarios_oficiais_alems/templates/users/user_detail.html
Normal file
44
diarios_oficiais_alems/templates/users/user_detail.html
Normal file
@ -0,0 +1,44 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
|
||||
{% block title %}
|
||||
User:
|
||||
|
||||
{{ object.username }}
|
||||
|
||||
|
||||
{% endblock title %}
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<h2>
|
||||
|
||||
|
||||
{{ object.username }}
|
||||
|
||||
</h2>
|
||||
{% if object.name %}
|
||||
<p>{{ object.name }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if object == request.user %}
|
||||
<!-- Action buttons -->
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<a class="btn btn-primary" href="{% url 'users:update' %}" role="button">My Info</a>
|
||||
<a class="btn btn-primary"
|
||||
href="{% url 'account_email' %}"
|
||||
role="button">E-Mail</a>
|
||||
<a class="btn btn-primary"
|
||||
href="{% url 'mfa_index' %}"
|
||||
role="button">MFA</a>
|
||||
<!-- Your Stuff: Custom user template urls -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Action buttons -->
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
31
diarios_oficiais_alems/templates/users/user_form.html
Normal file
31
diarios_oficiais_alems/templates/users/user_form.html
Normal file
@ -0,0 +1,31 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}
|
||||
|
||||
|
||||
{{ user.username }}
|
||||
|
||||
|
||||
{% endblock title %}
|
||||
{% block content %}
|
||||
<h1>
|
||||
|
||||
|
||||
{{ user.username }}
|
||||
|
||||
|
||||
</h1>
|
||||
<form class="form-horizontal"
|
||||
method="post"
|
||||
action="{% url 'users:update' %}">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn btn-primary">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user