I hereby claim:
- I am dannyroa on github.
- I am dannyroa (https://keybase.io/dannyroa) on keybase.
- I have a public key whose fingerprint is C228 DA08 572C ED3A C4EE A34B 5F14 20AD B36E B3CE
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# Create your views here. | |
from labs.connectcomments.models import * | |
from labs.connectcomments.googlefriendconnect import * | |
from labs.connectcomments.facebookconnect import * | |
from django.contrib.auth import logout | |
def index(request): | |
return render_to_response('connectcomments_index.html', { |
class PostAdmin(admin.ModelAdmin): | |
raw_id_fields = ['user'] | |
def add_view(self, request, form_url="", extra_context=None): | |
data = request.GET.copy() | |
data['user'] = request.user.id | |
data['status'] = POST_STATUS.APPROVED | |
request.GET = data | |
return super(PostAdmin, self).add_view(request, form_url="", extra_context=extra_context) |
import re | |
import logging | |
from django.conf import settings | |
from django.core.cache import cache | |
from userprofile.models import LastOnline | |
import datetime | |
from django.core.urlresolvers import reverse | |
import json | |
import oauth2 | |
import optparse | |
import urllib | |
import urllib2 | |
from django.conf import settings | |
class YelpClient: |
from django.conf import settings | |
from django.contrib.auth import authenticate, login as auth_login | |
from django.core.urlresolvers import reverse | |
from facebookconnect.models import FacebookProfile | |
from facebookconnect.utils import facebook_login_check | |
class LazyFacebookLoginCheck(object): |
/* | |
* Copyright 2012 Roman Nurik + Nick Butcher | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
import os | |
PROJECT_DIR = os.path.dirname(__file__) | |
... | |
STATIC_DOC_ROOT = os.path.join(PROJECT_DIR, "static") | |
... | |
TEMPLATE_DIRS = ( | |
os.path.join(PROJECT_DIR, "templates"), | |
) |
import socket | |
if socket.gethostname() == 'productionserver.com': | |
DEBUG = False | |
else: | |
DEBUG = True |
urlpatterns = patterns('django.views.generic.simple', | |
(r'^foo/$', 'direct_to_template', {'template': 'foo_index.html'}), | |
(r'^foo/(?P<id>\d+)/$', 'direct_to_template', {'template': 'foo_detail.html'}), | |
) |