Skip to content

Instantly share code, notes, and snippets.

@amccloud
Created November 22, 2012 02:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amccloud/4129151 to your computer and use it in GitHub Desktop.
Save amccloud/4129151 to your computer and use it in GitHub Desktop.
import os
from git import Repo as GitRepo
repo = GitRepo(os.path.dirname(__file__))
VERSION = (2, 0, 0, 'Codename', 'beta', repo.head.commit.hexsha[:8])
server {
listen 0.0.0.0:80;
server_name public.myproject.com;
expires max;
gzip on;
rewrite "/static/[a-f0-9]{8}/(.+)" /static/$1 break;
location / {
root /srv/www/myproject/public;
}
}
from myproject import VERSION
MEDIA_ROOT = os.path.join(PUBLIC_DIR, 'media')
MEDIA_URL = 'http://xxxx.cloudfront.net/media/'
STATIC_ROOT = os.path.join(PUBLIC_DIR, 'static')
STATIC_URL = 'http://xxxx.cloudfront.net/static/%s/' % VERSION[5]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment