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
""" | |
Django version 1.9.2 | |
blog | |
โโโโ templates | |
โโโโ web | |
โโโโindex.html | |
โโโโ web | |
โโโโurls.py (์๋ก ์ถ๊ฐ๋จ) | |
โโโโ blog |
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
/*** | |
When get fcm data, set rootviewcontroller that order by Tabbar -> Navaigation -> (Segue) -> view | |
***/ | |
// AppDelegate.swift | |
let TabBarViewController : UITabBarController = mainStoryboard.instantiateViewController(withIdentifier: "mainView") as! UITabBarController | |
// NavigationController | |
let infoNavigation = mainStoryboard.instantiateViewController(withIdentifier: "infoNavigation") as! UINavigationController | |
let buystockNavigation = mainStoryboard.instantiateViewController(withIdentifier: "buystockNavigation") as! UINavigationController |
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
/****************************************************************************** | |
* This tutorial is based on the work of Martin Hawksey twitter.com/mhawksey * | |
* But has been simplified and cleaned up to make it more beginner friendly * | |
* All credit still goes to Martin and any issues/complaints/questions to me. * | |
******************************************************************************/ | |
var TO_ADDRESS = "๋ฐ๋ ์ฃผ์"; // change this ... | |
function doPost(e) { | |
// ๊ตณ์ด datas๋ผ๊ณ ๋ณ์๋ก ์ํด๋ ๋ฉ๋๋ค. |
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 datetime | |
from django.utils.timezone import utc | |
from rest_framework.authentication import TokenAuthentication | |
from rest_framework import exceptions | |
class ExpiringTokenAuthentication(TokenAuthentication): | |
def authenticate_credentials(self, key): | |
try: | |
token = self.model.objects.get(key=key) |
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
#-*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
from django.db import models | |
from django.contrib.auth.models import User | |
class Counts(models.Model): | |
user_id = models.ForeignKey(User, on_delete=models.CASCADE) | |
numbers = models.IntegerField(default=0) | |
date = models.DateTimeField(auto_created=True, auto_now_add=True) |
NewerOlder