コード例 #1
0
from .forms import PostForm, PostEdAsteroidesForm
from .models import AsteroidesDefEd, PostEdAsteroides
from apps.crud import CRUD, vista, post, edit, delete

contexto = {'terminos': AsteroidesDefEd, 'general': PostEdAsteroides}

asteroide = CRUD(AsteroidesDefEd, 'educacion/asteroide/', 'asteroide',
                 PostForm, 'ed_', contexto)

ed_asteroide = lambda request: vista(request, asteroide)

ed_asteroide_post = lambda request: post(request, asteroide)

ed_asteroide_edit = lambda request, pk: edit(request, pk, asteroide)

ed_asteroide_delete = lambda request, pk: delete(request, pk, asteroide)

asteroide_general = CRUD(PostEdAsteroides, 'educacion/asteroide/', 'asteroide',
                         PostEdAsteroidesForm, 'ed_')

ed_asteroide_general_post = lambda request: post(request, asteroide_general)

ed_asteroide_general_edit = lambda request, pk: edit(request, pk,
                                                     asteroide_general)

ed_asteroide_general_delete = lambda request, pk: delete(
    request, pk, asteroide_general)
コード例 #2
0
from .forms import PostForm, PostAcLaderaForm
from .models import LaderaDefAc, PostAcLadera
from apps.crud import CRUD, vista, post, edit, delete

contexto = {'terminos': LaderaDefAc, 'general': PostAcLadera}

ladera = CRUD(LaderaDefAc, 'accion/ladera/', 'ladera', PostForm, 'ac_',
              contexto)

ac_ladera = lambda request: vista(request, ladera)

ac_ladera_post = lambda request: post(request, ladera)

ac_ladera_edit = lambda request, pk: edit(request, pk, ladera)

ac_ladera_delete = lambda request, pk: delete(request, pk, ladera)

ladera_general = CRUD(PostAcLadera, 'accion/ladera/', 'ladera',
                      PostAcLaderaForm, 'ac_')

ac_ladera_general_post = lambda request: post(request, ladera_general)

ac_ladera_general_edit = lambda request, pk: edit(request, pk, ladera_general)

ac_ladera_general_delete = lambda request, pk: delete(request, pk,
                                                      ladera_general)
コード例 #3
0
ファイル: views.py プロジェクト: Ivan252512/resiliencia
from .forms import PostForm, PostRefLaderaForm
from .models import LaderaDefRef, PostRefLadera
from apps.crud import CRUD, vista, post, edit, delete

contexto = {'terminos': LaderaDefRef, 'general': PostRefLadera}

ladera = CRUD(LaderaDefRef, 'reflexion/ladera/', 'ladera', PostForm, 'ref_',
              contexto)

ref_ladera = lambda request: vista(request, ladera)

ref_ladera_post = lambda request: post(request, ladera)

ref_ladera_edit = lambda request, pk: edit(request, pk, ladera)

ref_ladera_delete = lambda request, pk: delete(request, pk, ladera)

ladera_general = CRUD(PostRefLadera, 'reflexion/ladera/', 'ladera',
                      PostRefLaderaForm, 'ref_')

ref_ladera_general_post = lambda request: post(request, ladera_general)

ref_ladera_general_edit = lambda request, pk: edit(request, pk, ladera_general)

ref_ladera_general_delete = lambda request, pk: delete(request, pk,
                                                       ladera_general)
コード例 #4
0
ファイル: views.py プロジェクト: Ivan252512/resiliencia
from django.shortcuts import render

# Create your views here.
from .forms import PostForm
from .models import PostProyecto
from apps.crud import CRUD, post, edit, delete, vista

proyecto = CRUD(PostProyecto, 'proyectos/', 'proyectos', PostForm, '')

proyectos = lambda request: vista(request, proyecto)

proyectos_post = lambda request: post(request, proyecto)

proyectos_edit = lambda request, pk: edit(request, pk, proyecto)

proyectos_delete = lambda request, pk: delete(request, pk, proyecto)
コード例 #5
0
from .forms import PostForm, PostEdInundacionForm
from .models import InundacionesDefEd, PostEdInundacion
from apps.crud import CRUD, vista, post, edit, delete

contexto = {'terminos': InundacionesDefEd, 'general': PostEdInundacion}

inundacion = CRUD(InundacionesDefEd, 'educacion/inundacion/', 'inundacion',
                  PostForm, 'ed_', contexto)

ed_inundacion = lambda request: vista(request, inundacion)

ed_inundacion_post = lambda request: post(request, inundacion)

ed_inundacion_edit = lambda request, pk: edit(request, pk, inundacion)

ed_inundacion_delete = lambda request, pk: delete(request, pk, inundacion)

inundacion_general = CRUD(PostEdInundacion, 'educacion/inundacion/',
                          'inundacion', PostEdInundacionForm, 'ed_')

