Conjunto 90a50de en sapic
- Fecha y hora:
- 17/08/2017 14:48:33 (hace 7 años)
- Branches:
- master, erwin, explicacion_situacional, gestion_usuarios, taller_django
- Children:
- 062ee25
- Parents:
- 9b2d259
- Ubicación:
- curso_django
- Ficheros:
-
- 6 editados
Leyenda
- No modificado
- Añadido
- Eliminado
-
curso_django/curso_django.aux
rfa1fdaf r90a50de 143 143 \@writefile{nav}{\headcommand {\slideentry {2}{15}{1}{36/36}{Crear Login}{0}}} 144 144 \@writefile{nav}{\headcommand {\beamer@framepages {36}{36}}} 145 \@writefile{toc}{\beamer@subsectionintoc {2}{16}{Registro de Usuarios}{37}{0}{2}} 146 \@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{2}{16}{37}{Registro de Usuarios}}\headcommand {\beamer@subsectionpages {36}{36}}} 147 \@writefile{nav}{\headcommand {\slideentry {2}{16}{1}{37/37}{Registro de Usuarios}{0}}} 145 \@writefile{nav}{\headcommand {\slideentry {2}{15}{2}{37/37}{Crear Login}{0}}} 148 146 \@writefile{nav}{\headcommand {\beamer@framepages {37}{37}}} 149 \@writefile{toc}{\beamer@subsectionintoc {2}{1 7}{Login required}{38}{0}{2}}150 \@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{2}{1 7}{38}{Login required}}\headcommand {\beamer@subsectionpages {37}{37}}}151 \@writefile{nav}{\headcommand {\slideentry {2}{1 7}{1}{38/38}{Login required}{0}}}147 \@writefile{toc}{\beamer@subsectionintoc {2}{16}{Registro de Usuarios}{38}{0}{2}} 148 \@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{2}{16}{38}{Registro de Usuarios}}\headcommand {\beamer@subsectionpages {36}{37}}} 149 \@writefile{nav}{\headcommand {\slideentry {2}{16}{1}{38/38}{Registro de Usuarios}{0}}} 152 150 \@writefile{nav}{\headcommand {\beamer@framepages {38}{38}}} 153 \@writefile{toc}{\beamer@subsectionintoc {2}{1 8}{Recuperar contrase\IeC {\~n}a por correo}{39}{0}{2}}154 \@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{2}{1 8}{39}{Recuperar contrase\IeC {\~n}a por correo}}\headcommand {\beamer@subsectionpages {38}{38}}}155 \@writefile{nav}{\headcommand {\slideentry {2}{1 8}{1}{39/39}{Recuperar contrase\IeC {\~n}a por correo}{0}}}151 \@writefile{toc}{\beamer@subsectionintoc {2}{17}{Login required}{39}{0}{2}} 152 \@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{2}{17}{39}{Login required}}\headcommand {\beamer@subsectionpages {38}{38}}} 153 \@writefile{nav}{\headcommand {\slideentry {2}{17}{1}{39/39}{Login required}{0}}} 156 154 \@writefile{nav}{\headcommand {\beamer@framepages {39}{39}}} 157 \@writefile{toc}{\beamer@subsectionintoc {2}{1 9}{Conceptos avanzados}{40}{0}{2}}158 \@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{2}{1 9}{40}{Conceptos avanzados}}\headcommand {\beamer@subsectionpages {39}{39}}}159 \@writefile{nav}{\headcommand {\slideentry {2}{1 9}{1}{40/40}{Conceptos avanzados}{0}}}155 \@writefile{toc}{\beamer@subsectionintoc {2}{18}{Recuperar contrase\IeC {\~n}a por correo}{40}{0}{2}} 156 \@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{2}{18}{40}{Recuperar contrase\IeC {\~n}a por correo}}\headcommand {\beamer@subsectionpages {39}{39}}} 157 \@writefile{nav}{\headcommand {\slideentry {2}{18}{1}{40/40}{Recuperar contrase\IeC {\~n}a por correo}{0}}} 160 158 \@writefile{nav}{\headcommand {\beamer@framepages {40}{40}}} 161 \@writefile{nav}{\headcommand {\beamer@partpages {1}{40}}} 162 \@writefile{nav}{\headcommand {\beamer@subsectionpages {40}{40}}} 163 \@writefile{nav}{\headcommand {\beamer@sectionpages {6}{40}}} 164 \@writefile{nav}{\headcommand {\beamer@documentpages {40}}} 165 \@writefile{nav}{\headcommand {\def \inserttotalframenumber {40}}} 159 \@writefile{toc}{\beamer@subsectionintoc {2}{19}{Conceptos avanzados}{41}{0}{2}} 160 \@writefile{nav}{\headcommand {\beamer@subsectionentry {0}{2}{19}{41}{Conceptos avanzados}}\headcommand {\beamer@subsectionpages {40}{40}}} 161 \@writefile{nav}{\headcommand {\slideentry {2}{19}{1}{41/41}{Conceptos avanzados}{0}}} 162 \@writefile{nav}{\headcommand {\beamer@framepages {41}{41}}} 163 \@writefile{nav}{\headcommand {\beamer@partpages {1}{41}}} 164 \@writefile{nav}{\headcommand {\beamer@subsectionpages {41}{41}}} 165 \@writefile{nav}{\headcommand {\beamer@sectionpages {6}{41}}} 166 \@writefile{nav}{\headcommand {\beamer@documentpages {41}}} 167 \@writefile{nav}{\headcommand {\def \inserttotalframenumber {41}}} -
curso_django/curso_django.nav
rfa1fdaf r90a50de 96 96 \headcommand {\slideentry {2}{15}{1}{36/36}{Crear Login}{0}} 97 97 \headcommand {\beamer@framepages {36}{36}} 98 \headcommand {\beamer@subsectionentry {0}{2}{16}{37}{Registro de Usuarios}}\headcommand {\beamer@subsectionpages {36}{36}} 99 \headcommand {\slideentry {2}{16}{1}{37/37}{Registro de Usuarios}{0}} 98 \headcommand {\slideentry {2}{15}{2}{37/37}{Crear Login}{0}} 100 99 \headcommand {\beamer@framepages {37}{37}} 101 \headcommand {\beamer@subsectionentry {0}{2}{1 7}{38}{Login required}}\headcommand {\beamer@subsectionpages {37}{37}}102 \headcommand {\slideentry {2}{1 7}{1}{38/38}{Login required}{0}}100 \headcommand {\beamer@subsectionentry {0}{2}{16}{38}{Registro de Usuarios}}\headcommand {\beamer@subsectionpages {36}{37}} 101 \headcommand {\slideentry {2}{16}{1}{38/38}{Registro de Usuarios}{0}} 103 102 \headcommand {\beamer@framepages {38}{38}} 104 \headcommand {\beamer@subsectionentry {0}{2}{1 8}{39}{Recuperar contrase\IeC {\~n}a por correo}}\headcommand {\beamer@subsectionpages {38}{38}}105 \headcommand {\slideentry {2}{1 8}{1}{39/39}{Recuperar contrase\IeC {\~n}a por correo}{0}}103 \headcommand {\beamer@subsectionentry {0}{2}{17}{39}{Login required}}\headcommand {\beamer@subsectionpages {38}{38}} 104 \headcommand {\slideentry {2}{17}{1}{39/39}{Login required}{0}} 106 105 \headcommand {\beamer@framepages {39}{39}} 107 \headcommand {\beamer@subsectionentry {0}{2}{1 9}{40}{Conceptos avanzados}}\headcommand {\beamer@subsectionpages {39}{39}}108 \headcommand {\slideentry {2}{1 9}{1}{40/40}{Conceptos avanzados}{0}}106 \headcommand {\beamer@subsectionentry {0}{2}{18}{40}{Recuperar contrase\IeC {\~n}a por correo}}\headcommand {\beamer@subsectionpages {39}{39}} 107 \headcommand {\slideentry {2}{18}{1}{40/40}{Recuperar contrase\IeC {\~n}a por correo}{0}} 109 108 \headcommand {\beamer@framepages {40}{40}} 110 \headcommand {\beamer@partpages {1}{40}} 111 \headcommand {\beamer@subsectionpages {40}{40}} 112 \headcommand {\beamer@sectionpages {6}{40}} 113 \headcommand {\beamer@documentpages {40}} 114 \headcommand {\def \inserttotalframenumber {40}} 109 \headcommand {\beamer@subsectionentry {0}{2}{19}{41}{Conceptos avanzados}}\headcommand {\beamer@subsectionpages {40}{40}} 110 \headcommand {\slideentry {2}{19}{1}{41/41}{Conceptos avanzados}{0}} 111 \headcommand {\beamer@framepages {41}{41}} 112 \headcommand {\beamer@partpages {1}{41}} 113 \headcommand {\beamer@subsectionpages {41}{41}} 114 \headcommand {\beamer@sectionpages {6}{41}} 115 \headcommand {\beamer@documentpages {41}} 116 \headcommand {\def \inserttotalframenumber {41}} -
curso_django/curso_django.out
rfa1fdaf r90a50de 19 19 \BOOKMARK [3][]{Outline0.2.14.35}{View's}{Outline0.2}% 19 20 20 \BOOKMARK [3][]{Outline0.2.15.36}{Crear Login}{Outline0.2}% 20 21 \BOOKMARK [3][]{Outline0.2.16.3 7}{Registro de Usuarios}{Outline0.2}% 2122 \BOOKMARK [3][]{Outline0.2.17.3 8}{Login required}{Outline0.2}% 2223 \BOOKMARK [3][]{Outline0.2.18. 39}{Recuperar contrase\361a por correo}{Outline0.2}% 2324 \BOOKMARK [3][]{Outline0.2.19.4 0}{Conceptos avanzados}{Outline0.2}% 2421 \BOOKMARK [3][]{Outline0.2.16.38}{Registro de Usuarios}{Outline0.2}% 21 22 \BOOKMARK [3][]{Outline0.2.17.39}{Login required}{Outline0.2}% 22 23 \BOOKMARK [3][]{Outline0.2.18.40}{Recuperar contrase\361a por correo}{Outline0.2}% 23 24 \BOOKMARK [3][]{Outline0.2.19.41}{Conceptos avanzados}{Outline0.2}% 24 -
curso_django/curso_django.tex
rfa1fdaf r90a50de 730 730 \begin{frame}[fragile] 731 731 \begin{verbatim} 732 732 Creamos la aplicacion user desde la consola: 733 734 python manage.py startapp user 735 736 Editamos el archivo user/views.py: 737 738 # -*- coding: utf-8 -*- 739 740 from django.shortcuts import render 741 from django.contrib import messages 742 from django.contrib.auth import ( 743 authenticate, logout, login 744 ) 745 from django.contrib.auth.models import ( 746 Group, Permission, User 747 ) 748 749 class LoginView(FormView): 750 form_class = FormularioLogin 751 template_name = 'users.login.html' 752 success_url = '/inicio/' 753 754 755 \end{verbatim} 756 \end{frame} 757 758 \begin{frame}[fragile] 759 \begin{verbatim} 760 def form_valid(self, form): 761 762 usuario = form.cleaned_data['usuario'] 763 contrasena = form.cleaned_data['contrasena'] 764 usuario = authenticate(username=usuario,password=contrasena) 765 766 if usuario is not None: 767 login(self.request, usuario) 768 messages.info(self.request,'Bienvenido %s has ingresado\ 769 Sistema con el usuario %s \ 770 ' % (usuario.first_name, 771 usuario.username)) 772 else: 773 self.success_url = reverse_lazy('users:login') 774 messages.warning(self.request,'Verifique su nombre y \ 775 contraseña\ 776 y vuelve a intertar') 777 778 return super(LoginView, self).form_valid(form) 779 733 780 \end{verbatim} 734 781 \end{frame} -
curso_django/curso_django.toc
rfa1fdaf r90a50de 21 21 \beamer@subsectionintoc {2}{14}{View's}{35}{0}{2} 22 22 \beamer@subsectionintoc {2}{15}{Crear Login}{36}{0}{2} 23 \beamer@subsectionintoc {2}{16}{Registro de Usuarios}{3 7}{0}{2}24 \beamer@subsectionintoc {2}{17}{Login required}{3 8}{0}{2}25 \beamer@subsectionintoc {2}{18}{Recuperar contrase\IeC {\~n}a por correo}{ 39}{0}{2}26 \beamer@subsectionintoc {2}{19}{Conceptos avanzados}{4 0}{0}{2}23 \beamer@subsectionintoc {2}{16}{Registro de Usuarios}{38}{0}{2} 24 \beamer@subsectionintoc {2}{17}{Login required}{39}{0}{2} 25 \beamer@subsectionintoc {2}{18}{Recuperar contrase\IeC {\~n}a por correo}{40}{0}{2} 26 \beamer@subsectionintoc {2}{19}{Conceptos avanzados}{41}{0}{2}
Nota: Vea TracChangeset
para ayuda en el uso del visor de conjuntos de cambios.