From e6832d6ae864402c14e6c28d319f8a89e3bb5b13 Mon Sep 17 00:00:00 2001 From: Jailson Dias Date: Fri, 2 Sep 2016 11:19:32 -0300 Subject: [PATCH] Refatoração das URL's --- amadeus/urls.py | 10 ++++------ app/templates/home_app.html | 20 ++++++++++---------- app/urls.py | 4 +--- core/templates/base.html | 22 +++++++++++----------- core/templates/create_account.html | 64 ++++++++++++++++++++++++++++++++-------------------------------- core/templates/lembrar_senha.html | 62 +++++++++++++++++++++++++++++++------------------------------- core/urls.py | 10 ++++++++++ courses/templates/category/create.html | 4 ++-- courses/templates/category/delete.html | 8 ++++---- courses/templates/category/index.html | 12 ++++++------ courses/templates/category/update.html | 4 ++-- courses/templates/category/view.html | 6 +++--- courses/templates/course/create.html | 4 ++-- courses/templates/course/delete.html | 10 +++++----- courses/templates/course/filtered.html | 8 ++++---- courses/templates/course/index.html | 16 ++++++++-------- courses/templates/course/update.html | 4 ++-- courses/templates/course/view.html | 14 +++++++------- courses/templates/module/create.html | 16 ++++++++-------- courses/templates/module/delete.html | 16 ++++++++-------- courses/templates/module/index.html | 22 +++++++++++----------- courses/templates/module/update.html | 16 ++++++++-------- users/templates/list_users.html | 4 ++-- users/templates/users/create.html | 6 +++--- users/templates/users/edit_profile.html | 4 ++-- users/templates/users/index.html | 10 +++++----- users/templates/users/profile.html | 4 ++-- users/templates/users/update.html | 6 +++--- users/templates/users/view.html | 10 +++++----- 29 files changed, 201 insertions(+), 195 deletions(-) create mode 100644 core/urls.py diff --git a/amadeus/urls.py b/amadeus/urls.py index 1cf4792..81a2db1 100644 --- a/amadeus/urls.py +++ b/amadeus/urls.py @@ -17,16 +17,14 @@ Including another URLconf from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static -from django.contrib.auth import views as auth_views from django.contrib import admin -from core import views - urlpatterns = [ - url(r'^$', auth_views.login, {'template_name': 'index.html'}, name='home'), - url(r'^logout/$', auth_views.logout, {'next_page': 'home'}, name='logout'), url(r'^app/', include('app.urls', namespace = 'app')), + url(r'^course/', include('courses.urls', namespace = 'course')), + url(r'^users/', include('users.urls', namespace = 'users')), url(r'^admin/', admin.site.urls), + url(r'^', include('core.urls', namespace = 'core')), ] -urlpatterns += static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT) \ No newline at end of file +urlpatterns += static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT) diff --git a/app/templates/home_app.html b/app/templates/home_app.html index ece1e08..47d43c6 100644 --- a/app/templates/home_app.html +++ b/app/templates/home_app.html @@ -11,7 +11,7 @@
@@ -23,8 +23,8 @@ {% trans 'Users Online (1)' %} {% endblock %} @@ -35,7 +35,7 @@
{% trans 'Courses' %}
- + {% if courses|length > 0 %} {% for course in courses %} @@ -53,21 +53,21 @@ {% endblock %} {% block rightbar %} -
+

{% trans 'Goals' %}
-

