o
    0h                  
   @   s   d dl mZmZ d dlmZ d dlmZ d dlZddddd	d
dddd	Zg dZ	g ddgg dg dg ddZ
dej dide ii i i i i i i d	Zg dZdd Zdd Zdd Zd d! ZdS )"    )	OrganismoDependencia)render_to_string)viewsNZ
Estructurau
   UbicaciónZServicioZContactoZEnlaceZMotivoZDestinoZMudanzazAlta de escuelas)	
estructura	ubicacionserviciocontactoenlacemotivodestinomudanzacarga)menu_principal
organismosescuelas)r   r   r   r	   r   )r
   r   r	   )r
   r   r   r	   )r
   r   r   r	   )altaalta-escuelasbajau   modificaciónr   r   nombretoken))#   )PREDIO   )zID/CUE   )ZNOMBRE
   )	MUNICIPIO	   )	LOCALIDADr   )u
   DIRECCIÓNr   )LATITUD   )LONGITUDr!   )u   ÁMBITOr   )u
   MATRÍCULAr   )u   PISO TECNOLÓGICOr!   )u   VÍNC. PRINCIPALr!   c                 C   s  | j d}|dkr|dkrdS |dkr| jdr0t| \}}dtdd||d	| d
d fS | jdrId| jd< | jd= dtdddid fS | j d}|tv rld| jd< || jd< || jd< dt|d i d fS |tv rd| jd< || jd< |t| t| d d}|t	t| d   dtd|dfS | jd}| jd}|d }|| jd< |t
t| krg }| jddkr| jd}nt| j D ]}|t| v r|t| | j|f q||td}dtd|d fS t| | }	t	|	 }dt|	d ||fS | jd}| jd}|dks|dkr)d| jd< dtdi d fS |tv r|dkrH| jd}
|
| jd< dt|
d i d fS |d }|| jd< |t
t| d krmd}d}|t| t| | d}nd}t| | d }i }|t	t| |   |t|||fS dS ) Nreq	siguienteanterior) r&   NZ
confirmadoZcargar_vistazconfirmado.htmlF)enviandocodigoerror)requestconfirmacionTr'   vistar   nivelmenuz.html)r   tabsZactivozpedidos.html   r   r   )Z	solicituddatosZcamposzconfirmacion.htmlZcargar_modulor   r   r   zmenu_principal.html)	reiniciarr&   N)POSTgetsessionr   enviar_formularior   menuspedidosupdatemoduloslenlistkeysappenddic_nombrescampos_escuelas)r*   r#   r(   Z	error_apir,   Zopcionesr-   r1   keymodulor.   acciontemplate rE   ZC:\Users\Usuario\Desktop\PROYECTOS\formulario\formularioweb\formulario\secuencia_vistas.py	get_vista*   s|   












rG   c                 C   s   t |  S N)r8   )r,   rE   rE   rF   get_moduloss   s   rI   c                 C   s,   | dkr| S |t t|  krdS t|  | S )Nr   r+   )r;   r8   )r,   r-   rE   rE   rF   
get_modulov   s
   rJ   c                   C   s   t S rH   )r@   rE   rE   rE   rF   get_campos_escuelas}   s   rK   )formulario.modelsr   r   django.template.loaderr   
formularior   uuidr?   r7   r8   objectsallorder_byuuid4r:   r@   rG   rI   rJ   rK   rE   rE   rE   rF   <module>   sH    

I