Permalink
Browse files

Added settings.py, urls.py and sample.html template for sample projec…

…t to work.
  • Loading branch information...
1 parent 59e61f6 commit 59072ab1927a0c2343bd41c220babd56d5052045 @lethain committed Aug 29, 2008
Showing with 94 additions and 12 deletions.
  1. +57 −0 monetize_project/settings.py
  2. +34 −0 monetize_project/templates/sample.html
  3. +3 −12 monetize_project/urls.py
@@ -1,5 +1,60 @@
# Django settings for monetize_project project.
+import os
+ROOT_PATH = os.path.dirname(__file__)
+
+
+
+MONETIZE_CONTEXT = {
+ # Amazon Honor System
+ 'amazon_paypage':'url',
+
+ # Amazon Affilliates (used for all others)
+ 'amazon_affiliates_id':'affiliates_id',
+
+ # Amazon Affiliates: Custom Links
+ 'amazon_custom_link_title':'Look at the Kindle!',
+ 'amazon_custom_link_url':'http://www.amazon.com/etc/etc',
+
+ # Amazon Affilliates: Omakase
+ 'amazon_omakase_width':'728',
+ 'amazon_omakase_height':'90',
+
+ # Amazon Affiliates: Search
+ 'amazon_search_terms':"Django book",
+ 'amazon_search_title':"Search for Django books!",
+
+ # Slicehost Referrals
+ 'slicehost_referral_id':'slicehost referal id',
+
+ # Dreamhost Referrals
+ 'dreamhost_referral_code':'dreamhost referal id',
+
+ # Google AdSense: Ad Unit
+ 'adsense_ad_unit_client':'ad unit client',
+ 'adsense_ad_unit_slot':'ad slot id',
+ 'adsense_ad_unit_width':'336',
+ 'adsense_ad_unit_height':'280',
+
+ # Paypal
+ 'paypal_business':'email',
+ 'paypal_item_name':'name',
+ 'paypal_currency_code':'USD',
+ 'paypal_amount':None, # '5.00',
+ 'paypal_tax':'0',
+ 'paypal_lc':'US',
+ 'paypal_bn':'PP-DonationsBF',
+ 'paypal_image':'http://www.paypal.com/en_US/i/btn/btn_donate_LG.gif'
+}
+
+MONETIZE_TARGET = {
+ 'django':'django_monetize/amazon_search.html',
+ 'python':'django_monetize/paypal_donate.html',
+
+}
+
+MONETIZE_DEFAULT = 'django_monetize/slicehost_referral.html'
+
DEBUG = True
TEMPLATE_DEBUG = DEBUG
@@ -69,9 +124,11 @@
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
+ os.path.join(ROOT_PATH, 'templates'),
)
INSTALLED_APPS = (
+ 'django_monetize',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
@@ -0,0 +1,34 @@
+{% load monetize %}
+
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html> <head>
+<title>django_monetize</title>
+</head>
+
+<body>
+<h1>Django Monetize</h1>
+
+
+{% monetize_slot "header" "django" %}
+
+<p> ^^^ Header slot. Some content. VVV footer slot. </p>
+
+<p> Footer gets tags: {{ tags }} </p>
+
+{% monetize_slot "footer" tags %}
+
+<hr>
+
+<div class="sidebar">
+ <p> Sidebar (if you added CSS for it...) </p>
+ {% monetize_slot "sidebar" %}
+</div>
+
+<hr>
+
+<p> And finally, a slot without a slot name. </p>
+
+{% monetize_slot %}
+
+
+</body> </html>
View
@@ -1,16 +1,7 @@
from django.conf.urls.defaults import *
-# Uncomment the next two lines to enable the admin:
-# from django.contrib import admin
-# admin.autodiscover()
+tags = ['python','ruby','django']
-urlpatterns = patterns('',
- # Example:
- # (r'^monetize_project/', include('monetize_project.foo.urls')),
-
- # Uncomment the next line to enable admin documentation:
- # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
-
- # Uncomment the next line to enable the admin:
- # (r'^admin/(.*)', admin.site.root),
+urlpatterns = patterns('django.views.generic.simple',
+ (r'^$','direct_to_template', {'template': 'sample.html','extra_context':{'tags':tags},}),
)

0 comments on commit 59072ab

Please sign in to comment.