1 | from django.contrib.gis import admin as adminGeo |
---|
2 | from django.contrib import admin |
---|
3 | from explicacion_situacional.modelsEncuestas.modelsConsultas import * |
---|
4 | from explicacion_situacional.modelsEncuestas.modelsParticipacion import * |
---|
5 | from explicacion_situacional.modelsExplicacion.modelsExplicacionesSituacional import * |
---|
6 | |
---|
7 | class RespuestaSinoAdmin(admin.ModelAdmin): |
---|
8 | """! |
---|
9 | Clase que agrega modelo RespuestaSino en el panel administrativo |
---|
10 | |
---|
11 | @author Lully Troconis (ltroconis at cenditel.gob.ve) |
---|
12 | @copyright <a href='http://conocimientolibre.cenditel.gob.ve/licencia-de-software-v-1-3/'>Licencia de Software CENDITEL versión 1.2</a> |
---|
13 | @date 10-07-2018 |
---|
14 | """ |
---|
15 | ## Mostrar los campos |
---|
16 | list_display = ('user','pregunta', 'respuesta',) |
---|
17 | ## Filtrar por campos |
---|
18 | list_filter = ('user',) |
---|
19 | |
---|
20 | ## Mostrar 25 registros por página |
---|
21 | list_per_page = 25 |
---|
22 | |
---|
23 | ## Ordenar por usuario |
---|
24 | ordering = ('user',) |
---|
25 | |
---|
26 | ## Buscar por campos |
---|
27 | #search_fields = ('pregunta','user',) |
---|
28 | |
---|
29 | class CaracterizacionAdmin(admin.ModelAdmin): |
---|
30 | """! |
---|
31 | Clase que agrega modelo Caracterizacion en el panel administrativo |
---|
32 | |
---|
33 | @author Lully Troconis (ltroconis at cenditel.gob.ve) |
---|
34 | @copyright <a href='http://conocimientolibre.cenditel.gob.ve/licencia-de-software-v-1-3/'>Licencia de Software CENDITEL versión 1.2</a> |
---|
35 | @date 10-07-2018 |
---|
36 | """ |
---|
37 | ## Mostrar los campos |
---|
38 | list_display = ('caracterizacion', 'descripcion',) |
---|
39 | ## Filtrar por campos |
---|
40 | list_filter = ('caracterizacion',) |
---|
41 | |
---|
42 | ## Mostrar 25 registros por página |
---|
43 | list_per_page = 25 |
---|
44 | |
---|
45 | ## Ordenar por usuario |
---|
46 | ordering = ('caracterizacion',) |
---|
47 | |
---|
48 | class ConsultaAdmin(admin.ModelAdmin): |
---|
49 | """! |
---|
50 | Clase que agrega modelo Consulta en el panel administrativo |
---|
51 | |
---|
52 | @author Lully Troconis (ltroconis at cenditel.gob.ve) |
---|
53 | @copyright <a href='http://conocimientolibre.cenditel.gob.ve/licencia-de-software-v-1-3/'>Licencia de Software CENDITEL versión 1.2</a> |
---|
54 | @date 10-07-2018 |
---|
55 | """ |
---|
56 | ## Mostrar los campos |
---|
57 | list_display = ('user','activa' ,'nombre_consulta','fk_caracterizacion',) |
---|
58 | ## Filtrar por campos |
---|
59 | list_filter = ('user',) |
---|
60 | |
---|
61 | ## Mostrar 25 registros por página |
---|
62 | list_per_page = 25 |
---|
63 | |
---|
64 | ## Ordenar por usuario |
---|
65 | ordering = ('user',) |
---|
66 | |
---|
67 | class PreguntaAdmin(admin.ModelAdmin): |
---|
68 | """! |
---|
69 | Clase que agrega modelo Pregunta en el panel administrativo |
---|
70 | |
---|
71 | @author Lully Troconis (ltroconis at cenditel.gob.ve) |
---|
72 | @copyright <a href='http://conocimientolibre.cenditel.gob.ve/licencia-de-software-v-1-3/'>Licencia de Software CENDITEL versión 1.2</a> |
---|
73 | @date 10-07-2018 |
---|
74 | """ |
---|
75 | ## Mostrar los campos |
---|
76 | list_display = ('consulta', 'tipo_pregunta', 'texto_pregunta',) |
---|
77 | ## Filtrar por campos |
---|
78 | list_filter = ('consulta',) |
---|
79 | |
---|
80 | ## Mostrar 25 registros por página |
---|
81 | list_per_page = 25 |
---|
82 | |
---|
83 | ## Ordenar por usuario |
---|
84 | ordering = ('consulta',) |
---|
85 | |
---|
86 | class OpcionAdmin(admin.ModelAdmin): |
---|
87 | """! |
---|
88 | Clase que agrega modelo Opcion en el panel administrativo |
---|
89 | |
---|
90 | @author Lully Troconis (ltroconis at cenditel.gob.ve) |
---|
91 | @copyright <a href='http://conocimientolibre.cenditel.gob.ve/licencia-de-software-v-1-3/'>Licencia de Software CENDITEL versión 1.2</a> |
---|
92 | @date 10-07-2018 |
---|
93 | """ |
---|
94 | ## Mostrar los campos |
---|
95 | list_display = ('pregunta', 'texto_opcion',) |
---|
96 | ## Filtrar por campos |
---|
97 | list_filter = ('texto_opcion',) |
---|
98 | |
---|
99 | ## Mostrar 25 registros por página |
---|
100 | list_per_page = 25 |
---|
101 | |
---|
102 | ## Ordenar por usuario |
---|
103 | ordering = ('texto_opcion',) |
---|
104 | |
---|
105 | class RespuestaOpcionesAdmin(admin.ModelAdmin): |
---|
106 | """! |
---|
107 | Clase que agrega modelo RespuestaOpciones en el panel administrativo |
---|
108 | |
---|
109 | @author Lully Troconis (ltroconis at cenditel.gob.ve) |
---|
110 | @copyright <a href='http://conocimientolibre.cenditel.gob.ve/licencia-de-software-v-1-3/'>Licencia de Software CENDITEL versión 1.2</a> |
---|
111 | @date 10-07-2018 |
---|
112 | """ |
---|
113 | ## Mostrar los campos |
---|
114 | list_display = ('opcion', 'user',) |
---|
115 | ## Filtrar por campos |
---|
116 | list_filter = ('user',) |
---|
117 | |
---|
118 | ## Mostrar 25 registros por página |
---|
119 | list_per_page = 25 |
---|
120 | |
---|
121 | ## Ordenar por usuario |
---|
122 | ordering = ('user',) |
---|
123 | |
---|
124 | class RespuestaAbiertaAdmin(admin.ModelAdmin): |
---|
125 | """! |
---|
126 | Clase que agrega modelo RespuestaAbierta en el panel administrativo |
---|
127 | |
---|
128 | @author Lully Troconis (ltroconis at cenditel.gob.ve) |
---|
129 | @copyright <a href='http://conocimientolibre.cenditel.gob.ve/licencia-de-software-v-1-3/'>Licencia de Software CENDITEL versión 1.2</a> |
---|
130 | @date 10-07-2018 |
---|
131 | """ |
---|
132 | ## Mostrar los campos |
---|
133 | list_display = ('user', 'pregunta', 'es_justificacion',) |
---|
134 | ## Filtrar por campos |
---|
135 | list_filter = ('user',) |
---|
136 | |
---|
137 | ## Mostrar 25 registros por página |
---|
138 | list_per_page = 25 |
---|
139 | |
---|
140 | ## Ordenar por usuario |
---|
141 | ordering = ('user',) |
---|
142 | |
---|
143 | class RespuestaUbicacionAdmin(admin.ModelAdmin): |
---|
144 | """! |
---|
145 | Clase que agrega modelo RespuestaUbicacion en el panel administrativo |
---|
146 | |
---|
147 | @author Lully Troconis (ltroconis at cenditel.gob.ve) |
---|
148 | @copyright <a href='http://conocimientolibre.cenditel.gob.ve/licencia-de-software-v-1-3/'>Licencia de Software CENDITEL versión 1.2</a> |
---|
149 | @date 10-07-2018 |
---|
150 | """ |
---|
151 | ## Mostrar los campos |
---|
152 | list_display = ('user', 'pregunta', 'coordenadas',) |
---|
153 | ## Filtrar por campos |
---|
154 | list_filter = ('user',) |
---|
155 | |
---|
156 | ## Mostrar 25 registros por página |
---|
157 | list_per_page = 25 |
---|
158 | |
---|
159 | ## Ordenar por usuario |
---|
160 | ordering = ('user',) |
---|
161 | |
---|
162 | class ExplicSitConsultaAdmin(admin.ModelAdmin): |
---|
163 | """! |
---|
164 | Clase que agrega modelo ExplicSitConsulta en el panel administrativo |
---|
165 | |
---|
166 | @author Lully Troconis (ltroconis at cenditel.gob.ve) |
---|
167 | @copyright <a href='http://conocimientolibre.cenditel.gob.ve/licencia-de-software-v-1-3/'>Licencia de Software CENDITEL versión 1.2</a> |
---|
168 | @date 10-07-2018 |
---|
169 | """ |
---|
170 | ## Mostrar los campos |
---|
171 | list_display = ('fk_consulta', 'fk_explicacion',) |
---|
172 | ## Filtrar por campos |
---|
173 | list_filter = ('fk_consulta',) |
---|
174 | |
---|
175 | ## Mostrar 25 registros por página |
---|
176 | list_per_page = 25 |
---|
177 | |
---|
178 | ## Ordenar por usuario |
---|
179 | ordering = ('fk_consulta',) |
---|
180 | |
---|
181 | ## Registra cada modelo en el panel administrativo |
---|
182 | #admin.site.register(RespuestaSino) |
---|
183 | admin.site.register(RespuestaSino, RespuestaSinoAdmin) |
---|
184 | admin.site.register(Caracterizacion, CaracterizacionAdmin) |
---|
185 | admin.site.register(Consulta, ConsultaAdmin) |
---|
186 | admin.site.register(TipoPregunta) |
---|
187 | admin.site.register(Pregunta, PreguntaAdmin) |
---|
188 | admin.site.register(Opcion) |
---|
189 | admin.site.register(RespuestaOpciones, RespuestaOpcionesAdmin) |
---|
190 | admin.site.register(RespuestaAbierta, RespuestaAbiertaAdmin) |
---|
191 | admin.site.register(RespuestaUbicacion, RespuestaUbicacionAdmin) |
---|
192 | admin.site.register(ExplicacionSituacional, adminGeo.OSMGeoAdmin) |
---|
193 | admin.site.register(ExplicSitConsulta, ExplicSitConsultaAdmin) |
---|