- Flask
pip install flask
- Flask-Login
pip install flask-login
- Create your user model class:
User
. This would be a class that stores information about your User. Essentially theuser_name
,user_id
,email
, etc.
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers']) | |
.run(function(DB) { | |
DB.init(); | |
}); |
# move head to specific branch/commit | |
git checkout -b new_branch 6e559cb | |
# config name email | |
# locally | |
git config user.email 'email@gmail.com' | |
git config user.name 'Chris' | |
# global | |
git config --global user.email 'email@gmail.com' |
package main | |
import ( | |
"github.com/codegangsta/negroni" | |
"github.com/gorilla/context" | |
"github.com/unrolled/render" | |
"labix.org/v2/mgo" | |
"labix.org/v2/mgo/bson" | |
"log" | |
"net/http" |
let url = NSURL(string: "http://www.example.com") | |
let request = NSURLRequest(URL: url!) | |
NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue.mainQueue()) {(response, data, error) in | |
// ... | |
} |
//Uncomment both lines below if testing on an Xcode playground. | |
//import XCPlayground | |
//XCPSetExecutionShouldContinueIndefinitely() | |
let url = NSURL(string: "http://www.stackoverflow.com") | |
let task = NSURLSession.sharedSession().dataTaskWithURL(url) {(data, response, error) in | |
println(NSString(data: data, encoding: NSUTF8StringEncoding)) | |
} |
package main | |
import ( | |
"encoding/xml" | |
"net/http" | |
"net/url" | |
"fmt" | |
"strings" | |
"io/ioutil" | |
"encoding/json" |
/** | |
* Este script de javascript permite trabajar transparentemente solicitudes que requieren | |
* protección del token CSRF por medio de AJAX JQUERY. | |
* Esto te permitirá hacer solcitudes a web Services de Django por medio de AJAX Jquery. | |
* Para utilizarlo basta con integrar el archivo DjangoAjax.js en tu directorio de JS y hacer referencia a él en tus templates | |
* que requieren del uso de AJAX por POST o algún otro que requiera el token CSRF. | |
* Este script está basado en la documentación oficial de Django https://docs.djangoproject.com | |
*/ | |
$(function(){ |
/** | |
* Created by gaspar on 22/sept/15. | |
*/ | |
//angularJS | |
(function () { | |
var app = angular.module('app', | |
//ejemplo de algun controlador | |
['app.mainController'] | |
); |
(function() { | |
var script, | |
scripts = document.getElementsByTagName('script')[0]; | |
function load(url) { | |
script = document.createElement('script'); | |
script.async = true; | |
script.src = url; | |
scripts.parentNode.insertBefore(script, scripts); |