ed_inundacion_general_post = lambda request: post(request, inundacion_general)

ed_inundacion_general_edit = lambda request, pk: edit(request, pk,
                                                      inundacion_general)

ed_inundacion_general_delete = lambda request, pk: delete(
    request, pk, inundacion_general)
コード例 #6
0
ファイル: views.py プロジェクト: Ivan252512/resiliencia
from .forms import PostForm, PostRefAsteroideForm
from .models import AsteroidesDefRef, PostRefAsteroide
from apps.crud import CRUD, vista, post, edit, delete


contexto = {'terminos' : AsteroidesDefRef,
            'general' : PostRefAsteroide}

asteroide = CRUD(AsteroidesDefRef, 'reflexion/asteroide/', 'asteroide', PostForm, 'ref_', contexto)

ref_asteroide = lambda request : vista(request, asteroide)

ref_asteroide_post = lambda request : post(request, asteroide)

ref_asteroide_edit = lambda request, pk : edit(request, pk, asteroide)

ref_asteroide_delete = lambda request, pk : delete(request, pk, asteroide)



asteroide_general = CRUD(PostRefAsteroide, 'reflexion/asteroide/', 'asteroide', PostRefAsteroideForm, 'ref_')

ref_asteroide_general_post = lambda request : post(request, asteroide_general)

ref_asteroide_general_edit = lambda request, pk : edit(request, pk, asteroide_general)

ref_asteroide_general_delete = lambda request, pk : delete(request, pk, asteroide_general)

コード例 #7
0
from .forms import PostForm, PostEdSismoForm
from .models import SismoDefEd, PostEdSismo
from apps.crud import CRUD, vista, post, edit, delete

contexto = {'terminos': SismoDefEd, 'general': PostEdSismo}

sismo = CRUD(SismoDefEd, 'educacion/sismo/', 'sismo', PostForm, 'ed_',
             contexto)

ed_sismo = lambda request: vista(request, sismo)

ed_sismo_post = lambda request: post(request, sismo)

ed_sismo_edit = lambda request, pk: edit(request, pk, sismo)

ed_sismo_delete = lambda request, pk: delete(request, pk, sismo)

sismo_general = CRUD(PostEdSismo, 'educacion/sismo/', 'sismo', PostEdSismoForm,
                     'ed_')

ed_sismo_general_post = lambda request: post(request, sismo_general)

ed_sismo_general_edit = lambda request, pk: edit(request, pk, sismo_general)

ed_sismo_general_delete = lambda request, pk: delete(request, pk, sismo_general
                                                     )
コード例 #8
0
from .forms import PostForm, PostEdLaderaForm
from .models import LaderaDefEd, PostEdLadera
from apps.crud import CRUD, vista, post, edit, delete

contexto = {'terminos': LaderaDefEd, 'general': PostEdLadera}

ladera = CRUD(LaderaDefEd, 'educacion/ladera/', 'ladera', PostForm, 'ed_',
              contexto)

ed_ladera = lambda request: vista(request, ladera)

ed_ladera_post = lambda request: post(request, ladera)

ed_ladera_edit = lambda request, pk: edit(request, pk, ladera)

ed_ladera_delete = lambda request, pk: delete(request, pk, ladera)

ladera_general = CRUD(PostEdLadera, 'educacion/ladera/', 'ladera',
                      PostEdLaderaForm, 'ed_', contexto)

ed_ladera_general_post = lambda request: post(request, ladera_general)

ed_ladera_general_edit = lambda request, pk: edit(request, pk, ladera_general)

ed_ladera_general_delete = lambda request, pk: delete(request, pk,
                                                      ladera_general)
コード例 #9
0
from .forms import PostForm, PostAcSismoForm
from .models import SismoDefAc, PostAcSismo
from apps.crud import CRUD, vista, post, edit, delete

contexto = {'terminos': SismoDefAc, 'general': PostAcSismo}

sismo = CRUD(SismoDefAc, 'accion/sismo/', 'sismo', PostForm, 'ac_', contexto)

ac_sismo = lambda request: vista(request, sismo)

ac_sismo_post = lambda request: post(request, sismo)

ac_sismo_edit = lambda request, pk: edit(request, pk, sismo)

ac_sismo_delete = lambda request, pk: delete(request, pk, sismo)

sismo_general = CRUD(PostAcSismo, 'accion/sismo/', 'sismo', PostAcSismoForm,
                     'ac_')

ac_sismo_general_post = lambda request: post(request, sismo_general)

ac_sismo_general_edit = lambda request, pk: edit(request, pk, sismo_general)

ac_sismo_general_delete = lambda request, pk: delete(request, pk, sismo_general
                                                     )
