Commit b04cf50a4dd6454906688d1a7236bd455d882a2c

Authored by ifac0
1 parent 2666c250

Started the app avaliacao

amadeus/settings.py
... ... @@ -54,6 +54,7 @@ INSTALLED_APPS = [
54 54 'users',
55 55 'forum',
56 56 'poll',
  57 + 'avaliacao',
57 58 's3direct',
58 59 ]
59 60  
... ...
avaliacao/__init__.py 0 → 100644
avaliacao/admin.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.contrib import admin
  2 +
  3 +# Register your models here.
... ...
avaliacao/apps.py 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +from django.apps import AppConfig
  2 +
  3 +
  4 +class AvaliacaoConfig(AppConfig):
  5 + name = 'avaliacao'
... ...
avaliacao/migrations/__init__.py 0 → 100644
avaliacao/models.py 0 → 100644
... ... @@ -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)
... ...
avaliacao/tests.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.test import TestCase
  2 +
  3 +# Create your tests here.
... ...
avaliacao/urls.py 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +from django.conf.urls import url
  2 +
  3 +from . import views
  4 +
  5 +urlpatterns =[
  6 +
  7 +]
... ...
avaliacao/views.py 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +from django.shortcuts import render
  2 +
  3 +# Create your views here.
... ...
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 ]
... ...
manage.py 100755 → 100644