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
| import csv | |
| data = list() | |
| with open('Base.csv', 'rU') as f: | |
| reader = csv.DictReader(f, quotechar='|', quoting=csv.QUOTE_MINIMAL) | |
| for row in reader: | |
| for (k,v) in row.items(): | |
| z = k.replace('\t', ",") | |
| n = v.replace('\t', ",") | |
| num = {str(reader.line_num):(z.split(','), n.split(','))} |
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
| from django.contrib.contenttypes.fields import GenericForeignKey | |
| from django.contrib.contenttypes.models import ContentType | |
| class Log_Entry_General(models.Model): | |
| mensaje = models.CharField() | |
| content_type = models.ForeignKey(ContentType) | |
| object_id = models.PositiveIntegerField() | |
| object = Generic.ForeignKey('content_type', 'object_id') |
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
| #Encontrado en Google https://groups.google.com/forum/#!topic/django-users/RM7ZZ9naNQA | |
| def obtener_request(): | |
| try: | |
| user = None | |
| outer_frames = inspect.getouterframes(inspect.currentframe()) | |
| for tpl in outer_frames: | |
| arginfo = inspect.getargvalues(tpl[0]) | |
| if(type(arginfo[3]) is dict): | |
| arg_dict = arginfo[3].copy() | |
| for k in arg_dict: |
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
| from django.db.models.signals import pre_save, pre_delete | |
| from django.contrib.admin.models import LogEntry, DELETION, ADDITION, CHANGE | |
| from django.utils.encoding import force_text | |
| ##Django admin | |
| def get_content_type_for_model(obj): | |
| return ContentType.objects.get_for_model(obj) | |
| import inspect | |
| from django.core.handlers.wsgi import WSGIRequest |
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
| from django.db.models.signals import pre_delete, post_save | |
| from django.contrib.admin.models import LogEntry, DELETION, ADDITION, CHANGE | |
| from django.utils.encoding import force_text | |
| ##Django admin | |
| def get_content_type_for_model(obj): | |
| return ContentType.objects.get_for_model(obj) | |
| import inspect | |
| from django.core.handlers.wsgi import WSGIRequest |
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
| import uuid | |
| import requests | |
| from django.core.files.base import ContentFile | |
| from django.db import models | |
| from django.db.models.fields.files import ImageFileDescriptor, ImageFieldFile | |
| class UrlImageFileDescriptor(ImageFileDescriptor): | |
| def __init__(self, field): |
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 app = angular.module('ExtensionAcademica',['ngSanitize']); | |
| app.controller("TabCtrl", ["$scope", "$http","$sce",function($scope, $http,$sce){ | |
| $http.get("http://192.168.1.67:8000/game").success(function(data, status, headers, config){ | |
| $scope.currentTab = $sce.trustAsHtml(data); | |
| }); | |
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
| <!DOCTYPE html> | |
| <!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]--> | |
| <!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]--> | |
| <!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]--> | |
| <!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]--> | |
| <head> | |
| <!-- Necesidades básicas de la página | |
| ================================================== --> | |
| <meta charset="utf-8"> |
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
| def obtener_pago_banner(numero_pago, id_usuario): | |
| from General.banner.models import Tvraccd, Tbraccd | |
| from django.contrib.auth.models import User | |
| usuario = User.objects.get(pk=id_usuario) | |
| return Tbraccd.objects.get(tbraccd_tran_number=numero_pago, tbraccd_pidm=usuario.datosusuario.pidm) | |
| def obtener_pago_cargos_banner(pago): | |
| from General.banner.models import Tvrappl | |
| from General.banner.models import Tvraccd | |
| pago_espejo = Tvraccd.objects.get(tvraccd_accd_tran_number=pago.tbraccd_tran_number, tvraccd_pidm=pago.tbraccd_pidm) |
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
| {% extends "sistemav2/layouts/layout.html" %} | |
| {% load staticfiles %} | |
| {% block css %} | |
| <!-- <link rel="stylesheet" type="text/css" href="{% static 'sistemav2/css/dashboard.css' %}"> | |
| <link rel="stylesheet" type="text/css" href="{% static 'sistemav2/css/pagos.css' %}"> | |
| <link rel="stylesheet" type="text/css" href="{% static 'sistemav2/css/styles.css' %}"> | |
| <link rel="stylesheet" href="{% static 'simoba/css/domiciliacion.css' %}"> --> | |
| {% endblock %} |