Commit b04cf50a4dd6454906688d1a7236bd455d882a2c
1 parent
2666c250
Exists in
master
and in
5 other branches
Started the app avaliacao
Showing
12 changed files
with
51 additions
and
7 deletions
Show diff stats
amadeus/settings.py
... | ... | @@ -0,0 +1,20 @@ |
1 | +from django.utils.translation import ugettext_lazy as _ | |
2 | +from django.db import models | |
3 | +from autoslug.fields import AutoSlugField | |
4 | +from users.models import User | |
5 | +from core.models import Resource | |
6 | +from courses.models import Activity | |
7 | + | |
8 | +class Avaliacao(Activity): | |
9 | + | |
10 | + name_avalicao = models.CharField(_('Name'), max_length = 100) | |
11 | + init_date = models.DateField(_('Begin of Avaliacao Date')) | |
12 | + end_date = models.DateField(_('End of Avaliacao Date')) | |
13 | + | |
14 | + class Meta: | |
15 | + #ordering = ('create_date','name') | |
16 | + verbose_name = _('Avaliacao') | |
17 | + verbose_name_plural = _('Avaliacoes') | |
18 | + | |
19 | +def __str__(self): | |
20 | + return str(self.name) + str("/") + str(self.topic) | ... | ... |
core/urls.py
1 | 1 | from django.conf.urls import url, include |
2 | 2 | from django.contrib.auth import views as auth_views |
3 | 3 | from django.contrib.auth.views import password_reset, password_reset_done,password_reset_confirm, password_reset_complete |
4 | - | |
5 | 4 | from . import views |
6 | 5 | |
7 | 6 | |
... | ... | @@ -12,10 +11,13 @@ urlpatterns = [ |
12 | 11 | url(r'^logout/$', auth_views.logout, {'next_page': 'core:home'}, name='logout'), |
13 | 12 | url(r'^notification/([0-9]+)/$', views.processNotification, name='notification_read'), |
14 | 13 | url(r'^getNotifications/$', views.getNotifications, name='getNotifications'), |
14 | +] | |
15 | 15 | |
16 | - url(r'^reset/$', password_reset, {'template_name':'registration/passwor_reset_form.html','email_template_name':'registration/password_reset_email.html','post_reset_redirect':'done/'}, name="password_reset"), | |
17 | - url(r'^reset/done/$', password_reset_done, {'template_name':'registration/passwor_reset_done.html'}), | |
18 | - url(r'^reset/(?P<uidb36>[0-9A-Za-z]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', password_reset_confirm, {'template_name':'registration/password_reset_confirm.html'}), | |
19 | - url(r'^done/$', password_reset_complete,{'template_name':'registration/passwor_reset_complete.html'}), | |
16 | +#Reset Password | |
17 | +urlpatterns += [ | |
18 | + url(r'^password/reset/$', password_reset, {'post_reset_redirect' : 'password/reset/done/','template_name': 'registration/passwor_reset_form.html'}, name="password_reset"), | |
19 | + url(r'^password/reset/done/$', password_reset_done, {'template_name': 'registration/passwor_reset_done.html'}), | |
20 | + url(r'^password/reset/(?P<uidb36>[0-9A-Za-z]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', password_reset_confirm, {'post_reset_redirect' : 'password/done/', 'template_name': 'registration/password_reset_confirm.html'}), | |
21 | + url(r'^password/done/$', password_reset_complete,{'template_name': 'registration/passwor_reset_complete.html'}), | |
20 | 22 | |
21 | 23 | ] | ... | ... |
courses/urls.py
... | ... | @@ -25,6 +25,6 @@ urlpatterns = [ |
25 | 25 | |
26 | 26 | |
27 | 27 | url(r'^forum/', include('forum.urls', namespace = 'forum')), |
28 | - url(r'^poll/', include('poll.urls', namespace = 'poll')) | |
29 | - | |
28 | + url(r'^poll/', include('poll.urls', namespace = 'poll')), | |
29 | + url(r'^avaliacao/', include('avaliacao.urls', namespace = 'avaliacao')) | |
30 | 30 | ] | ... | ... |