One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| #!/bin/bash | |
| # Stop all containers | |
| docker stop $(docker ps -a -q) | |
| # Delete all containers | |
| docker rm $(docker ps -a -q) | |
| # Delete all images | |
| docker rmi $(docker images -q) |
| (function(window, document, version, callback) { | |
| var j, d; | |
| var loaded = false; | |
| if (!(j = window.jQuery) || version > j.fn.jquery || callback(j, loaded)) { | |
| var script = document.createElement("script"); | |
| script.type = "text/javascript"; | |
| script.src = "/media/jquery.js"; | |
| script.onload = script.onreadystatechange = function() { | |
| if (!loaded && (!(d = this.readyState) || d == "loaded" || d == "complete")) { | |
| callback((j = window.jQuery).noConflict(1), loaded = true); |
| # install openjdk | |
| sudo apt-get install openjdk-7-jdk | |
| # download android sdk | |
| wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz | |
| tar -xvf android-sdk_r24.2-linux.tgz | |
| cd android-sdk-linux/tools | |
| # install all sdk packages |
| import functools | |
| from channels.handler import AsgiRequest | |
| from rest_framework.exceptions import AuthenticationFailed | |
| from rest_framework.settings import api_settings | |
| authenticators = [auth() for auth in api_settings.DEFAULT_AUTHENTICATION_CLASSES] | |
| import functools | |
| from channels.handler import AsgiRequest | |
| from rest_framework.exceptions import AuthenticationFailed | |
| from rest_framework.settings import api_settings | |
| authenticators = [auth() for auth in api_settings.DEFAULT_AUTHENTICATION_CLASSES] | |
This is side-document providing details for some highlighted changes in 2.5.0. For a full list of changes, see the full release note.
| languages = [ | |
| ('aa', 'Afar'), | |
| ('ab', 'Abkhazian'), | |
| ('af', 'Afrikaans'), | |
| ('ak', 'Akan'), | |
| ('sq', 'Albanian'), | |
| ('am', 'Amharic'), | |
| ('ar', 'Arabic'), | |
| ('an', 'Aragonese'), | |
| ('hy', 'Armenian'), |
| import requests | |
| from django.core.files import File | |
| from django.core.files.temp import NamedTemporaryFile | |
| def save_image_from_url(model, url): | |
| r = requests.get(url) | |
| img_temp = NamedTemporaryFile(delete=True) |