1 | """ |
---|
2 | Sistema Estadístico Integral de Venezuela - (SEIVEN) |
---|
3 | |
---|
4 | Copyleft (@) 2015 CENDITEL nodo Mérida - https://mpv.cenditel.gob.ve/seiven |
---|
5 | """ |
---|
6 | ## @namespace base.views |
---|
7 | # |
---|
8 | # Contiene las clases, atributos, métodos y/o funciones a implementar para las vistas del módulo base |
---|
9 | # @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) |
---|
10 | # @author <a href='http://www.cenditel.gob.ve'>Centro Nacional de Desarrollo e Investigación en Tecnologías Libres |
---|
11 | # (CENDITEL) nodo Mérida - Venezuela</a> |
---|
12 | # @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
13 | from __future__ import unicode_literals |
---|
14 | |
---|
15 | from django.contrib.auth.decorators import login_required |
---|
16 | from django.shortcuts import render_to_response, redirect |
---|
17 | from django.template import RequestContext |
---|
18 | |
---|
19 | from usuario.forms import AutenticarForm |
---|
20 | |
---|
21 | __licence__ = "GNU Public License v2" |
---|
22 | __revision__ = "" |
---|
23 | __docstring__ = "DoxyGen" |
---|
24 | |
---|
25 | @login_required |
---|
26 | def inicio(request): |
---|
27 | """! |
---|
28 | Función que permite cargar la pantalla de inicio del sistema |
---|
29 | |
---|
30 | @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) |
---|
31 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
32 | @date 01-06-2016 |
---|
33 | @param request <b>{object}</b> Objeto que obtiene la petición |
---|
34 | @return Devuelve el response con la página de inicio del sistema |
---|
35 | """ |
---|
36 | form = '' |
---|
37 | |
---|
38 | if not request.user.is_authenticated: |
---|
39 | form = AutenticarForm() |
---|
40 | return redirect('acceso') |
---|
41 | |
---|
42 | return render_to_response('base.template.html', {'form': form}, context_instance=RequestContext(request)) |
---|