+ - + - +
70% de Presenca nas aulas
30/11 - Entrega das notas finais
-
-{% endblock rightbar %} \ No newline at end of file +
+{% endblock rightbar %} diff --git a/app/urls.py b/app/urls.py index ee36fab..5e58993 100644 --- a/app/urls.py +++ b/app/urls.py @@ -4,6 +4,4 @@ from . import views urlpatterns = [ url(r'^$', views.index, name='index'), - url(r'^', include('courses.urls', namespace = 'course')), - url(r'^', include('users.urls', namespace = 'users')), -] \ No newline at end of file +] diff --git a/core/templates/base.html b/core/templates/base.html index 09959ce..37ae9f0 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,16 +1,16 @@ - + {% load static i18n %} {{ title }} - + - + @@ -19,14 +19,14 @@ {% endblock %} - + {% block javascript %} - + {% endblock %} @@ -46,28 +46,28 @@ {% endblock %} - +
{% block breadcrumbs %} - + {% endblock %}
{% block sidebar %} - + {% endblock %}
{% block content %} - + {% endblock %}
{% block rightbar %} - + {% endblock rightbar %}
- \ No newline at end of file + diff --git a/core/templates/create_account.html b/core/templates/create_account.html index 761c9b0..7fa08e2 100644 --- a/core/templates/create_account.html +++ b/core/templates/create_account.html @@ -1,15 +1,15 @@ - + {% load static %} - @@ -21,16 +21,16 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título - @@ -38,15 +38,15 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título Projeto Amadeus - + - + - + @@ -60,7 +60,7 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
-
+
 
