- http://groups.google.com/group/twitter-development-talk/msg/293e23a5213f9a50
- screen name: varchar(20)
- name: varchar(20)
- location: varchar(30)
- description: varchar(160)
- time zone: you should store this in a native time format
- source: varchar(256)
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
| from django import template | |
| from django.template.defaultfilters import stringfilter | |
| from django.utils.html import conditional_escape | |
| from django.utils.safestring import mark_safe | |
| import re | |
| register = template.Library() | |
| # (?:\A|[\s\.,:;'"])(@(\w{1,20}))(?!\.?\w) | |
| twitterize_pattern = r''' |
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
| from django.db import models | |
| from django.contrib.auth.models import User | |
| from django.utils.translation import ugettext_lazy as _ | |
| from django.core.cache import cache | |
| RELATIONSHIP_CACHE = 60*60*24*7 | |
| RELATIONSHIP_CACHE_KEYS = { | |
| 'FRIENDS': 'friends', | |
| 'FOLLOWERS': 'followers', |
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
| from django.db import models | |
| from django.contrib.auth.models import User | |
| from django.utils.translation import ugettext_lazy as _ | |
| from django.core.cache import cache | |
| RELATIONSHIP_CACHE = 60*60*24*7 | |
| RELATIONSHIP_CACHE_KEYS = { | |
| 'FRIENDS': 'friends', | |
| 'FOLLOWERS': 'followers', |
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
| # Simple way to see which version of django apps you have | |
| # Author: Alexander Artemenko | |
| import pkg_resources | |
| from django.conf import settings | |
| def get_version(app): | |
| try: | |
| d = pkg_resources.get_distribution(app) | |
| return d.project_name, d.version |
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
| [ui] | |
| username = Josh Ourisman <[email protected]> | |
| [extensions] | |
| fetch= | |
| hgext.mq= | |
| hgext.convert= | |
| color= | |
| rebase= | |
| hgsubversion=~/.hg.d/hgsubversion/hgsubversion |
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
| (defvar org-my-archive-expiry-days 1 | |
| "The number of days after which a completed task should be auto-archived. | |
| This can be 0 for immediate, or a floating point value.") | |
| (defconst org-my-ts-regexp "[[<]\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [^]>\r\n]*?\\)[]>]" | |
| "Regular expression for fast inactive time stamp matching.") | |
| (defun org-my-closing-time () | |
| (let* ((state-regexp | |
| (concat "- State \"\\(?:" (regexp-opt org-done-keywords) |
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
| (defvar org-my-archive-expiry-days 1 | |
| "The number of days after which a completed task should be auto-archived. | |
| This can be 0 for immediate, or a floating point value.") | |
| (defconst org-my-ts-regexp "[[<]\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [^]>\r\n]*?\\)[]>]" | |
| "Regular expression for fast inactive time stamp matching.") | |
| (defun org-my-closing-time () | |
| (let* ((state-regexp | |
| (concat "- State \"\\(?:" (regexp-opt org-done-keywords) |
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
| (defvar org-my-archive-expiry-days 1 | |
| "The number of days after which a completed task should be auto-archived. | |
| This can be 0 for immediate, or a floating point value.") | |
| (defconst org-my-ts-regexp "[[<]\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [^]>\r\n]*?\\)[]>]" | |
| "Regular expression for fast inactive time stamp matching.") | |
| (defun org-my-closing-time () | |
| (let* ((state-regexp | |
| (concat "- State \"\\(?:" (regexp-opt org-done-keywords) |
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
| (defvar org-my-archive-expiry-days 1 | |
| "The number of days after which a completed task should be auto-archived. | |
| This can be 0 for immediate, or a floating point value.") | |
| (defconst org-my-ts-regexp "[[<]\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [^]>\r\n]*?\\)[]>]" | |
| "Regular expression for fast inactive time stamp matching.") | |
| (defun org-my-closing-time () | |
| (let* ((state-regexp | |
| (concat "- State \"\\(?:" (regexp-opt org-done-keywords) |