Conjunto f35bc20 en sapic
- Fecha y hora:
- 14/09/2017 13:27:51 (hace 7 años)
- Branches:
- master, erwin, explicacion_situacional, taller_django
- Children:
- a376adf
- Parents:
- 9c2300c
- Ficheros:
-
- 1 añadido
- 6 editados
Leyenda
- No modificado
- Añadido
- Eliminado
-
explicacion_situacional/forms.py
r57f6191 rf35bc20 1 1 # -*- coding: utf-8 -*- 2 from django import forms3 from django.forms import ModelForm2 from django.contrib.gis import forms 3 #from django.forms import ModelForm 4 4 5 from .models import * 5 from explicacion_situacional.modelsExplicacion.modelsExplicacionesSituacional import * 6 7 8 class ExplicacionForms(forms.ModelForm): 9 10 class Meta: 11 model = ExplicacionSituacional 12 fields = '__all__' 13 14 def __init__(self, *args, **kwargs): 15 super(ExplicacionForms, self).__init__(*args, **kwargs) 16 self.fields['fk_organizacion'].widget.attrs.update({'class': 'form-control'}) 17 self.fields['fk_organizacion'].empty_label = 'Seleccione la organizacion social' 18 self.fields['fk_organizacion'].label = 'Organizacion Social' 19 self.fields['fk_organizacion'].required=True 20 21 self.fields['coordenadas'].widget=forms.OSMWidget(attrs = {'map_width': 600, 'map_height': 400, 'default_lat':8, 'default_lon':-66}) 22 self.fields['coordenadas'].required=True -
explicacion_situacional/urls.py
r57f6191 rf35bc20 4 4 from .views import * 5 5 6 urlpatterns = [] 6 urlpatterns = [ 7 url(r'^explicacion-situacional/', mapquestGeoAdmin.as_view(), name="explicacion_situacional"), 8 ] -
explicacion_situacional/views.py
r57f6191 rf35bc20 1 1 from django.shortcuts import render 2 from django.views.generic.edit import ( 3 FormView, UpdateView 4 ) 5 # Create your views here. 6 from django.contrib.gis.admin.options import OSMGeoAdmin 2 7 3 # Create your views here. 8 from .forms import ExplicacionForms 9 10 11 class mapquestGeoAdmin(FormView): 12 form_class = ExplicacionForms 13 template_name = 'map.explicacion.situacional.html' 14 success_url = '/inicio/' -
sapic/settings_default.py
r54f032c rf35bc20 64 64 UTILS_TEMPLATES = os.path.join(BASE_DIR, "utils/templates") 65 65 USERS_TEMPLATES = os.path.join(BASE_DIR, "users/templates") 66 66 EXSIT_TEMPLATES = os.path.join(BASE_DIR, "explicacion_situacional/templates") 67 67 68 68 TEMPLATES = [ 69 69 { 70 70 'BACKEND': 'django.template.backends.django.DjangoTemplates', 71 'DIRS': [UTILS_TEMPLATES, USERS_TEMPLATES ],71 'DIRS': [UTILS_TEMPLATES, USERS_TEMPLATES, EXSIT_TEMPLATES], 72 72 'APP_DIRS': True, 73 73 'OPTIONS': { -
sapic/urls.py
r10f099e rf35bc20 40 40 url(r'^', include('users.urls', namespace="users")), 41 41 url(r'^', include('organizaciones.urls', namespace="organizaciones")), 42 url(r'^', include('explicacion_situacional.urls', namespace="explicacion")), 42 43 ] -
utils/templates/base.inicio.html
rdef38c0 rf35bc20 46 46 <div class="row"> 47 47 <div class="col-md-3"> 48 <a href=" #">48 <a href="{% url 'explicacion:explicacion_situacional'%}"> 49 49 <img class="img-responsive center-block" src="{% static 'media/iconos/explicacion_situacional.png' %}" /> 50 50 </a>
Nota: Vea TracChangeset
para ayuda en el uso del visor de conjuntos de cambios.