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 results = [ | |
{ | |
"id": 3, | |
"soft_delete": false, | |
"name": "Bebidas frias", | |
"order": 1, | |
"menu": 1, | |
"sub_category": 2 | |
}, | |
{ |
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 results = [ | |
{ | |
"id": 3, | |
"soft_delete": false, | |
"name": "Bebidas frias", | |
"order": 1, | |
"menu": 1, | |
"sub_category": 2 | |
}, | |
{ |
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 MyForm(forms.ModelForm): | |
requested_asset = None | |
def __init__(self, *args, **kwargs): | |
other_variable = kwargs.pop('other_variable') | |
super(MyForm, self).__init__(*args, **kwargs) |
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 rest_framework import viewsets, status | |
from rest_framework.response import Response | |
from .models import * | |
from .serializers import * | |
class CancionesForAlbumViewSet(viewsets.ModelViewSet): | |
"""! | |
Vistas para registrar las canciones de un album | |
@author Rodrigo Boet (rudmanmrrod at gmail.com) |
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 ProfileRestTest(TestCase): | |
"""! | |
Clase para probar el perfil por servicios rest | |
""" | |
def setUp(self): | |
"""! | |
Método para configurar los valores iniciales de | |
la prueba unitaria | |
""" |
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 ProfileTest(TestCase): | |
"""! | |
Clase para probar el perfil | |
""" | |
def setUp(self): | |
"""! | |
Método para configurar los valores iniciales de | |
la prueba unitaria | |
""" |
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 "base.html" %} | |
{% load staticfiles %} | |
{% block 'content %} | |
<h1 class="text-center">Create User</h1><hr> | |
<form id="app" v-on:submit.prevent="onSubmit"> | |
{% csrf_token %} | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-4 col-sm-4 col-xs-4"> | |
<label>{{form.username.label}}</label> |
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
<script> | |
var app = new Vue({ | |
delimiters: ['[[', ']]'], | |
el: '#app', | |
data: { | |
csrfmiddlewaretoken: '', | |
username: '', | |
email: '', | |
password1: '', | |
password2: '', |
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 import forms | |
from django.contrib.auth.models import User | |
from django.contrib.auth.forms import UserCreationForm | |
class RegisterForm(UserCreationForm): | |
class Meta: | |
model = User | |
fields = ['password1', 'password2', | |
'first_name', 'last_name', 'email', 'username'] |
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 nltk.corpus import stopwords | |
class DangerSdk(): | |
"""! | |
Sdk para determinar si un usuario es peligroso | |
@date 03-06-2018 | |
@version 1.0.0 | |
""" |
NewerOlder