Conjunto 7ce4011 en sapic
- Fecha y hora:
- 14/08/2017 16:30:52 (hace 7 años)
- Branches:
- master, erwin, explicacion_situacional, gestion_usuarios, taller_django
- Children:
- d002267
- Parents:
- 2ab29c8
- Ficheros:
-
- 4 editados
Leyenda
- No modificado
- Añadido
- Eliminado
-
organizaciones/ajax.py
r79326b0 r7ce4011 61 61 " % (str(item.pk), str(item.fk_tipo_organizacion.tipo)) 62 62 if item.fecha_conformacion: 63 fecha_conformacion = item.fecha_conformacion.strftime("%Y-%m-%d %H:%M:%S")63 fecha_conformacion = item.fecha_conformacion.strftime("%Y-%m-%d") 64 64 else: 65 65 fecha_conformacion = "No ha ingresado" -
organizaciones/urls.py
r79326b0 r7ce4011 10 10 url(r'^registrar-organizacion/$', RegisterOrgView.as_view(), 11 11 name="registrar_organizacion"), 12 url(r'^listar-organizacion/$', ListOrgView ,12 url(r'^listar-organizacion/$', ListOrgView.as_view(), 13 13 name="listar_organizacion"), 14 14 -
organizaciones/views.py
r8741e74 r7ce4011 25 25 ) 26 26 from django.views.generic.base import RedirectView 27 from django.views.generic import ( 28 TemplateView 29 ) 27 30 from django.views.generic.edit import ( 28 31 FormView, UpdateView … … 89 92 90 93 91 def ListOrgView(request): 92 return render(request, 'organizaciones.list.html') 94 class ListOrgView(LoginRequeridoPerAuth, TemplateView): 95 """! 96 Listar usuarios de la plataforma 97 98 @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) 99 @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> 100 @date 30-05-2017 101 @version 1.0.0 102 """ 103 template_name = "organizaciones.list.html" 104 model = OrganizacionSocial 105 success_url = reverse_lazy('organizaciones:listar_organizacion') 106 group_required = [u"Administradores"] 107 108 def __init__(self): 109 super(ListOrgView, self).__init__() 110 111 def post(self, *args, **kwargs): 112 ''' 113 Cambia el estado activo a el usuario 114 @return: Dirige a la tabla que muestra los usuarios de la apliacion 115 ''' 116 accion = self.request.POST 117 activar = accion.get('activar', None) 118 inactivar = accion.get('inactivar', None) 119 estado = False 120 121 if activar is not None: 122 org = activar 123 estado = True 124 elif inactivar is not None: 125 org = inactivar 126 estado = False 127 else: 128 messages.error(self.request, "Esta intentando hacer \ 129 una accion incorrecta") 130 try: 131 org_act = self.model.objects.get(pk=org) 132 org_act.activa = estado 133 org_act.save() 134 if estado: 135 messages.success(self.request, "Se ha activado \ 136 la organizacion: %s\ 137 " % (str(org_act))) 138 else: 139 messages.warning(self.request, "Se ha inactivado \ 140 la organizacion: %s\ 141 " % (str(org_act))) 142 except: 143 messages.info(self.request, "La organizacion social no existe") 144 return redirect(self.success_url) -
static/css/checked_img.css
r57f6191 r7ce4011 2 2 3 3 input[type="checkbox"][id^="user"] { 4 display: none; 5 } 6 7 input[type="checkbox"][id^="org-"] { 4 8 display: none; 5 9 }
Nota: Vea TracChangeset
para ayuda en el uso del visor de conjuntos de cambios.