This file contains 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
<template> | |
<Page class="page"> | |
<ActionBar title="Geolocation" class="action-bar" /> | |
<ScrollView> | |
<StackLayout class="home-panel"> | |
<Image src="~/images/map-marker-icon.png" height="60" /> | |
<Button text="Get My Location" @tap="getLocation" class="btn btn-primary" /> | |
<Label :text="'Latitude: ' + lat" class="lbl" /> | |
<Label :text="'Longitude: ' + lon" class="lbl" /> |
This file contains 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
<template> | |
<GridLayout rows="30, auto" marginBottom="5"> | |
<Label ref="label" row="1" :text="placeholder" opacity="0.4" | |
fontSize="14" class="input" /> | |
<TextField ref="textField" :secure="secure" row="1" @focus="onFocus" | |
@blur="onBlur" borderBottomWidth="3" borderBottomColor="#cec8c8" | |
padding="0" /> | |
</GridLayout> | |
</template> |
This file contains 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 axios from 'axios' | |
export default() => { | |
return axios.create({ | |
baseURL: `http://jsonplaceholder.typicode.com/`, | |
headers: { | |
'Accept': 'application/json', | |
'Content-Type': 'application/json', | |
} | |
}) |
This file contains 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
<template> | |
<div id="signin"> | |
<div class="signin-form"> | |
<form @submit.prevent="signIn"> | |
<div class="input"> | |
<label for="username">사용자 ID</label> | |
<input | |
type="username" | |
id="username" | |
v-model="username"> |
This file contains 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
<template> | |
<div> | |
<h2>Login</h2> | |
<form @submit.prevent="onSubmit(email, password)"> | |
<input type="text" v-model="email" placeholder="Email Address"> | |
<input type="password" v-model="password" placeholder="Password"> | |
<input type="submit" value="Login"> | |
</form> | |
</div> | |
</template> |
This file contains 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 os | |
import django | |
from selenium import webdriver | |
from django.conf import settings | |
from datetime import datetime | |
from bs4 import BeautifulSoup | |
from django.utils.timezone import make_aware | |
def text_strip(text): |
This file contains 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 dal import autocomplete | |
from django import forms | |
from .models import Sales | |
class SalesForm(forms.ModelForm): | |
class Meta: | |
model = Sales | |
fields = ['name', 'customer'] | |
widgets = { |
This file contains 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
{% load humanize %} | |
<table class="table table-striped table-bordered table-hover"> | |
<thead> | |
<tr> | |
<th width="20%">COST TYPE</th> | |
<th width="15%">CURRENCY</th> | |
<th width="45%">CONTENT</th> | |
<th width="20%">AMOUNT</th> | |
</tr> |
This file contains 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 os import listdir | |
from os.path import splitext, join, isfile | |
from PIL import Image | |
path = '/Users/happy/Django/ohtto/media/' | |
for filename in listdir(path): | |
fullpath = path + filename | |
if isfile(fullpath) and fullpath != join(path, '.DS_Store'): | |
print(fullpath) |
This file contains 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 loadForm = function(){ | |
var btn = $(this); | |
$.ajax({ | |
url : btn.attr('data-url'), | |
type : 'get', | |
dataType : 'json', | |
beforeSend: function(){ | |
$('#modal-theme').modal('show'); | |
}, | |
success: function(data) { |
NewerOlder