This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var idSeleccionado = 1; // Español | |
var nme = [ | |
{id: 1, nombre: "Español", slug: "1-espanol"}, | |
{id: 5, nombre: "Matemáticas", slug: "5-matematicas"}, | |
{id: 8, nombre: "Exploración y Comprensión del Mundo Natural y Social", slug: "8-social"}, | |
{id: 14, nombre: "Educación socioemocional", slug: "14-educacion-socioemocional"}, | |
{id: 16, nombre: "Educación Física", slug: "16-educacion-fisica"} | |
]; | |
console.log(nme); | |
console.log(nme[idSeleccionado]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AsignaturaNMEAdmin(admin.ModelAdmin): | |
model = AsignaturaNME | |
list_display = get_fieldnames(model) | |
exclude = ['slug'] | |
search_fields = ['nombre', 'CampoFormativoNME', 'grado'] | |
class CustomModelChoiceField(forms.ModelChoiceField): | |
def label_from_instance(self, obj): | |
return "%s - %s - %s" % (obj.nombre, obj.ciclo.nivel, obj.ciclo) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Se agrega field de control de Meds de nuevo modelo Educativo | |
is_nuevomodelo = models.BooleanField( | |
default=False, | |
verbose_name=u'MED nuevo modelo Educativo' | |
) | |
# Se agrega field para el nuevo modelo Educativo | |
aprendizajeesperado = models.ForeignKey( | |
'nuevomodelo.AprendizajeEsperadoNME', | |
related_name='meds', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from django.db import models | |
from django.db.models.signals import post_save | |
from django.dispatch import receiver | |
from redmag.nuevomodelo.manager import BaseNuevoModeloManager | |
from redmag.utils.slughifi import slughifi | |
class BaseCatalogoNME(models.Model): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# en la api genero el action | |
class ParentSchoolViewSet( | |
GenericViewSet, | |
mixins.RetrieveModelMixin, | |
mixins.ListModelMixin, | |
mixins.CreateModelMixin, | |
mixins.PartialUpdateModelMixin, | |
mixins.DestroyModelMixin): | |
serializer_class = serializers.ParentSchoolSerializer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import re | |
import requests | |
import uuid | |
from django.contrib.staticfiles.templatetags.staticfiles import static | |
from django.core.exceptions import ValidationError | |
from django.core.urlresolvers import reverse | |
from django.db import models | |
from django.db.models import Avg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from apns import APNs, Payload | |
from celery import shared_task | |
from django.conf import settings | |
from potencia.notifications.mobile import _get_users | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vm.downloadcsv = function() { | |
$http({ | |
method: 'GET', | |
url: '/api/v1/activities/record/'+vm.query.domain.id+'/csv', | |
params: { | |
'datesince': vm.query.datesince, | |
'dateto':vm.query.dateto, | |
'verbs':vm.query.verb | |
}, | |
responseType: 'arraybuffer' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vm.downloadcsv = function() { | |
$http({ | |
method: 'GET', | |
url: '/api/v1/activities/record/'+vm.query.domain.id+'/csv', | |
params: { | |
'datesince': vm.query.datesince, | |
'dateto':vm.query.dateto, | |
'verbs':vm.query.verb | |
}, | |
responseType: 'arraybuffer' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vm.downloadcsv = function() { | |
$http({ | |
method: 'GET', | |
url: '/api/v1/activities/record/'+vm.query.domain.id+'/csv', | |
params: { | |
'datesince': vm.query.datesince, | |
'dateto':vm.query.dateto, | |
'verbs':vm.query.verb | |
}, | |
responseType: 'arraybuffer' |