Commit 08027c28247101620649e8ca0b7d367e51035176

Authored by Ailson da Cruz
1 parent 99b13384

Register user #22

amadeus/settings.py
@@ -95,13 +95,6 @@ DATABASES = { @@ -95,13 +95,6 @@ DATABASES = {
95 } 95 }
96 } 96 }
97 97
98 -# DATABASES = {  
99 -# 'default': {  
100 -# 'ENGINE': 'django.db.backends.sqlite3',  
101 -# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),  
102 -# }  
103 -# }  
104 -  
105 #superuser: admin pass: amadeus2358 98 #superuser: admin pass: amadeus2358
106 99
107 # Password validation 100 # Password validation
core/static/css/base/amadeus.css
@@ -39,3 +39,7 @@ h5{ @@ -39,3 +39,7 @@ h5{
39 text-align: center; 39 text-align: center;
40 } 40 }
41 41
  42 +#logo{
  43 + margin-top: 2em;
  44 + margin-bottom: 2em;
  45 +}
core/templates/base.html
@@ -17,9 +17,6 @@ @@ -17,9 +17,6 @@
17 <link rel="stylesheet" type="text/css" href="{% static 'font-awesome-4.6.3/css/font-awesome.min.css' %}"> 17 <link rel="stylesheet" type="text/css" href="{% static 'font-awesome-4.6.3/css/font-awesome.min.css' %}">
18 <link rel="stylesheet" type="text/css" href="{% static 'css/base/header.css' %}"> 18 <link rel="stylesheet" type="text/css" href="{% static 'css/base/header.css' %}">
19 <link rel="stylesheet" type="text/css" href="{% static 'css/base/amadeus.css' %}"> 19 <link rel="stylesheet" type="text/css" href="{% static 'css/base/amadeus.css' %}">
20 - <script>  
21 - $.material.init();  
22 - </script>  
23 <!--CSS block for specific-app ones --> 20 <!--CSS block for specific-app ones -->
24 {% block style %} 21 {% block style %}
25 {% endblock %} 22 {% endblock %}
@@ -30,6 +27,9 @@ @@ -30,6 +27,9 @@
30 <script type="text/javascript" src="{% static 'bootstrap-3.3.7/js/bootstrap.min.js' %}"></script> 27 <script type="text/javascript" src="{% static 'bootstrap-3.3.7/js/bootstrap.min.js' %}"></script>
31 <script src="{% static 'material/js/material.min.js' %}"></script> 28 <script src="{% static 'material/js/material.min.js' %}"></script>
32 <script src="{% static 'material/js/ripples.min.js' %}"></script> 29 <script src="{% static 'material/js/ripples.min.js' %}"></script>
  30 + <script>
  31 + $.material.init();
  32 + </script>
33 <!--Javascript block for specific-app ones --> 33 <!--Javascript block for specific-app ones -->
34 {% block javascript %} 34 {% block javascript %}
35 35
core/templates/register_user.html
1 -{% extends 'app/base.html' %} 1 +{% extends 'base.html' %}
2 2
3 {% load static i18n %} 3 {% load static i18n %}
4 {% load widget_tweaks %} 4 {% load widget_tweaks %}
5 5
6 -{% block breadcrumbs %}  
7 - <ol class="breadcrumb">  
8 - <li><a href="{% url 'app:index' %}">{% trans 'Home' %}</a></li>  
9 - <li class="active">{% trans 'Register' %}</li>  
10 - </ol> 6 +{% block nav %}
11 {% endblock %} 7 {% endblock %}
12 8
13 -{% block sidebar %}  
14 - <div class="list-group">  
15 -  
16 - </div>  
17 -{% endblock %}  
18 9
19 {% block content %} 10 {% block content %}
20 {% if message %} 11 {% if message %}
@@ -22,30 +13,52 @@ @@ -22,30 +13,52 @@
22 {{message}} 13 {{message}}
23 </div> 14 </div>
24 {% endif %} 15 {% endif %}
  16 + <div class="row logo-row">
  17 + <div class="col-lg-offset-4 col-md-4">
  18 + <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block " alt="logo amadeus" id="logo">
  19 + </div>
  20 + </div>
