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.
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 src="index.js"></script> | |
<script src="https://www.gstatic.com/firebasejs/3.5.1/firebase.js"></script> | |
<script> | |
var config = { | |
apiKey: "AIzaSyBR2cJ_zaUhNCOhb9pIbLDNqK7CsDfk04U", | |
authDomain: "test-b36d2.firebaseapp.com", | |
databaseURL: "https://test-b36d2.firebaseio.com", | |
projectId: "test-b36d2", | |
storageBucket: "test-b36d2.appspot.com", | |
messagingSenderId: "69682141059" |
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
# 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 |
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 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 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 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 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 urllib | |
from urllib.parse import urlparse | |
import requests | |
for i in range(100): | |
u = requests.get('https://randomuser.me/api/').json()['results'][0] | |
user = User.objects.create( | |
username=u['login']['username'], | |
password=u['login']['password'], | |
gender=u['gender'], |
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
languages = [ | |
('aa', 'Afar'), | |
('ab', 'Abkhazian'), | |
('af', 'Afrikaans'), | |
('ak', 'Akan'), | |
('sq', 'Albanian'), | |
('am', 'Amharic'), | |
('ar', 'Arabic'), | |
('an', 'Aragonese'), | |
('hy', 'Armenian'), |
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 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) |
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
0x16bDd33A3541cd1f42F54f6d37EDB769842f1502 |