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.core.exceptions import ImproperlyConfigured | |
from django import forms | |
from django.conf import settings | |
try: | |
from keyczar import keyczar | |
except ImportError: | |
raise ImportError('Using an encrypted field requires the Keyczar module. You can obtain Keyczar from http://www.keyczar.org/.') |
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
#!/bin/sh | |
# | |
# Jonathan Perkin <[email protected]> wrote this file. | |
# | |
# You can freely distribute/modify it (and are encouraged to do so), | |
# and you are welcome to buy me a beer if we ever meet and you think | |
# this stuff is worth it. Improvements and cleanups always welcome. | |
# | |
# IPTables firewall script. There are many. This is mine. | |
# |
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
<!doctype html> | |
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> | |
<!--[if lt IE 7 ]> <html class="no-js ie6" lang="en"> <![endif]--> | |
<!--[if IE 7 ]> <html class="no-js ie7" lang="en"> <![endif]--> | |
<!--[if IE 8 ]> <html class="no-js ie8" lang="en"> <![endif]--> | |
<!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="HandheldFriendly" content="True"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Home</title> | |
<meta name="description" content=''/> | |
<link href="/static/libs/bootstrap/css/bootstrap.min.css" rel="stylesheet"> | |
<link href="/static/libs/bootstrap/css/bootstrap-responsive.css" rel="stylesheet"> |
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
# http://www.protectamerica.com/contact/affiliate-program/ | |
class Profile(models.Model): | |
PROFILE_STATUS = ( | |
('DECLINED', 'Declined'), | |
('APPROVED', 'Approved'), | |
('PENDING', 'Pending') | |
) |
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
var Cart = function(cookie_name, equipment_total_class, monthly_total_class, equipment_breakdown_class, current_equ) { | |
this.cookie_name = cookie_name; | |
this.cart = getCookie(this.cookie_name); | |
if(!this.cart) { | |
this.reset(); | |
}else{ | |
this.cart = JSON.parse(this.cart); | |
} | |
this.equipment_total_class = equipment_total_class; | |
this.monthly_total_class = monthly_total_class; |
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
import httplib, urllib | |
from django.utils import simplejson | |
""" | |
curl -s --insecure -H "X-PAYPAL-SECURITY-USERID: Your_API_username" | |
-H "X-PAYPAL-SECURITY-PASSWORD: Your_API_password" | |
-H "X-PAYPAL-SECURITY-SIGNATURE: Your_API_signature" | |
-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV" | |
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV" |
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
<VirtualHost 000.000.000.000:80> | |
ServerName brandname.com | |
ServerAlias www.brandname.com | |
DocumentRoot /path/to/htdocs | |
ErrorLog /path/to/logs/error_log | |
TransferLog /path/to/logs/access_log | |
Alias /favicon.ico /path/to/favicon.ico | |
Alias /django-media/ "/path/to/app/media/" | |
Alias /static/ "/path/to/app/static/" |
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
def index(request): | |
ctx = {} | |
ctx['page_name'] = 'index' | |
ctx['pages'] = ['index'] | |
latest_news = Article.objects.order_by('-date_created')[:3] | |
ctx['latest_news'] = latest_news | |
return simple_dtt(request, 'index.html', ctx) |
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
{% extends "base.html" %} | |
{% load content_filters content_tags sekizai_tags testimonial_tags %} | |
{% block page_title %}2nd amazing title tag!{% endblock %} | |
{% block css %} | |
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> | |
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/affiliates/sem-landing-page/home.css" /> | |
{% endblock %} |