Entrar
@@ -77,16 +77,16 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
- @@ -95,9 +95,9 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título - +
- + O Projeto  |  Grupo CCTE @@ -117,11 +117,11 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
  • Lembrar senha
  • - +
    - +
    Nome completo
    Seu nome completo
    @@ -153,18 +153,18 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    - +
    - @@ -177,5 +177,5 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título - - \ No newline at end of file + + diff --git a/core/templates/lembrar_senha.html b/core/templates/lembrar_senha.html index 1d62b63..6671223 100644 --- a/core/templates/lembrar_senha.html +++ b/core/templates/lembrar_senha.html @@ -1,15 +1,15 @@ - + {% load static %} - @@ -21,16 +21,16 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título - @@ -38,15 +38,15 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título Projeto Amadeus - + - + - + @@ -60,7 +60,7 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    - +
     
    Entrar
    @@ -78,16 +78,16 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    - @@ -96,9 +96,9 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título - +
    - + O Projeto  |  Grupo CCTE @@ -121,8 +121,8 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    - - + +
    Endereço de e-mail
    @@ -139,20 +139,20 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título // --> -
    +
    - @@ -166,4 +166,4 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título - \ No newline at end of file + diff --git a/core/urls.py b/core/urls.py new file mode 100644 index 0000000..f5a8a9d --- /dev/null +++ b/core/urls.py @@ -0,0 +1,10 @@ +from django.conf.urls import url, include +from django.contrib.auth import views as auth_views + +from . import views + +urlpatterns = [ + url(r'^$', views.index, name='index'), + url(r'^login/$', auth_views.login, {'template_name': 'index.html'}, name='home'), + url(r'^logout/$', auth_views.logout, {'next_page': 'home'}, name='logout'), +] diff --git a/courses/templates/category/create.html b/courses/templates/category/create.html index c6a79a9..814a0c6 100644 --- a/courses/templates/category/create.html +++ b/courses/templates/category/create.html @@ -12,7 +12,7 @@ {% block sidebar %}
    - + {% trans 'Categories' %}
    @@ -50,4 +50,4 @@ {% endfor %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/courses/templates/category/delete.html b/courses/templates/category/delete.html index 0b11d74..ebbaafe 100644 --- a/courses/templates/category/delete.html +++ b/courses/templates/category/delete.html @@ -11,10 +11,10 @@ {% block sidebar %}
    - + {% trans 'Categories' %} - + {% trans 'Create Category' %}
    @@ -25,6 +25,6 @@ {% csrf_token %}

    {% trans 'Are you sure you want to delete the category' %} "{{ object }}"?

    - {% trans 'No' %} + {% trans 'No' %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/courses/templates/category/index.html b/courses/templates/category/index.html index a858658..224cc01 100644 --- a/courses/templates/category/index.html +++ b/courses/templates/category/index.html @@ -11,10 +11,10 @@ {% block sidebar %}
    - + {% trans 'Categories' %} - + {% trans 'Create Category' %}
    @@ -47,9 +47,9 @@ {{ category }} {{ category.slug }} - - - + + + {% endfor %} @@ -63,4 +63,4 @@ -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/courses/templates/category/update.html b/courses/templates/category/update.html index 318a3b5..5bf7173 100644 --- a/courses/templates/category/update.html +++ b/courses/templates/category/update.html @@ -12,7 +12,7 @@ {% block sidebar %}
    - + {% trans 'Categories' %}
    @@ -50,4 +50,4 @@ {% endfor %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/courses/templates/category/view.html b/courses/templates/category/view.html index e4e471d..8f68de7 100644 --- a/courses/templates/category/view.html +++ b/courses/templates/category/view.html @@ -11,10 +11,10 @@ {% block sidebar %}
    - + {% trans 'Categories' %} - + {% trans 'Create Category' %} @@ -33,4 +33,4 @@

    {% trans 'Slug:' %} {{ category.slug }}

    -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/courses/templates/course/create.html b/courses/templates/course/create.html index 6307cdf..5fe8aca 100644 --- a/courses/templates/course/create.html +++ b/courses/templates/course/create.html @@ -12,7 +12,7 @@ {% block sidebar %}
    - + {% trans 'Courses' %}
    @@ -51,4 +51,4 @@
    -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/courses/templates/course/delete.html b/courses/templates/course/delete.html index 929e6e9..7cadd53 100644 --- a/courses/templates/course/delete.html +++ b/courses/templates/course/delete.html @@ -5,16 +5,16 @@ {% block breadcrumbs %} {% endblock %} {% block sidebar %}
    - + {% trans 'Courses' %} - + {% trans 'Create Course' %}
    @@ -26,6 +26,6 @@ {% csrf_token %}

    {% trans 'Are you sure you want to delete the couse' %} "{{ object }}"?

    - {% trans 'No' %} + {% trans 'No' %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/courses/templates/course/filtered.html b/courses/templates/course/filtered.html index 39c703c..97f56f2 100644 --- a/courses/templates/course/filtered.html +++ b/courses/templates/course/filtered.html @@ -4,10 +4,10 @@ {% block sidebar %}
    - + {% trans 'Courses' %} - + {% trans 'Create Course' %}
    @@ -21,11 +21,11 @@ {% endif %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/courses/templates/course/index.html b/courses/templates/course/index.html index 2d1b08e..ded9f7b 100644 --- a/courses/templates/course/index.html +++ b/courses/templates/course/index.html @@ -11,10 +11,10 @@ {% block sidebar %}
    - + {% trans 'Courses' %} - + {% trans 'Create Course' %}
    @@ -28,7 +28,7 @@ -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/users/templates/users/profile.html b/users/templates/users/profile.html index f6a2209..41793f4 100644 --- a/users/templates/users/profile.html +++ b/users/templates/users/profile.html @@ -12,10 +12,10 @@ {% block sidebar %}
    - + {% trans 'Profile' %} - + {% trans 'Edit Profile' %}
    diff --git a/users/templates/users/update.html b/users/templates/users/update.html index 4d92351..662a6f5 100644 --- a/users/templates/users/update.html +++ b/users/templates/users/update.html @@ -12,10 +12,10 @@ {% block sidebar %}
    - + {% trans 'System Users' %} - + {% trans 'New Account' %} @@ -57,4 +57,4 @@
    -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/users/templates/users/view.html b/users/templates/users/view.html index 93bb0f8..b3a0fa0 100644 --- a/users/templates/users/view.html +++ b/users/templates/users/view.html @@ -11,16 +11,16 @@ {% block sidebar %}
    -{% endblock %} \ No newline at end of file +{% endblock %} -- libgit2 0.21.2