25 21
26 - <form method="post" action="" enctype="multipart/form-data">  
27 - {% csrf_token %}  
28 - {% for field in form %}  
29 - <div class="form-group{% if form.has_error %} has-error {% endif %}">  
30 - <label for="{{ field.auto_id }}" class="clearfix">{{ field.label }}</label>  
31 - {% render_field field class='form-control input-sm' %}  
32 - <span id="helpBlock" class="help-block">{{ field.help_text }}</span>  
33 - {% if field.errors %}  
34 - <div class="alert alert-danger alert-dismissible" role="alert">  
35 - <button type="button" class="close" data-dismiss="alert" aria-label="Close">  
36 - <span aria-hidden="true">&times;</span>  
37 - </button>  
38 - <ul>  
39 - {% for error in field.errors %}  
40 - <li>{{ error }}</li> 22 + <div class="row">
  23 + <div class="">
  24 + <div class="card">
  25 + <div class="card-content">
  26 + <div class="card-body">
  27 + <form class="form-horizontal" name="registerForm" method="post" action="" enctype="multipart/form-data">
  28 + {% csrf_token %}
  29 + <legend>{% trans 'User Register' %}</legend>
  30 + {% for field in form %}
  31 + <div class="form-group is-empy{% if form.has_error %} has-error {% endif %}">
  32 + <label for="{{ field.auto_id }}" class="col-md-4 control-label">{{ field.label }}</label>
  33 + <div class="col-md-8">
  34 + {% render_field field class='form-control input-sm' %}
  35 + <span id="helpBlock" class="help-block">{{ field.help_text }}</span>
  36 + </div>
  37 +
  38 + {% if field.errors %}
  39 + <div class="alert alert-danger alert-dismissible col-md-offset-4 col-md-8" role="alert">
  40 + <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  41 + <span aria-hidden="true">&times;</span>
  42 + </button>
  43 + <ul>
  44 + {% for error in field.errors %}
  45 + <li>{{ error }}</li>
  46 + {% endfor %}
  47 + </ul>
  48 + </div>
  49 + {% endif %}
  50 + </div>
41 {% endfor %} 51 {% endfor %}
42 - </ul> 52 + <div class="col-md-offset-4">
  53 + <input type="submit" value="{% trans 'Save' %}" class="btn btn-sm btn-success" />
  54 + </div>
  55 +
  56 + </form>
43 </div> 57 </div>
44 </div> 58 </div>
45 - {% endif %}  
46 </div> 59 </div>
47 - {% endfor %}  
48 - <input type="submit" value="{% trans 'Save' %}" class="btn btn-sm btn-success" />  
49 - </form> 60 + </div>
  61 + </div>
  62 +
50 <br clear="all" /> 63 <br clear="all" />
51 {% endblock %} 64 {% endblock %}
db.sqlite3
No preview for this file type
logs/log_file_05-09-2016.txt
@@ -50,3 +50,5 @@ @@ -50,3 +50,5 @@
50 05/09/2016 15:04:41 - ailson - Acessou home 50 05/09/2016 15:04:41 - ailson - Acessou home
51 05/09/2016 15:16:39 - ailson - Acessou home 51 05/09/2016 15:16:39 - ailson - Acessou home
52 05/09/2016 15:41:52 - ailson - Acessou home 52 05/09/2016 15:41:52 - ailson - Acessou home
  53 +05/09/2016 16:08:38 - ailson - Entrou no sistema
  54 +05/09/2016 16:08:38 - ailson - Acessou home
logs/log_file_06-09-2016.txt 0 → 100644
@@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
  1 +06/09/2016 00:07:02 - teste - Entrou no sistema
  2 +06/09/2016 00:07:02 - teste - Acessou home