Function | Shortcut |
---|---|
previous tab | ⌘ + left arrow |
next tab | ⌘ + right arrow |
go to tab | ⌘ + number |
go to window | ⌘ + Option + Number |
go to split pane by direction | ⌘ + Option + arrow |
go to split pane by order of use | ⌘ + ] , ⌘ + [ |
split window horizontally (same profile) | ⌘ + D |
split window vertically (same profile) | ⌘ + d |
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
# -*- coding: utf-8 -*- | |
from django import forms | |
from crispy_forms.helper import FormHelper | |
from crispy_forms.layout import Layout, Div, Submit, HTML, Button, Row, Field | |
from crispy_forms.bootstrap import AppendedText, PrependedText, FormActions | |
class MessageForm(forms.Form): | |
text_input = forms.CharField() |
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
Copyright (c) 2011 ZURB, http://www.zurb.com/ |
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
# READ MORE HERE: http://www.webdevotion.be/blog/2012/06/06/terminal-git-branch-status-colored-icons | |
# ============================================================================== | |
# FANCY GIT STATUS ICONS | |
# ============================================================================== | |
# SOME VARIABLES in capitals | |
# no whitespace between variable names and = sign! | |
COLOR_RESET="\e[00m" | |
COLOR_GREEN="\e[1;32m" | |
COLOR_RED="\e[00;31m" |
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
# views.py | |
from django.views.generic import RedirectView | |
from django.core.urlresolvers import reverse | |
class NamedUrlRedirectView(RedirectView): | |
def __init__(self, url, *args, **kwargs): | |
self.url = reverse(url) | |
super(NamedUrlRedirectView, self).__init__(*args, **kwargs) |
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 path, pardir | |
import sys | |
PROJECT_ROOT = path.dirname(path.abspath(__file__)) | |
sys.path.append(path.join("apps")) | |
DEBUG = True | |
##### PIPELINE ################################################################ |
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 | |
# Our django-pipeline settings | |
PATH_TO_HERE = os.getcwd() | |
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage' | |
PIPELINE_CSS = { | |
'standard': { | |
'source_filenames': ( |
In python, you have floats and decimals that can be rounded. If you care about the accuracy of rounding, use decimal type. If you use floats, you will have issues with accuracy.
All the examples use demical types, except for the original value, which is automatically casted as a float.
To set the context of what we are working with, let's start with an original value.
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
""" | |
uso basico de south | |
""" | |
# GENERAR MIGRACIONES: | |
# si es una app nueva | |
./manage.py schemamigration aplication --initial | |
# si se realizan cambios, entonces | |
./manage.py schemamigration aplication --auto |
OlderNewer