コード例 #10
0
ファイル: views.py プロジェクト: Ivan252512/resiliencia
from .forms import PostForm, PostAcInundacionForm
from .models import InundacionesDefAc, PostAcInundacion
from apps.crud import CRUD, vista, post, edit, delete

contexto = {'terminos': InundacionesDefAc, 'general': PostAcInundacion}

inundacion = CRUD(InundacionesDefAc, 'accion/inundacion/', 'inundacion',
                  PostForm, 'ac_', contexto)

ac_inundacion = lambda request: vista(request, inundacion)

ac_inundacion_post = lambda request: post(request, inundacion)

ac_inundacion_edit = lambda request, pk: edit(request, pk, inundacion)

ac_inundacion_delete = lambda request, pk: delete(request, pk, inundacion)

inundacion_general = CRUD(PostAcInundacion, 'accion/inundacion/', 'inundacion',
                          PostAcInundacionForm, 'ac_', contexto)

ac_inundacion_general_post = lambda request: post(request, inundacion_general)

ac_inundacion_general_edit = lambda request, pk: edit(request, pk,
                                                      inundacion_general)

ac_inundacion_general_delete = lambda request, pk: delete(
    request, pk, inundacion_general)
コード例 #11
0
from .forms import PostForm, PostRefSismoForm
from .models import SismoDefRef, PostRefSismo
from apps.crud import CRUD, vista, post, edit, delete

contexto = {'terminos': SismoDefRef, 'general': PostRefSismo}

sismo = CRUD(SismoDefRef, 'reflexion/sismo/', 'sismo', PostForm, 'ref_',
             contexto)

ref_sismo = lambda request: vista(request, sismo)

ref_sismo_post = lambda request: post(request, sismo)

ref_sismo_edit = lambda request, pk: edit(request, pk, sismo)

ref_sismo_delete = lambda request, pk: delete(request, pk, sismo)

sismo_general = CRUD(PostRefSismo, 'reflexion/sismo/', 'sismo',
                     PostRefSismoForm, 'ref_')

ref_sismo_general_post = lambda request: post(request, sismo_general)

ref_sismo_general_edit = lambda request, pk: edit(request, pk, sismo_general)

ref_sismo_general_delete = lambda request, pk: delete(request, pk,
                                                      sismo_general)
コード例 #12
0
from .forms import PostForm, PostRefVolcanForm
from .models import VolcanDefRef, PostRefVolcan
from apps.crud import CRUD, vista, edit, delete, post

contexto = {'terminos': VolcanDefRef, 'general': PostRefVolcan}

volcan = CRUD(VolcanDefRef, 'reflexion/erupcion/', 'erupcion', PostForm,
              'ref_', contexto)

ref_erupcion = lambda request: vista(request, volcan)

ref_erupcion_post = lambda request: post(request, volcan)

ref_erupcion_edit = lambda request, pk: edit(request, pk, volcan)

ref_erupcion_delete = lambda request, pk: delete(request, pk, volcan)

volcan_general = CRUD(PostRefVolcan, 'reflexion/erupcion/', 'erupcion',
                      PostRefVolcanForm, 'ref_')

ref_erupcion_general_post = lambda request: post(request, volcan_general)

ref_erupcion_general_edit = lambda request, pk: edit(request, pk,
                                                     volcan_general)

ref_erupcion_general_delete = lambda request, pk: delete(
    request, pk, volcan_general)
コード例 #13
0
from .forms import PostForm, PostEdVolcanForm
from .models import VolcanDefEd, PostEdVolcan
from apps.crud import CRUD, vista, edit, delete, post

contexto = {'terminos': VolcanDefEd, 'general': PostEdVolcan}

volcan = CRUD(VolcanDefEd, 'educacion/erupcion/', 'erupcion', PostForm, 'ed_',
              contexto)

ed_erupcion = lambda request: vista(request, volcan)

ed_erupcion_post = lambda request: post(request, volcan)

ed_erupcion_edit = lambda request, pk: edit(request, pk, volcan)

ed_erupcion_delete = lambda request, pk: delete(request, pk, volcan)

volcan_general = CRUD(PostEdVolcan, 'educacion/erupcion/', 'erupcion',
                      PostEdVolcanForm, 'ed_')

ed_erupcion_general_post = lambda request: post(request, volcan_general)

ed_erupcion_general_edit = lambda request, pk: edit(request, pk, volcan_general
                                                    )

ed_erupcion_general_delete = lambda request, pk: delete(
    request, pk, volcan_general)
コード例 #14
0
ファイル: views.py プロジェクト: Ivan252512/resiliencia
from .forms import PostForm, PostAcAsteroideForm
from .models import AsteroidesDefAc, PostAcAsteroide
from apps.crud import CRUD, vista, post, edit, delete

contexto = {'terminos' : AsteroidesDefAc,
            'general' : PostAcAsteroide}

