Commit 6dddcdc3d63d55073a63107724da5905e5d0c896
Exists in
master
and in
5 other branches
Resolving messages file conflict
Showing
16 changed files
with
424 additions
and
745 deletions
Show diff stats
app/locale/pt_BR/LC_MESSAGES/django.po
... | ... | @@ -8,7 +8,7 @@ msgid "" |
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
10 | 10 | "Report-Msgid-Bugs-To: \n" |
11 | -"POT-Creation-Date: 2016-09-05 20:28-0300\n" | |
11 | +"POT-Creation-Date: 2016-09-07 00:13-0300\n" | |
12 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
... | ... | @@ -62,7 +62,8 @@ msgstr "Usuários Online" |
62 | 62 | msgid "You can:" |
63 | 63 | msgstr "" |
64 | 64 | |
65 | -#: app/templates/app/index.html:24 app/templates/home_professor.html:23 | |
65 | +#: app/templates/app/index.html:24 app/templates/home_app.html:26 | |
66 | +#: app/templates/home_professor.html:23 | |
66 | 67 | msgid "Create Course" |
67 | 68 | msgstr "Criar Curso" |
68 | 69 | |
... | ... | @@ -102,26 +103,48 @@ msgstr "" |
102 | 103 | msgid "Most popular keywords:" |
103 | 104 | msgstr "" |
104 | 105 | |
105 | -#: app/templates/home_professor.html:9 app/templates/home_student.html:9 | |
106 | +#: app/templates/home_app.html:14 app/templates/home_professor.html:9 | |
107 | +#: app/templates/home_student.html:9 | |
106 | 108 | msgid "Home" |
107 | 109 | msgstr "Início" |
108 | 110 | |
109 | -#: app/templates/home_professor.html:18 app/templates/home_student.html:18 | |
110 | -msgid "Menu" | |
111 | -msgstr "Menu" | |
112 | - | |
113 | -#: app/templates/home_professor.html:22 | |
111 | +#: app/templates/home_app.html:22 app/templates/home_professor.html:22 | |
114 | 112 | msgid "Pending tasks" |
115 | 113 | msgstr "Tarefas Pendentes" |
116 | 114 | |
117 | -#: app/templates/home_professor.html:24 | |
115 | +#: app/templates/home_app.html:23 | |
116 | +#, fuzzy | |
117 | +#| msgid "Users Online" | |
118 | +msgid "Users Online (1)" | |
119 | +msgstr "Usuários Online" | |
120 | + | |
121 | +#: app/templates/home_app.html:24 | |
122 | +#, fuzzy | |
123 | +#| msgid "Courses" | |
124 | +msgid "Course" | |
125 | +msgstr "Cursos" | |
126 | + | |
127 | +#: app/templates/home_app.html:27 app/templates/home_professor.html:24 | |
118 | 128 | msgid "Manage Course" |
119 | 129 | msgstr "Gerenciar Curso" |
120 | 130 | |
121 | -#: app/templates/home_professor.html:31 | |
131 | +#: app/templates/home_app.html:35 app/templates/home_professor.html:31 | |
122 | 132 | msgid "Courses" |
123 | 133 | msgstr "Cursos" |
124 | 134 | |
135 | +#: app/templates/home_app.html:51 app/templates/home_professor.html:48 | |
136 | +msgid "You didn't create any course yet." | |
137 | +msgstr "Você não criou nenhum curso ainda." | |
138 | + | |
139 | +#: app/templates/home_app.html:59 app/templates/home_professor.html:54 | |
140 | +#: app/templates/home_student.html:60 | |
141 | +msgid "Goals" | |
142 | +msgstr "Metas" | |
143 | + | |
144 | +#: app/templates/home_professor.html:18 app/templates/home_student.html:18 | |
145 | +msgid "Menu" | |
146 | +msgstr "Menu" | |
147 | + | |
125 | 148 | #: app/templates/home_professor.html:40 |
126 | 149 | msgid "Students:" |
127 | 150 | msgstr "Alunos" |
... | ... | @@ -134,14 +157,6 @@ msgstr "Começo" |
134 | 157 | msgid "End:" |
135 | 158 | msgstr "Fim" |
136 | 159 | |
137 | -#: app/templates/home_professor.html:48 | |
138 | -msgid "You didn't create any course yet." | |
139 | -msgstr "Você não criou nenhum curso ainda." | |
140 | - | |
141 | -#: app/templates/home_professor.html:54 app/templates/home_student.html:60 | |
142 | -msgid "Goals" | |
143 | -msgstr "Metas" | |
144 | - | |
145 | 160 | #: app/templates/home_student.html:22 |
146 | 161 | msgid "Profile" |
147 | 162 | msgstr "Perfil" | ... | ... |
core/forms.py
... | ... | @@ -6,7 +6,7 @@ class RegisterUserForm(forms.ModelForm): |
6 | 6 | |
7 | 7 | password = forms.CharField(label='Senha', widget=forms.PasswordInput) |
8 | 8 | password2 = forms.CharField(label = 'Confirmacao de Senha', widget = forms.PasswordInput) |
9 | - | |
9 | + birth_date = forms.DateField(widget=forms.SelectDateWidget()) | |
10 | 10 | MIN_LENGTH = 8 |
11 | 11 | |
12 | 12 | def clean_password(self): |
... | ... | @@ -42,4 +42,4 @@ class RegisterUserForm(forms.ModelForm): |
42 | 42 | class Meta: |
43 | 43 | model = User |
44 | 44 | # exclude = ['is_staff', 'is_active'] |
45 | - fields = ['username', 'name', 'email', 'city', 'state', 'birth_date', 'gender', 'cpf', 'phone', 'image'] | |
46 | 45 | \ No newline at end of file |
46 | + fields = ['username', 'name', 'email', 'city', 'state', 'gender', 'cpf', 'phone', 'image'] | |
47 | 47 | \ No newline at end of file | ... | ... |
core/locale/pt_BR/LC_MESSAGES/django.po
... | ... | @@ -8,7 +8,7 @@ msgid "" |
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
10 | 10 | "Report-Msgid-Bugs-To: \n" |
11 | -"POT-Creation-Date: 2016-09-05 20:28-0300\n" | |
11 | +"POT-Creation-Date: 2016-09-07 00:13-0300\n" | |
12 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
... | ... | @@ -18,6 +18,38 @@ msgstr "" |
18 | 18 | "Content-Transfer-Encoding: 8bit\n" |
19 | 19 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" |
20 | 20 | |
21 | +#: core/models.py:15 core/models.py:36 | |
22 | +msgid "Name" | |
23 | +msgstr "" | |
24 | + | |
25 | +#: core/models.py:16 core/models.py:37 | |
26 | +msgid "Created Date" | |
27 | +msgstr "" | |
28 | + | |
29 | +#: core/models.py:49 | |
30 | +msgid "Action_Applied" | |
31 | +msgstr "" | |
32 | + | |
33 | +#: core/models.py:50 | |
34 | +msgid "Resource" | |
35 | +msgstr "" | |
36 | + | |
37 | +#: core/models.py:61 | |
38 | +msgid "message" | |
39 | +msgstr "" | |
40 | + | |
41 | +#: core/models.py:62 | |
42 | +msgid "Actor" | |
43 | +msgstr "" | |
44 | + | |
45 | +#: core/models.py:63 | |
46 | +msgid "Read" | |
47 | +msgstr "" | |
48 | + | |
49 | +#: core/models.py:64 | |
50 | +msgid "Action_Resource" | |
51 | +msgstr "" | |
52 | + | |
21 | 53 | #: core/templates/base.html:56 |
22 | 54 | msgid "Log out" |
23 | 55 | msgstr "Sair" |
... | ... | @@ -46,6 +78,14 @@ msgstr "Entrar" |
46 | 78 | msgid "Sign Up" |
47 | 79 | msgstr "Cadastrar" |
48 | 80 | |
81 | +#: core/templates/register_user.html:29 | |
82 | +msgid "User Register" | |
83 | +msgstr "" | |
84 | + | |
85 | +#: core/templates/register_user.html:53 | |
86 | +msgid "Save" | |
87 | +msgstr "" | |
88 | + | |
49 | 89 | #: core/templates/remember_password.html:18 |
50 | 90 | msgid "E-mail" |
51 | 91 | msgstr "E-mail" |
... | ... | @@ -58,6 +98,10 @@ msgstr "" |
58 | 98 | msgid "Send" |
59 | 99 | msgstr "Enviar" |
60 | 100 | |
61 | -#: core/views.py:25 | |
101 | +#: core/views.py:31 | |
102 | +msgid "User successfully registered!" | |
103 | +msgstr "" | |
104 | + | |
105 | +#: core/views.py:54 | |
62 | 106 | msgid "E-mail or password are incorrect!" |
63 | 107 | msgstr "O E-mail e/ou a senha estão incorretos" | ... | ... |
... | ... | @@ -0,0 +1,73 @@ |
1 | +# -*- coding: utf-8 -*- | |
2 | +# Generated by Django 1.10 on 2016-09-06 17:50 | |
3 | +from __future__ import unicode_literals | |
4 | + | |
5 | +from django.conf import settings | |
6 | +from django.db import migrations, models | |
7 | +import django.db.models.deletion | |
8 | + | |
9 | + | |
10 | +class Migration(migrations.Migration): | |
11 | + | |
12 | + initial = True | |
13 | + | |
14 | + dependencies = [ | |
15 | + migrations.swappable_dependency(settings.AUTH_USER_MODEL), | |
16 | + ] | |
17 | + | |
18 | + operations = [ | |
19 | + migrations.CreateModel( | |
20 | + name='Action', | |
21 | + fields=[ | |
22 | + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | |
23 | + ('name', models.CharField(max_length=100, verbose_name='Name')), | |
24 | + ('created_date', models.DateField(auto_now_add=True, verbose_name='Created Date')), | |
25 | + ], | |
26 | + options={ | |
27 | + 'verbose_name': 'Action', | |
28 | + 'verbose_name_plural': 'Actions', | |
29 | + }, | |
30 | + ), | |
31 | + migrations.CreateModel( | |
32 | + name='Action_Resource', | |
33 | + fields=[ | |
34 | + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | |
35 | + ('action', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Action', verbose_name='Action_Applied')), | |
36 | + ], | |
37 | + options={ | |
38 | + 'verbose_name': 'Action_Resource', | |
39 | + 'verbose_name_plural': 'Action_Resources', | |
40 | + }, | |
41 | + ), | |
42 | + migrations.CreateModel( | |
43 | + name='Notification', | |
44 | + fields=[ | |
45 | + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | |
46 | + ('message', models.TextField(verbose_name='message')), | |
47 | + ('read', models.BooleanField(default=False, verbose_name='Read')), | |
48 | + ('action_resource', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Action_Resource', verbose_name='Action_Resource')), | |
49 | + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Actor')), | |
50 | + ], | |
51 | + options={ | |
52 | + 'verbose_name': 'Action_Resource', | |
53 | + 'verbose_name_plural': 'Action_Resources', | |
54 | + }, | |
55 | + ), | |
56 | + migrations.CreateModel( | |
57 | + name='Resource', | |
58 | + fields=[ | |
59 | + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | |
60 | + ('name', models.CharField(max_length=100, verbose_name='Name')), | |
61 | + ('created_date', models.DateField(auto_now_add=True, verbose_name='Created Date')), | |
62 | + ], | |
63 | + options={ | |
64 | + 'verbose_name': 'Resource', | |
65 | + 'verbose_name_plural': 'Resources', | |
66 | + }, | |
67 | + ), | |
68 | + migrations.AddField( | |
69 | + model_name='action_resource', | |
70 | + name='resource', | |
71 | + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Resource', verbose_name='Resource'), | |
72 | + ), | |
73 | + ] | ... | ... |
core/models.py
1 | 1 | from django.db import models |
2 | - | |
2 | +from django.utils.translation import ugettext_lazy as _ | |
3 | +from users.models import User | |
3 | 4 | # Create your models here. |
5 | + | |
6 | + | |
7 | + | |
8 | + | |
9 | +class Action(models.Model): | |
10 | + """ | |
11 | + It represents an Action on the program by a User such as "create post", | |
12 | + "visualize post", etc. It is supposed to be created everytime we want an aciton | |
13 | + """ | |
14 | + | |
15 | + name = models.CharField(_('Name'), max_length = 100) | |
16 | + created_date = models.DateField(_('Created Date'), auto_now_add=True) | |
17 | + | |
18 | + | |
19 | + def __init__(self, name): | |
20 | + self.name = name | |
21 | + | |
22 | + class Meta: | |
23 | + verbose_name = "Action" | |
24 | + verbose_name_plural = "Actions" | |
25 | + | |
26 | + def __str__(self): | |
27 | + pass | |
28 | + | |
29 | + | |
30 | +class Resource(models.Model): | |
31 | + """ | |
32 | + It represents the resource where the action was applied on. | |
33 | + Example: Pool was answered (Resource: Pool), PDF was visualized(Resource: PDF). | |
34 | + """ | |
35 | + | |
36 | + name = models.CharField(_('Name'), max_length =100) | |
37 | + created_date = models.DateField(_('Created Date'), auto_now_add=True) | |
38 | + | |
39 | + class Meta: | |
40 | + verbose_name = "Resource" | |
41 | + verbose_name_plural = "Resources" | |
42 | + | |
43 | + def __str__(self): | |
44 | + pass | |
45 | + | |
46 | + | |
47 | +class Action_Resource(models.Model): | |
48 | + | |
49 | + action = models.ForeignKey(Action , verbose_name= _('Action_Applied')) | |
50 | + resource = models.ForeignKey(Resource, verbose_name = _('Resource')) | |
51 | + | |
52 | + class Meta: | |
53 | + verbose_name = "Action_Resource" | |
54 | + verbose_name_plural = "Action_Resources" | |
55 | + | |
56 | + def __str__(self): | |
57 | + pass | |
58 | + | |
59 | + | |
60 | +class Notification(models.Model): | |
61 | + message = models.TextField(_('message')) | |
62 | + user = models.ForeignKey(User, verbose_name= _('Actor')) | |
63 | + read = models.BooleanField(_('Read'), default=False) | |
64 | + action_resource = models.ForeignKey(Action_Resource, verbose_name = _('Action_Resource')) | |
65 | + | |
66 | + class Meta: | |
67 | + verbose_name = "Action_Resource" | |
68 | + verbose_name_plural = "Action_Resources" | |
69 | + | |
70 | + def __str__(self): | |
71 | + pass | ... | ... |
core/tests.py
... | ... | @@ -91,3 +91,26 @@ class RememberPasswordTestCase(TestCase): |
91 | 91 | self.assertEquals(len(mail.outbox), 0) |
92 | 92 | self.assertTrue('success' not in response.context) |
93 | 93 | self.assertTrue('danger' in response.context) |
94 | + | |
95 | + | |
96 | +class UpdateUserTestCase(TestCase): | |
97 | + | |
98 | + def setUp(self): | |
99 | + self.client = Client() | |
100 | + | |
101 | + self.url = reverse('users:update_user') | |
102 | + | |
103 | + def test_get_post(self): | |
104 | + data={ | |
105 | + 'username': 'testeamadeus', | |
106 | + 'email': 'teste@amadeus.com', | |
107 | + 'name': 'Teste Amadeus', | |
108 | + 'city': 'Praia', | |
109 | + 'state': 'PE', | |
110 | + 'gender': 'F', | |
111 | + } | |
112 | + # self.assertRedirects(response1, reverse('app:index')) | |
113 | + response = self.client.post(self.url, data) | |
114 | + self.assertEqual(response.status_code, 302) | |
115 | + response = self.client.get(self.url) | |
116 | + self.assertEqual(response.status_code, 302) | ... | ... |
core/views.py
1 | 1 | from django.utils.translation import ugettext_lazy as _ |
2 | 2 | from django.core.urlresolvers import reverse_lazy, reverse |
3 | 3 | from django.contrib.auth import authenticate, login as login_user |
4 | +from django.contrib.auth.mixins import LoginRequiredMixin | |
5 | +from .decorators import log_decorator | |
4 | 6 | from django.contrib import messages |
5 | 7 | from django.shortcuts import render, redirect |
6 | -from django.views.generic import CreateView | |
8 | +from django.views.generic import CreateView, UpdateView | |
7 | 9 | from django.http import HttpResponse |
8 | 10 | from django.core.mail import send_mail,BadHeaderError |
9 | 11 | from django.conf import settings |
... | ... | @@ -36,6 +38,7 @@ class RegisterUser(CreateView): |
36 | 38 | |
37 | 39 | return super(RegisterUser, self).form_valid(form) |
38 | 40 | |
41 | + | |
39 | 42 | def create_account(request): |
40 | 43 | return render(request, "create_account.html") |
41 | 44 | ... | ... |
courses/locale/pt_BR/LC_MESSAGES/django.po
1 | -<<<<<<< HEAD | |
2 | -# SOME DESCRIPTIVE TITLE. | |
3 | -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
4 | -# This file is distributed under the same license as the PACKAGE package. | |
5 | -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
6 | -# | |
7 | -#, fuzzy | |
8 | -msgid "" | |
9 | -msgstr "" | |
10 | -"Project-Id-Version: PACKAGE VERSION\n" | |
11 | -"Report-Msgid-Bugs-To: \n" | |
12 | -"POT-Creation-Date: 2016-09-01 22:44-0300\n" | |
13 | -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
14 | -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
15 | -"Language-Team: LANGUAGE <LL@li.org>\n" | |
16 | -"Language: \n" | |
17 | -"MIME-Version: 1.0\n" | |
18 | -"Content-Type: text/plain; charset=UTF-8\n" | |
19 | -"Content-Transfer-Encoding: 8bit\n" | |
20 | -"Plural-Forms: nplurals=2; plural=(n > 1);\n" | |
21 | - | |
22 | -#: courses/forms.py:11 courses/forms.py:25 courses/forms.py:55 | |
23 | -#: courses/models.py:7 courses/models.py:20 courses/models.py:44 | |
24 | -#: courses/templates/category/index.html:38 | |
25 | -msgid "Name" | |
26 | -msgstr "" | |
27 | - | |
28 | -#: courses/forms.py:14 | |
29 | -msgid "Category name" | |
30 | -msgstr "" | |
31 | - | |
32 | -#: courses/forms.py:26 | |
33 | -msgid "Objectives" | |
34 | -msgstr "" | |
35 | - | |
36 | -#: courses/forms.py:27 courses/models.py:23 | |
37 | -msgid "Content" | |
38 | -msgstr "" | |
39 | - | |
40 | -#: courses/forms.py:28 | |
41 | -msgid "Number of studets maximum" | |
42 | -msgstr "" | |
43 | - | |
44 | -#: courses/forms.py:29 | |
45 | -msgid "Course registration start date" | |
46 | -msgstr "" | |
47 | - | |
48 | -#: courses/forms.py:30 | |
49 | -msgid "Course registration end date" | |
50 | -msgstr "" | |
51 | - | |
52 | -#: courses/forms.py:31 | |
53 | -msgid "Course start date" | |
54 | -msgstr "" | |
55 | - | |
56 | -#: courses/forms.py:32 | |
57 | -msgid "Course end date" | |
58 | -msgstr "" | |
59 | - | |
60 | -#: courses/forms.py:33 courses/models.py:30 | |
61 | -msgid "Image" | |
62 | -msgstr "" | |
63 | - | |
64 | -#: courses/forms.py:34 courses/models.py:12 courses/models.py:31 | |
65 | -msgid "Category" | |
66 | -msgstr "" | |
67 | - | |
68 | -#: courses/forms.py:37 | |
69 | -msgid "Course name" | |
70 | -msgstr "" | |
71 | - | |
72 | -#: courses/forms.py:38 | |
73 | -msgid "Course objective" | |
74 | -msgstr "" | |
75 | - | |
76 | -#: courses/forms.py:39 | |
77 | -msgid "Course modules" | |
78 | -msgstr "" | |
79 | - | |
80 | -#: courses/forms.py:40 | |
81 | -msgid "Max number of students that a class can have" | |
82 | -msgstr "" | |
83 | - | |
84 | -#: courses/forms.py:41 | |
85 | -msgid "Date that starts the registration period of the course (dd/mm/yyyy)" | |
86 | -msgstr "" | |
87 | - | |
88 | -#: courses/forms.py:42 | |
89 | -msgid "Date that ends the registration period of the course (dd/mm/yyyy)" | |
90 | -msgstr "" | |
91 | - | |
92 | -#: courses/forms.py:43 | |
93 | -msgid "Date that the course starts (dd/mm/yyyy)" | |
94 | -msgstr "" | |
95 | - | |
96 | -#: courses/forms.py:44 | |
97 | -msgid "Date that the course ends (dd/mm/yyyy)" | |
98 | -msgstr "" | |
99 | - | |
100 | -#: courses/forms.py:45 | |
101 | -msgid "Representative image of the course" | |
102 | -msgstr "" | |
103 | - | |
104 | -#: courses/forms.py:46 | |
105 | -msgid "Category which the course belongs" | |
106 | -msgstr "" | |
107 | - | |
108 | -#: courses/forms.py:56 courses/models.py:46 | |
109 | -msgid "Description" | |
110 | -msgstr "" | |
111 | - | |
112 | -#: courses/forms.py:57 | |
113 | -msgid "Is it visible?" | |
114 | -msgstr "" | |
115 | - | |
116 | -#: courses/forms.py:60 | |
117 | -msgid "Module's name" | |
118 | -msgstr "" | |
119 | - | |
120 | -#: courses/forms.py:61 | |
121 | -msgid "Modules's description" | |
122 | -msgstr "" | |
123 | - | |
124 | -#: courses/forms.py:62 | |
125 | -msgid "Is the module visible?" | |
126 | -msgstr "" | |
127 | - | |
128 | -#: courses/models.py:8 courses/models.py:21 courses/models.py:45 | |
129 | -#: courses/templates/category/index.html:39 | |
130 | -msgid "Slug" | |
131 | -msgstr "" | |
132 | - | |
133 | -#: courses/models.py:9 courses/models.py:25 courses/models.py:48 | |
134 | -msgid "Creation Date" | |
135 | -msgstr "" | |
136 | - | |
137 | -#: courses/models.py:13 courses/templates/category/create.html:16 | |
138 | -#: courses/templates/category/delete.html:15 | |
139 | -#: courses/templates/category/index.html:15 | |
140 | -#: courses/templates/category/update.html:16 | |
141 | -#: courses/templates/category/view.html:15 | |
142 | -msgid "Categories" | |
143 | -msgstr "" | |
144 | - | |
145 | -#: courses/models.py:22 | |
146 | -msgid "Objectivies" | |
147 | -msgstr "" | |
148 | - | |
149 | -#: courses/models.py:24 | |
150 | -msgid "Maximum Students" | |
151 | -msgstr "" | |
152 | - | |
153 | -#: courses/models.py:26 | |
154 | -msgid "Register Date (Begin)" | |
155 | -msgstr "" | |
156 | - | |
157 | -#: courses/models.py:27 | |
158 | -msgid "Register Date (End)" | |
159 | -msgstr "" | |
160 | - | |
161 | -#: courses/models.py:28 | |
162 | -msgid "Begin of Course Date" | |
163 | -msgstr "" | |
164 | - | |
165 | -#: courses/models.py:29 | |
166 | -msgid "End of Course Date" | |
167 | -msgstr "" | |
168 | - | |
169 | -#: courses/models.py:32 | |
170 | -msgid "User" | |
171 | -msgstr "" | |
172 | - | |
173 | -#: courses/models.py:36 courses/models.py:49 | |
174 | -msgid "Course" | |
175 | -msgstr "" | |
176 | - | |
177 | -#: courses/models.py:37 courses/templates/course/create.html:16 | |
178 | -#: courses/templates/course/delete.html:15 | |
179 | -#: courses/templates/course/filtered.html:8 | |
180 | -#: courses/templates/course/index.html:15 | |
181 | -#: courses/templates/course/update.html:16 | |
182 | -#: courses/templates/course/view.html:15 | |
183 | -#: courses/templates/module/create.html:17 | |
184 | -#: courses/templates/module/delete.html:16 | |
185 | -#: courses/templates/module/index.html:16 | |
186 | -#: courses/templates/module/update.html:17 | |
187 | -msgid "Courses" | |
188 | -msgstr "" | |
189 | - | |
190 | -#: courses/models.py:47 courses/templates/module/index.html:107 | |
191 | -msgid "Visible" | |
192 | -msgstr "" | |
193 | - | |
194 | -#: courses/models.py:53 | |
195 | -msgid "Module" | |
196 | -msgstr "" | |
197 | - | |
198 | -#: courses/models.py:54 courses/templates/module/index.html:92 | |
199 | -msgid "Modules" | |
200 | -msgstr "" | |
201 | - | |
202 | -#: courses/templates/category/create.html:8 | |
203 | -#: courses/templates/category/delete.html:7 | |
204 | -#: courses/templates/category/index.html:7 | |
205 | -#: courses/templates/category/update.html:8 | |
206 | -#: courses/templates/category/view.html:7 | |
207 | -#: courses/templates/course/create.html:8 | |
208 | -#: courses/templates/course/delete.html:7 courses/templates/course/index.html:7 | |
209 | -#: courses/templates/course/update.html:8 courses/templates/course/view.html:7 | |
210 | -#: courses/templates/module/create.html:8 | |
211 | -#: courses/templates/module/delete.html:7 courses/templates/module/index.html:7 | |
212 | -#: courses/templates/module/update.html:8 | |
213 | -msgid "Home" | |
214 | -msgstr "" | |
215 | - | |
216 | -#: courses/templates/category/create.html:9 | |
217 | -#: courses/templates/category/delete.html:18 | |
218 | -#: courses/templates/category/index.html:18 | |
219 | -#: courses/templates/category/view.html:18 | |
220 | -msgid "Create Category" | |
221 | -msgstr "" | |
222 | - | |
223 | -#: courses/templates/category/create.html:26 | |
224 | -#: courses/templates/category/update.html:26 | |
225 | -#: courses/templates/course/create.html:26 | |
226 | -#: courses/templates/course/update.html:32 | |
227 | -#: courses/templates/module/create.html:52 | |
228 | -#: courses/templates/module/update.html:52 | |
229 | -msgid "All fields are required" | |
230 | -msgstr "" | |
231 | - | |
232 | -#: courses/templates/category/create.html:51 | |
233 | -#: courses/templates/category/update.html:51 | |
234 | -#: courses/templates/course/create.html:51 | |
235 | -#: courses/templates/course/update.html:57 | |
236 | -#: courses/templates/module/create.html:77 | |
237 | -#: courses/templates/module/update.html:77 | |
238 | -msgid "Save" | |
239 | -msgstr "" | |
240 | - | |
241 | -#: courses/templates/category/delete.html:8 | |
242 | -#: courses/templates/category/index.html:8 | |
243 | -msgid "Manage Categories" | |
244 | -msgstr "" | |
245 | - | |
246 | -#: courses/templates/category/delete.html:26 | |
247 | -msgid "Are you sure you want to delete the category" | |
248 | -msgstr "" | |
249 | - | |
250 | -#: courses/templates/category/delete.html:27 | |
251 | -#: courses/templates/course/delete.html:28 | |
252 | -#: courses/templates/module/delete.html:50 | |
253 | -msgid "Yes" | |
254 | -msgstr "" | |
255 | - | |
256 | -#: courses/templates/category/delete.html:28 | |
257 | -#: courses/templates/course/delete.html:29 | |
258 | -#: courses/templates/module/delete.html:51 | |
259 | -msgid "No" | |
260 | -msgstr "" | |
261 | - | |
262 | -#: courses/templates/category/index.html:40 | |
263 | -msgid "Actions" | |
264 | -msgstr "" | |
265 | - | |
266 | -#: courses/templates/category/index.html:59 | |
267 | -msgid "No categories found" | |
268 | -msgstr "" | |
269 | - | |
270 | -#: courses/templates/category/update.html:9 | |
271 | -#: courses/templates/category/view.html:21 | |
272 | -msgid "Edit Category" | |
273 | -msgstr "" | |
274 | - | |
275 | -#: courses/templates/category/view.html:24 | |
276 | -msgid "Remove Category" | |
277 | -msgstr "" | |
278 | - | |
279 | -#: courses/templates/category/view.html:32 | |
280 | -msgid "Name:" | |
281 | -msgstr "" | |
282 | - | |
283 | -#: courses/templates/category/view.html:33 | |
284 | -msgid "Slug:" | |
285 | -msgstr "" | |
286 | - | |
287 | -#: courses/templates/course/create.html:9 | |
288 | -#: courses/templates/course/delete.html:18 | |
289 | -#: courses/templates/course/filtered.html:11 | |
290 | -#: courses/templates/course/index.html:18 courses/templates/course/view.html:25 | |
291 | -#: courses/templates/module/create.html:20 | |
292 | -#: courses/templates/module/delete.html:19 | |
293 | -#: courses/templates/module/index.html:26 | |
294 | -#: courses/templates/module/update.html:20 | |
295 | -msgid "Create Course" | |
296 | -msgstr "" | |
297 | - | |
298 | -#: courses/templates/course/delete.html:27 | |
299 | -msgid "Are you sure you want to delete the couse" | |
300 | -msgstr "" | |
301 | - | |
302 | -#: courses/templates/course/filtered.html:19 | |
303 | -#: courses/templates/course/index.html:26 | |
304 | -msgid "Categories:" | |
305 | -msgstr "" | |
306 | - | |
307 | -#: courses/templates/course/index.html:8 | |
308 | -msgid "Manage Courses" | |
309 | -msgstr "" | |
310 | - | |
311 | -#: courses/templates/course/index.html:80 | |
312 | -msgid "students tops" | |
313 | -msgstr "" | |
314 | - | |
315 | -#: courses/templates/course/index.html:86 | |
316 | -msgid "Subscribe Period:" | |
317 | -msgstr "" | |
318 | - | |
319 | -#: courses/templates/course/index.html:88 courses/templates/course/view.html:59 | |
320 | -#: courses/templates/module/index.html:83 | |
321 | -msgid "Period:" | |
322 | -msgstr "" | |
323 | - | |
324 | -#: courses/templates/course/index.html:104 | |
325 | -msgid "No courses found" | |
326 | -msgstr "" | |
327 | - | |
328 | -#: courses/templates/course/update.html:9 courses/templates/course/view.html:28 | |
329 | -#: courses/templates/module/create.html:26 | |
330 | -#: courses/templates/module/delete.html:25 | |
331 | -#: courses/templates/module/index.html:29 | |
332 | -#: courses/templates/module/update.html:26 | |
333 | -msgid "Edit Course" | |
334 | -msgstr "" | |
335 | - | |
336 | -#: courses/templates/course/update.html:19 | |
337 | -#: courses/templates/course/view.html:21 | |
338 | -#: courses/templates/module/create.html:29 | |
339 | -#: courses/templates/module/delete.html:9 | |
340 | -#: courses/templates/module/delete.html:28 | |
341 | -#: courses/templates/module/index.html:9 courses/templates/module/index.html:22 | |
342 | -#: courses/templates/module/update.html:29 | |
343 | -msgid "Manage Modules" | |
344 | -msgstr "" | |
345 | - | |
346 | -#: courses/templates/course/update.html:22 | |
347 | -#: courses/templates/course/view.html:31 | |
348 | -#: courses/templates/module/create.html:32 | |
349 | -#: courses/templates/module/delete.html:31 | |
350 | -#: courses/templates/module/index.html:32 | |
351 | -#: courses/templates/module/update.html:32 | |
352 | -msgid "Participants" | |
353 | -msgstr "" | |
354 | - | |
355 | -#: courses/templates/course/view.html:18 | |
356 | -#: courses/templates/module/create.html:23 | |
357 | -#: courses/templates/module/delete.html:22 | |
358 | -#: courses/templates/module/index.html:19 | |
359 | -#: courses/templates/module/update.html:23 | |
360 | -msgid "Course Info" | |
361 | -msgstr "" | |
362 | - | |
363 | -#: courses/templates/course/view.html:34 | |
364 | -#: courses/templates/module/create.html:35 | |
365 | -#: courses/templates/module/delete.html:34 | |
366 | -#: courses/templates/module/index.html:35 | |
367 | -#: courses/templates/module/update.html:35 | |
368 | -msgid "Course avaliations" | |
369 | -msgstr "" | |
370 | - | |
371 | -#: courses/templates/course/view.html:37 | |
372 | -#: courses/templates/module/create.html:38 | |
373 | -#: courses/templates/module/delete.html:37 | |
374 | -#: courses/templates/module/index.html:38 | |
375 | -#: courses/templates/module/update.html:38 | |
376 | -msgid "Duplicate Course" | |
377 | -msgstr "" | |
378 | - | |
379 | -#: courses/templates/course/view.html:40 | |
380 | -#: courses/templates/module/create.html:41 | |
381 | -#: courses/templates/module/delete.html:40 | |
382 | -#: courses/templates/module/index.html:41 | |
383 | -#: courses/templates/module/update.html:41 | |
384 | -msgid "Delete Course" | |
385 | -msgstr "" | |
386 | - | |
387 | -#: courses/templates/course/view.html:56 | |
388 | -msgid "Subscribes:" | |
389 | -msgstr "" | |
390 | - | |
391 | -#: courses/templates/course/view.html:66 | |
392 | -msgid "Objectives:" | |
393 | -msgstr "" | |
394 | - | |
395 | -#: courses/templates/course/view.html:69 | |
396 | -msgid "Work Plan:" | |
397 | -msgstr "" | |
398 | - | |
399 | -#: courses/templates/module/create.html:10 | |
400 | -#: courses/templates/module/index.html:70 | |
401 | -msgid "Create Module" | |
402 | -msgstr "" | |
403 | - | |
404 | -#: courses/templates/module/delete.html:49 | |
405 | -msgid "Are you sure you want to delete the module" | |
406 | -msgstr "" | |
407 | - | |
408 | -#: courses/templates/module/index.html:80 | |
409 | -msgid "students maximum" | |
410 | -msgstr "" | |
411 | - | |
412 | -#: courses/templates/module/index.html:109 | |
413 | -msgid "Invisible" | |
414 | -msgstr "" | |
415 | - | |
416 | -#: courses/templates/module/index.html:125 | |
417 | -msgid "No modules found" | |
418 | -msgstr "" | |
419 | - | |
420 | -#: courses/templates/module/update.html:10 | |
421 | -msgid "Edit Module" | |
422 | -msgstr "" | |
423 | - | |
424 | -#: courses/views.py:48 | |
425 | -msgid "Course created successfully!" | |
426 | -msgstr "" | |
427 | - | |
428 | -#: courses/views.py:70 | |
429 | -msgid "Course edited successfully!" | |
430 | -msgstr "" | |
431 | - | |
432 | -#: courses/views.py:92 | |
433 | -msgid "Course deleted successfully!" | |
434 | -msgstr "" | |
435 | - | |
436 | -#: courses/views.py:142 | |
437 | -msgid "Category created successfully!" | |
438 | -msgstr "" | |
439 | - | |
440 | -#: courses/views.py:164 | |
441 | -msgid "Category edited successfully!" | |
442 | -msgstr "" | |
443 | - | |
444 | -#: courses/views.py:185 | |
445 | -msgid "Category deleted successfully!" | |
446 | -msgstr "" | |
447 | - | |
448 | -#: courses/views.py:237 | |
449 | -msgid "Module created successfully!" | |
450 | -msgstr "" | |
451 | - | |
452 | -#: courses/views.py:268 | |
453 | -msgid "Module edited successfully!" | |
454 | -msgstr "" | |
455 | - | |
456 | -#: courses/views.py:291 | |
457 | -msgid "Module deleted successfully!" | |
458 | -msgstr "" | |
459 | -======= | |
460 | 1 | # SOME DESCRIPTIVE TITLE. |
461 | 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
462 | 3 | # This file is distributed under the same license as the PACKAGE package. |
... | ... | @@ -467,7 +8,7 @@ msgid "" |
467 | 8 | msgstr "" |
468 | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
469 | 10 | "Report-Msgid-Bugs-To: \n" |
470 | -"POT-Creation-Date: 2016-09-05 20:28-0300\n" | |
11 | +"POT-Creation-Date: 2016-09-07 00:13-0300\n" | |
471 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
472 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
473 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
... | ... | @@ -920,4 +461,3 @@ msgstr "" |
920 | 461 | #: courses/views.py:291 |
921 | 462 | msgid "Module deleted successfully!" |
922 | 463 | msgstr "" |
923 | ->>>>>>> 6adb9412b8b77c81ef8cc33a0b481885dadb6012 | ... | ... |
logs/log_file_06-09-2016.txt
... | ... | @@ -49,3 +49,47 @@ |
49 | 49 | 06/09/2016 01:46:18 - test - Acessou home |
50 | 50 | 06/09/2016 01:46:28 - test - Entrou no sistema |
51 | 51 | 06/09/2016 01:46:28 - test - Acessou home |
52 | +06/09/2016 02:39:03 - test - Entrou no sistema | |
53 | +06/09/2016 02:39:03 - test - Acessou home | |
54 | +06/09/2016 02:39:41 - test - Entrou no sistema | |
55 | +06/09/2016 02:39:41 - test - Acessou home | |
56 | +06/09/2016 02:40:57 - test - Entrou no sistema | |
57 | +06/09/2016 02:40:57 - test - Acessou home | |
58 | +06/09/2016 02:41:50 - test - Entrou no sistema | |
59 | +06/09/2016 02:41:50 - test - Acessou home | |
60 | +06/09/2016 02:46:53 - test - Entrou no sistema | |
61 | +06/09/2016 02:46:53 - test - Acessou home | |
62 | +06/09/2016 02:47:14 - test - Entrou no sistema | |
63 | +06/09/2016 02:47:14 - test - Acessou home | |
64 | +06/09/2016 02:50:33 - test - Entrou no sistema | |
65 | +06/09/2016 02:50:33 - test - Acessou home | |
66 | +06/09/2016 02:52:54 - test - Entrou no sistema | |
67 | +06/09/2016 02:52:54 - test - Acessou home | |
68 | +06/09/2016 02:57:03 - test - Entrou no sistema | |
69 | +06/09/2016 02:57:03 - test - Acessou home | |
70 | +06/09/2016 03:02:15 - test - Entrou no sistema | |
71 | +06/09/2016 03:02:15 - test - Acessou home | |
72 | +06/09/2016 16:20:42 - test - Entrou no sistema | |
73 | +06/09/2016 16:20:42 - test - Acessou home | |
74 | +06/09/2016 16:29:26 - test - Entrou no sistema | |
75 | +06/09/2016 16:29:26 - test - Acessou home | |
76 | +06/09/2016 16:31:14 - test - Entrou no sistema | |
77 | +06/09/2016 16:31:14 - test - Acessou home | |
78 | +06/09/2016 16:33:06 - test - Entrou no sistema | |
79 | +06/09/2016 16:33:06 - test - Acessou home | |
80 | +06/09/2016 16:33:26 - test - Entrou no sistema | |
81 | +06/09/2016 16:33:26 - test - Acessou home | |
82 | +06/09/2016 16:33:36 - test - Entrou no sistema | |
83 | +06/09/2016 16:33:36 - test - Acessou home | |
84 | +06/09/2016 16:34:10 - test - Entrou no sistema | |
85 | +06/09/2016 16:34:10 - test - Acessou home | |
86 | +06/09/2016 16:34:29 - test - Entrou no sistema | |
87 | +06/09/2016 16:34:29 - test - Acessou home | |
88 | +06/09/2016 21:30:40 - test - Entrou no sistema | |
89 | +06/09/2016 21:30:40 - test - Acessou home | |
90 | +06/09/2016 21:32:32 - test - Entrou no sistema | |
91 | +06/09/2016 21:32:32 - test - Acessou home | |
92 | +06/09/2016 21:34:11 - test - Entrou no sistema | |
93 | +06/09/2016 21:34:11 - test - Acessou home | |
94 | +06/09/2016 21:38:44 - test - Entrou no sistema | |
95 | +06/09/2016 21:38:44 - test - Acessou home | ... | ... |
users/forms.py
... | ... | @@ -31,4 +31,11 @@ class EditUserForm(forms.ModelForm): |
31 | 31 | |
32 | 32 | class Meta: |
33 | 33 | model = User |
34 | - fields = ['username', 'name', 'email', 'birth_date', 'city', 'state', 'gender', 'cpf', 'phone', 'image'] | |
35 | 34 | \ No newline at end of file |
35 | + fields = ['username', 'name', 'email', 'birth_date', 'city', 'state', 'gender', 'cpf', 'phone', 'image'] | |
36 | + | |
37 | +# Ailson | |
38 | +class UpdateUserForm(forms.ModelForm): | |
39 | + | |
40 | + class Meta: | |
41 | + model = User | |
42 | + fields = ['username', 'name', 'email', 'city', 'state', 'birth_date', 'gender', 'cpf', 'phone', 'image'] | ... | ... |
users/locale/pt_BR/LC_MESSAGES/django.po
1 | -<<<<<<< HEAD | |
2 | -# SOME DESCRIPTIVE TITLE. | |
3 | -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
4 | -# This file is distributed under the same license as the PACKAGE package. | |
5 | -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
6 | -# | |
7 | -#, fuzzy | |
8 | -msgid "" | |
9 | -msgstr "" | |
10 | -"Project-Id-Version: PACKAGE VERSION\n" | |
11 | -"Report-Msgid-Bugs-To: \n" | |
12 | -"POT-Creation-Date: 2016-09-01 22:44-0300\n" | |
13 | -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
14 | -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
15 | -"Language-Team: LANGUAGE <LL@li.org>\n" | |
16 | -"Language: \n" | |
17 | -"MIME-Version: 1.0\n" | |
18 | -"Content-Type: text/plain; charset=UTF-8\n" | |
19 | -"Content-Transfer-Encoding: 8bit\n" | |
20 | -"Plural-Forms: nplurals=2; plural=(n > 1);\n" | |
21 | - | |
22 | -#: users/forms.py:10 | |
23 | -msgid "Password" | |
24 | -msgstr "" | |
25 | - | |
26 | -#: users/models.py:10 | |
27 | -msgid "Login" | |
28 | -msgstr "" | |
29 | - | |
30 | -#: users/models.py:13 | |
31 | -msgid "" | |
32 | -"Type a valid username. This fields should only contain letters, numbers and " | |
33 | -"the characteres: @/./+/-/_ ." | |
34 | -msgstr "" | |
35 | - | |
36 | -#: users/models.py:16 | |
37 | -msgid "" | |
38 | -"A short name that will be used to identify you in the platform and to access " | |
39 | -"it" | |
40 | -msgstr "" | |
41 | - | |
42 | -#: users/models.py:17 | |
43 | -msgid "Mail" | |
44 | -msgstr "" | |
45 | - | |
46 | -#: users/models.py:18 | |
47 | -msgid "Name" | |
48 | -msgstr "" | |
49 | - | |
50 | -#: users/models.py:19 | |
51 | -msgid "City" | |
52 | -msgstr "" | |
53 | - | |
54 | -#: users/models.py:20 | |
55 | -msgid "State" | |
56 | -msgstr "" | |
57 | - | |
58 | -#: users/models.py:21 | |
59 | -msgid "Gender" | |
60 | -msgstr "" | |
61 | - | |
62 | -#: users/models.py:21 | |
63 | -msgid "Male" | |
64 | -msgstr "" | |
65 | - | |
66 | -#: users/models.py:21 | |
67 | -msgid "Female" | |
68 | -msgstr "" | |
69 | - | |
70 | -#: users/models.py:22 | |
71 | -msgid "Image" | |
72 | -msgstr "" | |
73 | - | |
74 | -#: users/models.py:23 | |
75 | -msgid "Birth Date" | |
76 | -msgstr "" | |
77 | - | |
78 | -#: users/models.py:24 | |
79 | -msgid "Phone" | |
80 | -msgstr "" | |
81 | - | |
82 | -#: users/models.py:25 users/templates/users/profile.html:42 | |
83 | -msgid "Cpf" | |
84 | -msgstr "" | |
85 | - | |
86 | -#: users/models.py:26 | |
87 | -msgid "Type" | |
88 | -msgstr "" | |
89 | - | |
90 | -#: users/models.py:26 | |
91 | -msgid "Professor" | |
92 | -msgstr "" | |
93 | - | |
94 | -#: users/models.py:26 | |
95 | -msgid "Student" | |
96 | -msgstr "" | |
97 | - | |
98 | -#: users/models.py:27 | |
99 | -msgid "Create Date" | |
100 | -msgstr "" | |
101 | - | |
102 | -#: users/models.py:28 | |
103 | -msgid "Administrador" | |
104 | -msgstr "" | |
105 | - | |
106 | -#: users/models.py:29 | |
107 | -msgid "Active" | |
108 | -msgstr "" | |
109 | - | |
110 | -#: users/models.py:37 | |
111 | -msgid "User" | |
112 | -msgstr "" | |
113 | - | |
114 | -#: users/models.py:38 | |
115 | -msgid "Users" | |
116 | -msgstr "" | |
117 | - | |
118 | -#: users/templates/list_users.html:14 users/templates/users/create.html:8 | |
119 | -#: users/templates/users/edit_profile.html:8 users/templates/users/index.html:7 | |
120 | -#: users/templates/users/profile.html:8 users/templates/users/update.html:8 | |
121 | -#: users/templates/users/view.html:7 | |
122 | -msgid "Home" | |
123 | -msgstr "Início" | |
124 | - | |
125 | -#: users/templates/list_users.html:15 users/templates/users/index.html:8 | |
126 | -msgid "Manage Users" | |
127 | -msgstr "Gerenciar Usuários" | |
128 | - | |
129 | -#: users/templates/list_users.html:23 | |
130 | -msgid "Add user" | |
131 | -msgstr "Adicionar usuário" | |
132 | - | |
133 | -#: users/templates/list_users.html:24 | |
134 | -msgid "Send email" | |
135 | -msgstr "Enviar e-mail" | |
136 | - | |
137 | -#: users/templates/users/create.html:9 | |
138 | -msgid "New User" | |
139 | -msgstr "" | |
140 | - | |
141 | -#: users/templates/users/create.html:16 users/templates/users/index.html:15 | |
142 | -#: users/templates/users/update.html:16 users/templates/users/view.html:15 | |
143 | -msgid "System Users" | |
144 | -msgstr "" | |
145 | - | |
146 | -#: users/templates/users/create.html:19 users/templates/users/index.html:18 | |
147 | -#: users/templates/users/update.html:19 users/templates/users/view.html:18 | |
148 | -msgid "New Account" | |
149 | -msgstr "" | |
150 | - | |
151 | -#: users/templates/users/create.html:22 users/templates/users/index.html:21 | |
152 | -#: users/templates/users/update.html:22 users/templates/users/view.html:27 | |
153 | -msgid "Send Mail" | |
154 | -msgstr "" | |
155 | - | |
156 | -#: users/templates/users/create.html:32 | |
157 | -#: users/templates/users/edit_profile.html:29 | |
158 | -#: users/templates/users/update.html:32 | |
159 | -msgid "All fields are required" | |
160 | -msgstr "" | |
161 | - | |
162 | -#: users/templates/users/create.html:57 | |
163 | -#: users/templates/users/edit_profile.html:64 | |
164 | -#: users/templates/users/update.html:57 | |
165 | -msgid "Save" | |
166 | -msgstr "" | |
167 | - | |
168 | -#: users/templates/users/edit_profile.html:9 | |
169 | -#: users/templates/users/edit_profile.html:19 | |
170 | -#: users/templates/users/profile.html:19 | |
171 | -msgid "Edit Profile" | |
172 | -msgstr "" | |
173 | - | |
174 | -#: users/templates/users/edit_profile.html:16 | |
175 | -#: users/templates/users/profile.html:9 users/templates/users/profile.html:16 | |
176 | -msgid "Profile" | |
177 | -msgstr "" | |
178 | - | |
179 | -#: users/templates/users/index.html:56 users/templates/users/profile.html:32 | |
180 | -#: users/templates/users/view.html:39 | |
181 | -msgid "Administrator" | |
182 | -msgstr "" | |
183 | - | |
184 | -#: users/templates/users/index.html:74 | |
185 | -msgid "No users found" | |
186 | -msgstr "" | |
187 | - | |
188 | -#: users/templates/users/profile.html:36 users/templates/users/view.html:43 | |
189 | -msgid "Mail:" | |
190 | -msgstr "" | |
191 | - | |
192 | -#: users/templates/users/profile.html:39 users/templates/users/view.html:46 | |
193 | -msgid "Phone:" | |
194 | -msgstr "" | |
195 | - | |
196 | -#: users/templates/users/profile.html:45 | |
197 | -msgid "Birth date" | |
198 | -msgstr "" | |
199 | - | |
200 | -#: users/templates/users/update.html:9 | |
201 | -msgid "Edit user" | |
202 | -msgstr "" | |
203 | - | |
204 | -#: users/templates/users/view.html:21 | |
205 | -msgid "View User Account" | |
206 | -msgstr "" | |
207 | - | |
208 | -#: users/templates/users/view.html:24 | |
209 | -msgid "Edit User Account" | |
210 | -msgstr "" | |
211 | - | |
212 | -#: users/templates/users/view.html:49 | |
213 | -msgid "Cpf:" | |
214 | -msgstr "" | |
215 | - | |
216 | -#: users/templates/users/view.html:52 | |
217 | -msgid "Birth date:" | |
218 | -msgstr "" | |
219 | - | |
220 | -#: users/views.py:47 | |
221 | -msgid "User created successfully!" | |
222 | -msgstr "" | |
223 | - | |
224 | -#: users/views.py:76 | |
225 | -msgid "User edited successfully!" | |
226 | -msgstr "" | |
227 | - | |
228 | -#: users/views.py:125 | |
229 | -msgid "Profile edited successfully!" | |
230 | -msgstr "" | |
231 | -======= | |
232 | 1 | # SOME DESCRIPTIVE TITLE. |
233 | 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
234 | 3 | # This file is distributed under the same license as the PACKAGE package. |
... | ... | @@ -239,7 +8,7 @@ msgid "" |
239 | 8 | msgstr "" |
240 | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
241 | 10 | "Report-Msgid-Bugs-To: \n" |
242 | -"POT-Creation-Date: 2016-09-05 20:28-0300\n" | |
11 | +"POT-Creation-Date: 2016-09-07 00:13-0300\n" | |
243 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
244 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
245 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
... | ... | @@ -261,7 +30,9 @@ msgstr "Entrar" |
261 | 30 | msgid "" |
262 | 31 | "Type a valid username. This fields should only contain letters, numbers and " |
263 | 32 | "the characteres: @/./+/-/_ ." |
264 | -msgstr "Digite um nome de usuário válido. Esse campo deve conter apenas letras, números e os caracteres: @/./+/-/_ ." | |
33 | +msgstr "" | |
34 | +"Digite um nome de usuário válido. Esse campo deve conter apenas letras, " | |
35 | +"números e os caracteres: @/./+/-/_ ." | |
265 | 36 | |
266 | 37 | #: users/models.py:16 |
267 | 38 | msgid "" |
... | ... | @@ -273,7 +44,7 @@ msgstr "" |
273 | 44 | msgid "Mail" |
274 | 45 | msgstr "Email" |
275 | 46 | |
276 | -#: users/models.py:18 users/templates/list_users.html:41 | |
47 | +#: users/models.py:18 users/templates/list_users.html:50 | |
277 | 48 | msgid "Name" |
278 | 49 | msgstr "Nome" |
279 | 50 | |
... | ... | @@ -335,7 +106,7 @@ msgstr "Administrador" |
335 | 106 | |
336 | 107 | #: users/models.py:29 |
337 | 108 | msgid "Active" |
338 | -msgstr "" | |
109 | +msgstr "Ativo" | |
339 | 110 | |
340 | 111 | #: users/models.py:37 |
341 | 112 | msgid "User" |
... | ... | @@ -364,28 +135,40 @@ msgstr "Adicionar usuário" |
364 | 135 | msgid "Send email" |
365 | 136 | msgstr "Enviar e-mail" |
366 | 137 | |
367 | -#: users/templates/list_users.html:42 | |
138 | +#: users/templates/list_users.html:34 | |
139 | +msgid "Search..." | |
140 | +msgstr "Pesquisar..." | |
141 | + | |
142 | +#: users/templates/list_users.html:37 | |
143 | +msgid "Search" | |
144 | +msgstr "Pesquisar" | |
145 | + | |
146 | +#: users/templates/list_users.html:51 | |
368 | 147 | #: users/templates/users/edit_profile.html:16 |
369 | 148 | #: users/templates/users/profile.html:9 users/templates/users/profile.html:16 |
370 | 149 | msgid "Profile" |
371 | 150 | msgstr "Perfil" |
372 | 151 | |
373 | -#: users/templates/list_users.html:43 | |
152 | +#: users/templates/list_users.html:52 | |
374 | 153 | msgid "Email" |
375 | 154 | msgstr "Email" |
376 | 155 | |
377 | -#: users/templates/list_users.html:44 | |
156 | +#: users/templates/list_users.html:53 | |
378 | 157 | msgid "Contact" |
379 | 158 | msgstr "Contato" |
380 | 159 | |
381 | -#: users/templates/list_users.html:46 | |
160 | +#: users/templates/list_users.html:55 | |
382 | 161 | msgid "Edit" |
383 | 162 | msgstr "Editar" |
384 | 163 | |
385 | -#: users/templates/list_users.html:47 | |
164 | +#: users/templates/list_users.html:56 | |
386 | 165 | msgid "Delete" |
387 | 166 | msgstr "Apagar" |
388 | 167 | |
168 | +#: users/templates/list_users.html:66 users/templates/users/index.html:74 | |
169 | +msgid "No users found" | |
170 | +msgstr "Nenhum usuário encontrado" | |
171 | + | |
389 | 172 | #: users/templates/users/create.html:9 |
390 | 173 | msgid "New User" |
391 | 174 | msgstr "Novo usuário" |
... | ... | @@ -428,10 +211,6 @@ msgstr "" |
428 | 211 | msgid "Administrator" |
429 | 212 | msgstr "" |
430 | 213 | |
431 | -#: users/templates/users/index.html:74 | |
432 | -msgid "No users found" | |
433 | -msgstr "" | |
434 | - | |
435 | 214 | #: users/templates/users/profile.html:36 users/templates/users/view.html:43 |
436 | 215 | msgid "Mail:" |
437 | 216 | msgstr "" |
... | ... | @@ -464,15 +243,14 @@ msgstr "" |
464 | 243 | msgid "Birth date:" |
465 | 244 | msgstr "" |
466 | 245 | |
467 | -#: users/views.py:47 | |
246 | +#: users/views.py:54 | |
468 | 247 | msgid "User created successfully!" |
469 | 248 | msgstr "" |
470 | 249 | |
471 | -#: users/views.py:76 | |
250 | +#: users/views.py:83 | |
472 | 251 | msgid "User edited successfully!" |
473 | 252 | msgstr "" |
474 | 253 | |
475 | -#: users/views.py:125 | |
254 | +#: users/views.py:132 users/views.py:149 | |
476 | 255 | msgid "Profile edited successfully!" |
477 | 256 | msgstr "" |
478 | ->>>>>>> 6adb9412b8b77c81ef8cc33a0b481885dadb6012 | ... | ... |
... | ... | @@ -0,0 +1,22 @@ |
1 | +# -*- coding: utf-8 -*- | |
2 | +# Generated by Django 1.10 on 2016-09-06 17:50 | |
3 | +from __future__ import unicode_literals | |
4 | + | |
5 | +import django.core.validators | |
6 | +from django.db import migrations, models | |
7 | +import re | |
8 | + | |
9 | + | |
10 | +class Migration(migrations.Migration): | |
11 | + | |
12 | + dependencies = [ | |
13 | + ('users', '0008_auto_20160902_2123'), | |
14 | + ] | |
15 | + | |
16 | + operations = [ | |
17 | + migrations.AlterField( | |
18 | + model_name='user', | |
19 | + name='username', | |
20 | + field=models.CharField(help_text='A short name that will be used to identify you in the platform and to access it', max_length=35, unique=True, validators=[django.core.validators.RegexValidator(re.compile(b'^[\\w.@+-]+$'), 'Type a valid username. This fields should only contain letters, numbers and the characteres: @/./+/-/_ .', b'invalid')], verbose_name='Login'), | |
21 | + ), | |
22 | + ] | ... | ... |
... | ... | @@ -0,0 +1,22 @@ |
1 | +# -*- coding: utf-8 -*- | |
2 | +# Generated by Django 1.9.7 on 2016-09-07 02:32 | |
3 | +from __future__ import unicode_literals | |
4 | + | |
5 | +import django.core.validators | |
6 | +from django.db import migrations, models | |
7 | +import re | |
8 | + | |
9 | + | |
10 | +class Migration(migrations.Migration): | |
11 | + | |
12 | + dependencies = [ | |
13 | + ('users', '0009_auto_20160906_1450'), | |
14 | + ] | |
15 | + | |
16 | + operations = [ | |
17 | + migrations.AlterField( | |
18 | + model_name='user', | |
19 | + name='username', | |
20 | + field=models.CharField(help_text='A short name that will be used to identify you in the platform and to access it', max_length=35, unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[\\w.@+-]+$', 32), 'Type a valid username. This fields should only contain letters, numbers and the characteres: @/./+/-/_ .', 'invalid')], verbose_name='Login'), | |
21 | + ), | |
22 | + ] | ... | ... |
users/templates/list_users.html
... | ... | @@ -28,7 +28,16 @@ |
28 | 28 | {% endblock %} |
29 | 29 | |
30 | 30 | {% block content %} |
31 | - <input type="text" class="form-control" name="search" placeholder="search.."> | |
31 | + <form action="" method="GET" class="form-horizontal"> | |
32 | + <div class="form-group"> | |
33 | + <div class="col-md-9 col-sm-9 col-xs-9"> | |
34 | + <input type="text" class="form-control" name="search" placeholder="{% trans 'Search...' %}" /> | |
35 | + </div> | |
36 | + <div class="col-md-3 col-sm-3 col-xs-3"> | |
37 | + <input type="submit" class="btn btn-primary" value="{% trans 'Search' %}" /> | |
38 | + </div> | |
39 | + </div> | |
40 | + </form> | |
32 | 41 | |
33 | 42 | {% if users|length > 0 %} |
34 | 43 | {% for acc in users %} |
... | ... | @@ -43,8 +52,8 @@ |
43 | 52 | <p>{% trans 'Email' %}: {{ acc.email }}</p> |
44 | 53 | <p>{% trans 'Contact' %}: {{ acc.phone }}</p> |
45 | 54 | <div align="right"> |
46 | - <a href="javascript:void(0)" class="btn btn-raised btn-inverse">{% trans 'Edit' %}</a> | |
47 | - <a href="javascript:void(0)" class="btn btn-raised btn-danger">{% trans 'Delete' %}</a> | |
55 | + <a href="javascript:void(0)" class="btn btn-raised btn-success">{% trans 'Edit' %}</a> | |
56 | + <a href="javascript:void(0)" class="btn btn-raised btn-primary">{% trans 'Delete' %}</a> | |
48 | 57 | </div> |
49 | 58 | </div> |
50 | 59 | </div> |
... | ... | @@ -52,6 +61,10 @@ |
52 | 61 | {% endfor %} |
53 | 62 | {% pagination request paginator page_obj %} |
54 | 63 | {% else %} |
55 | - | |
64 | + <div class="row"> | |
65 | + <div class="col-md-12 col-sm-12 col-xs-12"> | |
66 | + <p>{% trans 'No users found' %}</p> | |
67 | + </div> | |
68 | + </div> | |
56 | 69 | {% endif %} |
57 | 70 | {% endblock %} | ... | ... |
users/urls.py
... | ... | @@ -3,10 +3,12 @@ from django.conf.urls import url |
3 | 3 | from . import views |
4 | 4 | |
5 | 5 | urlpatterns = [ |
6 | - url(r'^users/$', views.UsersListView.as_view(), name='manage'), | |
7 | - url(r'^users/create/$', views.Create.as_view(), name='create'), | |
8 | - url(r'^user/edit/(?P<username>[\w_-]+)/$', views.Update.as_view(), name='update'), | |
9 | - url(r'^user/data/(?P<username>[\w_-]+)/$', views.View.as_view(), name='view'), | |
6 | + url(r'^$', views.UsersListView.as_view(), name='manage'), | |
7 | + url(r'^create/$', views.Create.as_view(), name='create'), | |
8 | + url(r'^edit/(?P<username>[\w_-]+)/$', views.Update.as_view(), name='update'), | |
9 | + url(r'^view/(?P<username>[\w_-]+)/$', views.View.as_view(), name='view'), | |
10 | 10 | url(r'^profile/$', views.Profile.as_view(), name='profile'), |
11 | - url(r'^profile/edit/(?P<username>[\w_-]+)/$', views.EditProfile.as_view(), name='edit_profile'), | |
11 | + url(r'^profile/editar/(?P<username>[\w_-]+)/$', views.EditProfile.as_view(), name='edit_profile'), | |
12 | + # | |
13 | + url(r'^profile/update/$', views.UpdateUser.as_view(), name='update_user'), | |
12 | 14 | ] | ... | ... |
users/views.py
1 | 1 | from django.shortcuts import get_object_or_404 |
2 | +from django.db.models import Q | |
2 | 3 | from django.views import generic |
3 | 4 | from django.contrib import messages |
4 | 5 | from rolepermissions.mixins import HasRoleMixin |
... | ... | @@ -7,7 +8,7 @@ from django.core.urlresolvers import reverse_lazy |
7 | 8 | from django.utils.translation import ugettext_lazy as _ |
8 | 9 | from rolepermissions.shortcuts import assign_role |
9 | 10 | from .models import User |
10 | -from .forms import UserForm, ProfileForm | |
11 | +from .forms import UserForm, ProfileForm, UpdateUserForm | |
11 | 12 | |
12 | 13 | class UsersListView(HasRoleMixin, LoginRequiredMixin, generic.ListView): |
13 | 14 | |
... | ... | @@ -19,7 +20,13 @@ class UsersListView(HasRoleMixin, LoginRequiredMixin, generic.ListView): |
19 | 20 | paginate_by = 10 |
20 | 21 | |
21 | 22 | def get_queryset(self): |
22 | - users = User.objects.exclude(username = self.request.user.username) | |
23 | + search = self.request.GET.get('search', None) | |
24 | + | |
25 | + if search is None: | |
26 | + users = User.objects.exclude(username = self.request.user.username) | |
27 | + else: | |
28 | + users = User.objects.filter(Q(username = search) | Q(name__icontains = search)) | |
29 | + | |
23 | 30 | return users |
24 | 31 | |
25 | 32 | class Create(HasRoleMixin, LoginRequiredMixin, generic.edit.CreateView): |
... | ... | @@ -125,3 +132,21 @@ class EditProfile(LoginRequiredMixin, generic.UpdateView): |
125 | 132 | messages.success(self.request, _('Profile edited successfully!')) |
126 | 133 | |
127 | 134 | return super(EditProfile, self).form_valid(form) |
135 | + | |
136 | +class UpdateUser(LoginRequiredMixin, generic.edit.UpdateView): | |
137 | + allowed_roles = ['student'] | |
138 | + login_url = reverse_lazy("core:home") | |
139 | + # template_name = 'users/edit_profile.html' | |
140 | + form_class = UpdateUserForm | |
141 | + success_url = reverse_lazy('app:index') | |
142 | + | |
143 | + def get_object(self): | |
144 | + user = get_object_or_404(User, username = self.request.user.username) | |
145 | + return user | |
146 | + | |
147 | + def form_valid(self, form): | |
148 | + form.save() | |
149 | + messages.success(self.request, _('Profile edited successfully!')) | |
150 | + | |
151 | + return super(UpdateUser, self).form_valid(form) | |
152 | + | ... | ... |