asteroide = CRUD(AsteroidesDefAc, 'accion/asteroide/', 'asteroide', PostForm, 'ac_', contexto=contexto)

ac_asteroide = lambda request : vista(request, asteroide)

ac_asteroide_post = lambda request : post(request, asteroide)

ac_asteroide_edit = lambda request, pk : edit(request, pk, asteroide)

ac_asteroide_delete = lambda request, pk : delete(request, pk, asteroide)



asteroide_general = CRUD(PostAcAsteroide, 'accion/asteroide/', 'asteroide', PostAcAsteroideForm, 'ac_')

ac_asteroide_general_post = lambda request : post(request, asteroide_general)

ac_asteroide_general_edit = lambda request, pk : edit(request, pk, asteroide_general)

ac_asteroide_general_delete = lambda request, pk : delete(request, pk, asteroide_general)
コード例 #15
0
ファイル: views.py プロジェクト: Ivan252512/resiliencia
from .forms import PostForm, PostAcVolcanForm
from .models import VolcanDefAc, PostAcVolcan
from apps.crud import CRUD, vista, edit, delete, post

contexto = {'terminos' : VolcanDefAc,
            'general' : PostAcVolcan}


volcan = CRUD(VolcanDefAc, 'accion/erupcion/', 'erupcion', PostForm, 'ac_', contexto)

ac_erupcion = lambda request : vista(request, volcan)

ac_erupcion_post = lambda request : post(request, volcan)

ac_erupcion_edit = lambda request, pk : edit(request, pk, volcan)

ac_erupcion_delete = lambda request, pk : delete(request, pk, volcan)


volcan_general = CRUD(PostAcVolcan, 'accion/erupcion/', 'erupcion', PostAcVolcanForm, 'ac_')

ac_erupcion_general_post = lambda request : post(request, volcan_general)

ac_erupcion_general_edit = lambda request, pk : edit(request, pk, volcan_general)

ac_erupcion_general_delete = lambda request, pk : delete(request, pk, volcan_general)
コード例 #16
0
# Create your views here.
from .forms import PrincipalForm, GlosarioForm, ReferenciaForm
from .models import Principal, Glosario, Referencia
from apps.crud import CRUD, post, edit, delete, vista

contexto = {
    'terminos': Principal,
    'glosarios': Glosario,
    'referencias': Referencia
}

#Principal
educacion = CRUD(Principal,
                 'core/',
                 'educacion',
                 PrincipalForm,
                 'ed_',
                 contexto=contexto)

ed_educacion = lambda request: vista(request, educacion)

ed_educacion_post = lambda request: post(request, educacion)

ed_educacion_edit = lambda request, pk: edit(request, pk, educacion)

ed_educacion_delete = lambda request, pk: delete(request, pk, educacion)

#Glosario
glosario = CRUD(Glosario, 'core/', 'educacion', GlosarioForm, 'ed_')

ed_glosario_post = lambda request: post(request, glosario)
コード例 #17
0
ファイル: views.py プロジェクト: Ivan252512/resiliencia
from .models import Video
from apps.crud import CRUD, post, edit, delete, vista
from .forms import VideosForm

# Create your views here.


def nosotros(request):
    return render(request, 'core/nosotros.html')


def proyecto(request):
    return render(request, 'core/proyecto.html')


def send_email(request):
    return render(request, 'core/contact.html')


contexto = {'videos': Video}

video = CRUD(Video, 'core/', 'index', VideosForm, '', contexto=contexto)

index = lambda request: vista(request, video)

video_post = lambda request: post(request, video)

video_edit = lambda request, pk: edit(request, pk, video)

video_delete = lambda request, pk: delete(request, pk, video)
コード例 #18
0
ファイル: views.py プロジェクト: Ivan252512/resiliencia
from .forms import PostForm, PostRefInundacionForm
from .models import InundacionesDefRef, PostRefInundacion
from apps.crud import CRUD, vista, post, edit, delete


contexto = {'terminos' : InundacionesDefRef,
            'general' : PostRefInundacion}

inundacion = CRUD(InundacionesDefRef, 'reflexion/inundacion/', 'inundacion', PostForm, 'ref_', contexto)

ref_inundacion = lambda request : vista(request, inundacion)

ref_inundacion_post = lambda request : post(request, inundacion)

ref_inundacion_edit = lambda request, pk : edit(request, pk, inundacion)

ref_inundacion_delete = lambda request, pk : delete(request, pk, inundacion)




inundacion_general = CRUD(PostRefInundacion, 'reflexion/inundacion/', 'inundacion', PostRefInundacionForm, 'ref_')

ref_inundacion_general_post = lambda request : post(request, inundacion_general)

ref_inundacion_general_edit = lambda request, pk : edit(request, pk, inundacion_general)

ref_inundacion_general_delete = lambda request, pk : delete(request, pk, inundacion_general)