Commits

Michael Shepanski committed e95a8b3

Working project descriptions

  • Participants
  • Parent commits ab7396c

Comments (0)

Files changed (22)

apps/comments/views.py

 """
 Action Views Comments Application.
-  * Comment Post Bad Request
-  * Post Comment
 """
 from .forms import CommentForm
 from django.core.urlresolvers import resolve
 from django.http import HttpResponseRedirect
-from pushingkarma.utils.classview import ClassView
 from pushingkarma.utils.functions import url_append_args
 
 
-#########################################
-#  Post Comment
-#########################################
-
-class PostCommentView(ClassView):
+class PostCommentView:
     """ Class view to handle posting a new message. """
 
     def __call__(self, request):

environment/postactivate-dev.sh

 # Development Virtualenv postactivate file
 export PS1="[`basename \"$VIRTUAL_ENV\"`] $_OLD_VIRTUAL_PS1"
 export PYTHONPATH="$HOME/Projects"
-export PYTHONPATH="$PYTHONPATH:$HOME/Projects/django-dbbackup"
-export PYTHONPATH="$PYTHONPATH:$HOME/Projects/django-debug-toolbar"
+#export PYTHONPATH="$PYTHONPATH:$HOME/Projects/django-dbbackup"
+#export PYTHONPATH="$PYTHONPATH:$HOME/Projects/django-debug-toolbar"
 export DJANGO_SETTINGS_MODULE="pushingkarma.settings.settings"
 source $HOME/Sources/django/extras/django_bash_completion
 

settings/settings.py

 DATABASES = {'default': {
     'ENGINE': 'django.db.backends.postgresql_psycopg2',
     'HOST': 'localhost',
+    'PORT': 5432,
     'NAME': 'pushingkarma',
     'USER': 'pushingkarma',
     'PASSWORD': POSTGRES_PASSWORD,
+    'ADMINUSER': 'mjs7231',
 }}
 
 # Email Settings

themes/v2-hardwood/static/css/pushingkarma.css

   width: 255px;
   height: 55px;
   margin: 5px 5px 5px 17px;
+  transition: none;
+  -webkit-transition: none;
+  -moz-transition: none;
 }
 #logo .title,
 #logo .subtitle {
     margin: 0px;
     padding: 0px 0px 15px 0px;
   }
-  #layoutwrap { border-radius: 0px; }
+  #layoutwrap { border-radius:0px; border-width:0px; }
 }
 
 
 }
 
 
+/*--- Project Descriptions ---*/
+div.project h3,
+div.project div.description {
+  margin-left: 53px;
+}
+
+div.project div.icon span {
+  background-position: center center;
+  background-repeat: no-repeat;
+  display: block;
+  float: left;
+  height: 48px;
+  margin-right: 5px;
+  width: 48px;
+  position: relative;
+  top: -3px;
+}
+div.jquery_wysiwym div.icon span { background-image: url(../img/jquery_wysiwym.png); }
+div.django_dbbackup div.icon span { background-image: url(../img/django_dbbackup.png); }
+
+
 /*---------------------------------------------------------------------------
 /* Widgets (specialized elements)
 /*------------------------------------------------------------------------ */
 
 /*--- Vignette ---*/
 .vignette {
-  -webkit-box-shadow: inset 0px 0px 80px rgba(0,0,0,0.4);
-	-moz-box-shadow: inset 0px 0px 80px rgba(0,0,0,0.4);
 	box-shadow: inset 0px 0px 80px rgba(0,0,0,0.4);
+  display: inline-block;
 	line-height: 0;
-	display: inline-block;
 }
-.thumbnail .vignette {
-  -webkit-box-shadow: inset 0px 0px 20px rgba(0,0,0,0.4);
-	-moz-box-shadow: inset 0px 0px 20px rgba(0,0,0,0.4);
-	box-shadow: inset 0px 0px 20px rgba(0,0,0,0.4);
-	line-height: 0;
-	display: inline-block;
-}
-.vignette img {
-	position: relative;
-	z-index: -1;
-}
+.thumbnail .vignette { box-shadow: inset 0px 0px 30px rgba(0,0,0,0.4); }
+.vignette img { position: relative; z-index: -1; }
 
 /*--- Tag Link ---*/
 .taglink {
   padding: 0px 8px 0px 8px;
   position: relative;
   text-shadow: 0px -1px 1px rgba(0,0,0,0.4);
+  transition: none;
+  -webkit-transition: none;
+  -moz-transition: none;
 }
 .taglink .close {
   font-size: 14px;

themes/v2-hardwood/static/img/django_dbbackup.png

Added
New image

themes/v2-hardwood/static/img/jquery_wysiwym.png

Added
New image

themes/v2-hardwood/templates/notebook/overview.html

 {% block rightcolumn %}
   {% include "sidebar/aboutme.html" %}
   {% include "sidebar/populartags.html" %}
-  {% comment %}
   {% include "sidebar/projects.html" %}
-  {% endcomment %}
 {% endblock rightcolumn %}

themes/v2-hardwood/templates/projects/django_dbbackup/dbbackup_amazons3.html

+{% extends "projects/django_dbbackup/dbbackup_base.html" %}
+{% load widgets %}
+
+{% block documentation %}
+  <!-- Introduction -->
+  {% anchor_header 'h1' 'DBBackup to Amazon S3' 'margin-top:20px;' %}
+  <p>In order to backup to Amazon S3, you'll first need to create an
+    <a href='http://aws.amazon.com/'>Amazon Webservices Account</a> and setup your Amazon S3
+    bucket. Once that is complete, you can follow the required setup below.</p>
+
+  {% anchor_header 'h2' 'Setup Your Django Project' %}
+  <ol>
+    <li>Install django-dbbackup and the required simples3 dependancy:<br/>
+      <pre>>> cd django-dbbackup
+>> python setup.py install
+>> pip install simples3</pre></li>
+    <li>Add 'dbbackup' to INSTALLED_APPS in your settings.py file.</li>
+    <li>Include the required settings below.
+    <pre>DBBACKUP_STORAGE = 'dbbackup.storage.s3_storage'
+DBBACKUP_S3_BUCKET = '&lt;amazon_bucket_name&gt;'
+DBBACKUP_S3_ACCESS_KEY = '&lt;amazon_access_key&gt;'
+DBBACKUP_S3_SECRET_KEY = '&lt;amazon_secret_key&gt;'</pre></li>
+    <li>Now you're ready to use the backup management commands.</li>
+  </ol>
+
+  <!-- Available Settings -->
+  {% anchor_header 'h1' 'Available Settings' 'margin-top:30px;' %}
+  <p><strong>DBBACKUP_S3_BUCKET (required)</strong><br/>The name of the Amazon S3 bucket to store your
+    backups. This directory must exist before attempting to create your first backup.</p>
+  <p><strong>DBBACKUP_S3_ACCESS_KEY (required)</strong><br/>Your Amazon Account Access Key. This can be
+    found on your <a href='https://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=access-key'>Amazon Account Security Credentials</a>
+    page. Note: Do not share this key with anyone you do not trust with access to your
+    Amazon files.</p>
+  <p><strong>DBBACKUP_S3_SECRET_KEY (required)</strong><br/>Your Amazon Account Secret Key. This can be
+    found in the same location as your Access Key above.</p>
+  <p><strong>DBBACKUP_S3_DIRECTORY (optional)</strong><br/>The directory in your Amazon S3 bucket you
+    wish to save your backups.  By default this is set to 'django-dbbackups/'.</p>
+  <p><strong>DBBACKUP_S3_DOMAIN (optional)</strong><br/>Optionally specify the Amazon domain to use
+    when transferring the generated backup files. For example, this can be set to
+    https://s3-eu-west-1.amazonaws.com/. By default, this is 'https://s3.amazonaws.com/'.</p>
+{% endblock documentation %}

themes/v2-hardwood/templates/projects/django_dbbackup/dbbackup_base.html

+{% extends "base_twocolumn.html" %}
+{% load widgets %}
+{% block title %}Django-DBBackup - {{ block.super }}{% endblock %}
+
+
+{% block leftcolumn %}
+  <div class='content'>
+    {% block documentation %}
+    {% endblock documentation %}
+  </div>
+{% endblock leftcolumn %}
+
+
+{% block rightcolumn %}
+  {% if package.version %}
+    <div class='call-to-action' style='margin-top:50px;'>
+      <a href='{{ package.get_absolute_url }}'>
+        <div class='title'>Download Django-DBBackup</div>
+        <div class='subtitle'>Version: {{ package.version }} ({{ package.size }})</div>
+      </a>
+    </div>
+  {% endif %}
+
+  <!-- About this Project -->
+  <div class='container'>
+    <h3 class='first'>About This Project</h3>
+    <p>Django-DBBackup is a project created by me (<strong>Michael Shepanski</strong>), a web developer
+      located in Boston, MA. I developed this project out of a need to backup this personal site
+      database to an offsite location. Feel free to manipulate, improve upon, and use however
+      you'd like.</p>
+    <p>Licensed via <a href='http://creativecommons.org/licenses/by/3.0'>Creative Commons Attribution</a>.</p>
+  </div>
+
+  <!-- Documentation -->
+  <div class='container'>
+    <h3 class='first'>More Documentation</h3>
+    <ul><li>
+      {% if topic == 'intro' %}<strong>Intro & Management Commands</strong>
+      {% else %}<a href='/projects/django-dbbackup/'>Introduction & Management Commands</a>{% endif %}
+    </li><li>
+      {% if topic == 'amazons3' %}<strong>Setup Backups to Amazon S3</strong>
+      {% else %}<a href='/projects/django-dbbackup/amazons3/'>Setup Backups to Amazon S3</a>{% endif %}
+    </li><li>
+      {% if topic == 'dropbox' %}<strong>Setup Backups to Dropbox</strong>
+      {% else %}<a href='{/projects/django-dbbackup/dropbox/'>Setup Backups to Dropbox</a>{% endif %}
+    </li><li>
+      {% if topic == 'filesystem' %}<strong>Setup Backups to Local Disk</strong>
+      {% else %}<a href='/projects/django-dbbackup/filesystem/'>Setup Backups to Local Disk</a>{% endif %}
+    </li><li>
+      {% if topic == 'database' %}<strong>Customize Backup Commands</strong>
+      {% else %}<a href='/projects/django-dbbackup/database/'>Customize Backup Commands</a>{% endif %}
+    </li></ul>
+  </div>
+
+  <!-- Database Compatability -->
+  <div class='container'>
+    <h3 class='first'>Database Compatability</h3>
+    <p>My testing resulted the following. If you find different, please let me know and I will adjust.</p>
+    <ul>
+      <li>SQLite 3.x</li>
+      <li>MySQL 5.x</li>
+      <li>PostgreSQL 9.x</li>
+    </ul>
+  </div>
+
+  <!-- Support & Contact -->
+  <div class='container'>
+    <h3 class='first'>Support & Contact</h3>
+    <ul>
+      <li>Fork me from the <a href='https://bitbucket.org/mjs7231/django-dbbackup'>Bitbucket repository</a>.</li>
+      <li>Join discussions in the <a href='http://groups.google.com/group/django-dbbackup'>Google Group</a>.</li>
+      <li>Report issues and bugs <a href='https://bitbucket.org/mjs7231/django-dbbackup/issues?status=new&status=open'>here</a>.</li>
+      <li>Follow <a href='http://twitter.com/pkkid'>@PKKid</a> on Twitter for release updates and news.</li>
+    </ul>
+  </div>
+{% endblock rightcolumn %}

themes/v2-hardwood/templates/projects/django_dbbackup/dbbackup_database.html

+{% extends "projects/django_dbbackup/dbbackup_base.html" %}
+{% load widgets %}
+
+{% block extrahead %}
+  {{ block.super }}
+  <script type='text/javascript'>
+    $(function() { $('#databases').tabs(); });
+  </script>
+{% endblock extrahead %}
+
+
+{% block documentation %}
+
+<!-- Database Settings -->
+{% anchor_header 'h1' 'Database Settings' 'margin-top:20px;' %}
+<p>The following databases are supported by this application. You can customize the commands
+  used for backup and the resulting filenames with the following settings.</p>
+
+<div id="databases" class='tabwrap' style='margin-top:20px;'>
+  <ul>
+    <li><a href="#mysql">MySQL</a></li>
+    <li><a href="#postgres">Postgres</a></li>
+    <li><a href="#sqlite">SQLite</a></li>
+  </ul>
+  <div id="mysql">{% include 'projects/django_dbbackup/help_mysql.html' %}</div>
+  <div id="postgres">{% include 'projects/django_dbbackup/help_postgres.html' %}</div>
+  <div id="sqlite">{% include 'projects/django_dbbackup/help_sqlite.html' %}</div>
+</div>
+
+{% anchor_header 'h1' 'Defining Backup Commands' 'margin-top:30px' %}
+<p>When creating backup or restore commands, there are a few template variables you
+can use in the commands (listed below).  Also note, ending a command with &gt;
+or &lt; will pipe the file contents from or to the command respectively.</p>
+<ul>
+  <li><strong>{databasename}:</strong> Name of the database from settings.py</li>
+  <li><strong>{servername}:</strong> Optional SERVER_NAME setting in settings.py</li>
+  <li><strong>{username}:</strong> Database username from settings.py</li>
+  <li><strong>{password}:</strong> Database password from settings.py</li>
+  <li><strong>{datetime}:</strong> Current datetime string (see DBBACKUP_DATE_FORMAT).</li>
+  <li><strong>{extension}:</strong> File extension for the current database.</li>
+</ul>
+<p>There are also two special commands READ_FILE and WRITE_FILE which take the form
+  of a two-item list, the second item being the file to read or write. Please see
+  the SQLite settings above for reference.</p>
+
+<!-- Global Settings -->
+<h1 style='margin-top:30px;'>Global Settings</h1>
+<p><strong>DBBACKUP_STORAGE (required)</strong><br/>String pointing to django-dbbackup location
+  module to use when performing a backup. You can see the exact definitions to use
+  in the required settings for the backup location of your choice above.</p>
+<p><strong>DBBACKUP_DATE_FORMAT (optional)</strong><br/>The
+  <a href='http://docs.python.org/library/datetime.html'>Python datetime format</a> to use when
+  generating the backup filename. By default this is '%Y-%m-%d-%H%M%S'.</p>
+<p><strong>DBBACKUP_SERVER_NAME (optional)</strong><br/>An optional server name to use when
+  generating the backup filename. This is useful to help distinguish between development and
+  production servers. By default this value is not used and the servername is not included in
+  the generated filename.</p>
+<p><strong>DBBACKUP_FILENAME_TEMPLATE (optional)</strong><br/>The template to use when generating
+  the backup filename. By default this is '{databasename}-{servername}-{datetime}.{extension}'.</p>
+{% endblock documentation %}

themes/v2-hardwood/templates/projects/django_dbbackup/dbbackup_dropbox.html

+{% extends "projects/django_dbbackup/dbbackup_base.html" %}
+{% load widgets %}
+
+{% block documentation %}
+  <!-- Introduction -->
+  {% anchor_header 'h1' 'DBBackup to Dropbox' 'margin-top:20px;' %}
+  <p>In order to backup to Dropbox, you'll first need to create a
+    <a href='http://dropbox.com/'>Dropbox Account</a> and set it up to communicate
+    with the Django-DBBackup application. Don't worry, all instructions are below.</p>
+
+  <!-- Setup Your Dropbox Account -->
+  {% anchor_header 'h2' 'Setup Your Dropbox Account' %}
+  <ol>
+    <li>Login to Dropbox and navigate to <a href='https://www.dropbox.com/developers/apps'>Developers &raquo; MyApps</a>.</li>
+    <li>Click the button to create a new app and name it whatever you like. For reference, I named mine 'Website Backups'.</li>
+    <li>After your app is created, note the options button and more importantly the 'App Key'
+      and 'App Secret' values inside. You'll need those later.</li>
+  </ol>
+
+  <!-- Required Setup -->
+  {% anchor_header 'h2' 'Setup Your Django Project' %}
+  <ol>
+    <li>Install django-dbbackup and the required Python
+      <a href='https://bitbucket.org/dropboxapi/dropbox-client-python'>Dropbox Client API</a>.
+      If using Pip, you can install this package using the following command:</p>
+      <pre>>> cd django-dbbackup
+>> python setup.py install
+>> pip install hg+https://bitbucket.org/dropboxapi/dropbox-client-python</pre></li>
+    <li>Add 'dbbackup' to INSTALLED_APPS in your settings.py file.</li>
+    <li>Include the required settings below.
+    <pre>DBBACKUP_STORAGE = 'dbbackup.storage.dropbox_storage'
+DBBACKUP_TOKENS_FILEPATH = '&lt;local_tokens_filepath&gt;'
+DBBACKUP_DROPBOX_APP_KEY = '&lt;dropbox_app_key&gt;'
+DBBACKUP_DROPBOX_APP_SECRET = '&lt;dropbox_app_secret&gt;'</pre></li>
+    <li>Now you're ready to use the backup management commands. The first time you run a command
+      you'll be prompted to visit a Dropbox URL to allow DBBackup access to your Dropbox account.</li>
+  </ol>
+
+  <!-- Available Settings -->
+  {% anchor_header 'h1' 'Available Settings' 'margin-top:30px;' %}
+  <p><strong>DBBACKUP_TOKENS_FILEPATH (required)</strong><br/>The local filepath to store the Dropbox oAuth
+    request and tokens. This file will be auto-created, but should be treated like any other
+    password to access your website. NOTE: Do not share these keys with anyone you do not trust with access to your
+    Dropbox files.</p>
+  <p><strong>DBBACKUP_DROPBOX_APP_KEY (required)</strong><br/>
+    String containing your Dropbox App Key. NOTE: Do not share these keys with anyone
+    you do not trust with access to your Dropbox files.</p>
+  <p><strong>DBBACKUP_DROPBOX_APP_SECRET (required)</strong><br/>
+    String containing your Dropbox App Secret. NOTE: Do not share these keys with anyone
+    you do not trust with access to your Dropbox files.</p>
+  <p><strong>DBBACKUP_DROPBOX_ACCESS_TYPE (optional)</strong><br/>String containing your Dropbox Access Type. This is
+    either 'dropbox' or 'app_folder' depending on the access type specified when creating your application on
+    the Dropbox website. This defaults to 'dropbox', assuming your application has full access to your
+    Dropbox folder.</p>
+  <p><strong>DBBACKUP_DROPBOX_DIRECTORY (optional)</strong><br/>The directory in Dropbox you wish to save
+    your backups.  By default this is set to '/django-dbbackups/'.</p>
+{% endblock documentation %}

themes/v2-hardwood/templates/projects/django_dbbackup/dbbackup_filesystem.html

+{% extends "projects/django_dbbackup/dbbackup_base.html" %}
+{% load widgets %}
+
+{% block documentation %}
+  <!-- Introduction -->
+  {% anchor_header 'h1' 'DBBackup to Local Disk' 'margin-top:20px;' %}
+  <p>To store your database backups on the local filesystem, simply setup the required
+    settings below. Storing backups to local disk may also be useful for Dropbox if you
+    already have the offical Dropbox client installed on your system.</p>
+
+  {% anchor_header 'h2' 'Setup Your Django Project' %}
+  <ol>
+    <li>Install django-dbbackup application:<br/>
+      <pre>>> cd django-dbbackup
+>> python setup.py install</pre></li>
+    <li>Add 'dbbackup' to INSTALLED_APPS in your settings.py file.</li>
+    <li>Include the required settings below.
+    <pre>DBBACKUP_STORAGE = 'dbbackup.storage.filesystem_storage'
+DBBACKUP_FILESYSTEM_DIRECTORY = '&lt;local_directory_path&gt;'</pre></li>
+    <li>Now you're ready to use the backup management commands.</li>
+  </ol>
+
+
+  <!-- Available Settings -->
+  {% anchor_header 'h1' 'Available Settings' 'margin-top:30px;' %}
+  <p><strong>DBBACKUP_FILESYSTEM_DIRECTORY (required)</strong><br/>The directory on your local system
+    you wish to save your backups.</p>
+{% endblock documentation %}

themes/v2-hardwood/templates/projects/django_dbbackup/dbbackup_intro.html

+{% extends "projects/django_dbbackup/dbbackup_base.html" %}
+{% load widgets %}
+
+
+{% block documentation %}
+
+  {% anchor_header 'h1' 'Django-DBBackup' 'margin-top:20px;' %}
+  <p><img src='{{STATIC_URL}}img/icon/django_dbbackup.png' style='float:left; padding:5px 10px 5px 5px;'/>
+    This Django application provides management commands to help backup and restore your project
+    database to AmazonS3, Dropbox or Local Disk.
+  </p>
+
+  <!-- Features -->
+  <div class='features' style='margin-top:15px;'>
+    <div class='feature' style='width:400px;'>Keep your important data secure and offsite.</div>
+    <div class='feature' style='width:400px;'>Use Crontab or Celery to setup automated backups.</div>
+    <div class='feature' style='width:400px;'>Great to keep your development database up to date.</div>
+    <div class='clear'></div>
+  </div>
+
+  <!-- Quickstart Amazon -->
+  {% anchor_header 'h1' 'Quick Start: Backup to AmazonS3' 'margin-top:30px;' %}
+  <ol>
+    <li>Install django-dbbackup and the required simples3 dependancy:<br/>
+      <pre>>> cd django-dbbackup
+>> python setup.py install
+>> pip install simples3</pre></li>
+    <li>Add 'dbbackup' to INSTALLED_APPS in your settings.py file.</li>
+    <li>Include the required settings for Amazon S3.
+    <pre>DBBACKUP_STORAGE = 'dbbackup.storage.s3_storage'
+DBBACKUP_S3_BUCKET = '&lt;amazon_bucket_name&gt;'
+DBBACKUP_S3_ACCESS_KEY = '&lt;amazon_access_key&gt;'
+DBBACKUP_S3_SECRET_KEY = '&lt;amazon_secret_key&gt;'</pre></li>
+    <li>Now you're ready to use the managements commands below.</li>
+  </ol>
+
+  <!-- Management Commands -->
+  {% anchor_header 'h1' 'Management Commands' 'margin-top:30px;' %}
+  <h3 style='margin-top:10px;'>DBBackup</h3>
+  <p>Backup your database to the specified storage. By default this will backup
+    all databases specified in your settings.py file and will not delete any
+    old backups. You can optionally specify a server name to be included in the
+    backup filename.</p>
+  <pre>dbbackup [-s &lt;servername&gt;] [-d &lt;database&gt;] [--clean]</pre>
+
+  <h3>DBRestore</h3>
+  <p>Restore your database from the specified storage. By default this will lookup
+    the latest backup and restore from that. You may optionally specify a servername if you
+    you want to backup a database image that was created from a different server. You
+    may also specify an explicit local file to backup from.</p>
+  <pre>dbrestore [-d &lt;database&gt;] [-s &lt;servername&gt;] [-f &lt;localfile&gt;]</pre>
+{% endblock documentation %}

themes/v2-hardwood/templates/projects/django_dbbackup/description.html

+
+<div class='shine-40' style='margin-top:20px;'></div>
+<div class='project django_dbbackup sidebox'>
+  <div class='icon'><span></span></div>
+  <h3 class='first'><a href='{% url django_dbbackup %}'>Django-DBBackup</a></h3>
+  <div class='description'>
+    Management commands to backup and restore your
+    database to AmazonS3, Dropbox or Local Disk.
+  </div>
+</div>

themes/v2-hardwood/templates/projects/django_dbbackup/help_mysql.html

+
+<h2 class='first'>MySQL</h2>
+
+<p><strong>DBBACKUP_MYSQL_EXTENSION (optional)</strong><br/>
+  Entension to use for a mysql backup. By default this is 'mysql'.</p>
+
+<p><strong>DBBACKUP_MYSQL_BACKUP_COMMANDS (optional)</strong><br/>
+  List of commands to use execute when creating a backup.  Commands are sent to popen and
+  should be split into shlex tokens. By default, the following command is run:</p>
+<pre>mysqldump -u{username} -p{password} {databasename} &gt;</pre>
+
+<p><strong>DBBACKUP_MYSQL_RESTORE_COMMANDS (optional)</strong><br/>
+  List of commands to use execute when creating a backup.  Commands are sent to popen and
+  should be split into shlex tokens. By default, the following command is run:</p>
+<pre>mysql -u{username} -p{password} {databasename} &lt;</pre>

themes/v2-hardwood/templates/projects/django_dbbackup/help_postgres.html

+
+<h2 class='first'>Postgres</h2>
+
+<p><strong>DBBACKUP_POSTGRESQL_EXTENSION (optional)</strong><br/>
+  Entension to use for a postgres backup. By default this is 'psql'.</p>
+
+<p><strong>DBBACKUP_POSTGRESQL_BACKUP_COMMANDS (optional)</strong><br/>
+  List of commands to use execute when creating a backup. Commands are sent to popen and
+  should be split into shlex tokens. By default, the following command is run:</p>
+<pre>pg_dump {databasename} &gt;</pre>
+
+<p><strong>DBBACKUP_POSTGRESQL_RESTORE_COMMANDS (optional)</strong><br/>
+  List of commands to use execute when restoring a backup. Commands are sent to popen and
+  should be split into shlex tokens. By default, the following commands are run:</p>
+<pre>dropdb {databasename}
+createdb {databasename} --owner={username}
+psql -1 {databasename} &lt;</pre>

themes/v2-hardwood/templates/projects/django_dbbackup/help_sqlite.html

+
+<h2 class='first'>SQLite</h2>
+
+<p><strong>DBBACKUP_SQLITE_EXTENSION (optional)</strong><br/>
+  Entension to use for an sqlite backup. By default this is 'sqlite'.</p>
+
+<p><strong>DBBACKUP_SQLITE_BACKUP_COMMANDS (optional)</strong><br/>
+  List of commands to use execute when creating a backup. Commands are sent to popen and
+  should be split into shlex tokens. By default, the following command is run:</p>
+<pre>[READ_FILE, '{databasename}']</pre>
+
+<p><strong>DBBACKUP_SQLITE_RESTORE_COMMANDS (optional)</strong><br/>
+  List of commands to use execute when restoring a backup. Commands are sent to popen and
+  should be split into shlex tokens. By default, the following command is run:</p>
+<pre>[WRITE_FILE, '{databasename}']</pre>

themes/v2-hardwood/templates/projects/jquery_wysiwym/demo_input.txt

+The edit buttons, auto-indentation and help syntax around this
+textarea are the result of using **JQuery-Wysiwym**. This demo
+is showing off the final result of jquery-wysiwym along side
+[Showdown][] and [Prettify][] to create a live preview similar
+to what [StackOverflow][] has.
+
+
+## HTML ##
+
+Include wysiwym.js along with Showdown and Prettify to help
+with converting the raw text input to HTML.
+
+    <script type='text/javascript' src='path/to/prettify.js'></script>
+    <script type='text/javascript' src='path/to/showdown.js'></script>
+    <script type='text/javascript' src='path/to/wysiwym.js'></script>
+
+Your HTML source also needs to include a textarea, and and a
+placeholder for the live preview output to go.
+
+    &lt;textarea id='mytextarea'&gt;&lt;/textarea&gt;
+    <div id='livepreview'></div>
+
+
+## Javascript ##
+
+Setting up the WYSIWYM editor is as simple as calling
+<code>.wysiwym(...)</code> on the jQuery textarea.  The rest
+of the code deals with setting up the live preview.
+
+    // Setup the WYSIWYM editor!
+    $('#mytextarea').wysiwym(Wysiwym.Markdown, {});
+
+    // For the Live Preview we want to check the value of
+    // textarea changes as some set interval.  If it's
+    // changed, we'll call Showdown to convert the textarea
+    // input to HTML then prettify to colorize code blocks.
+    var showdown = new Showdown.converter();
+    var prev_text = "";
+    var update_live_preview = function() {
+        var input_text = $('#mytextarea').val();
+        if (input_text != prev_text) {
+            var text = $("<div>"+ showdown.makeHtml(input_text) +"</div>");
+            text.find('pre').addClass('prettyprint');
+            text.find('p code').addClass('prettyprint');
+            text.find('code').each(function() {
+                $(this).html(prettyPrintOne($(this).html()));
+            });
+            $('#livepreview').html(text);
+            prev_text = input_text;
+        }
+    }
+    setInterval(update_live_preview, 200);
+
+
+[Showdown]: http://softwaremaniacs.org/playground/showdown-highlight/
+[Prettify]: http://code.google.com/p/google-code-prettify/
+[StackOverflow]: http://stackoverflow.com

themes/v2-hardwood/templates/projects/jquery_wysiwym/description.html

+
+<div class='shine-40' style='margin-top:20px;'></div>
+<div class='project jquery_wysiwym sidebox'>
+  <div class='icon'><span></span></div>
+  <h3 class='first'><a href='{% url jquery_wysiwym %}'>JQuery-Wysiwym</a></h3>
+  <div class='description'>
+    JQuery plugin to convert any textarea into a friendly editor
+    for Markdown, MediaWiki, or BBCode.
+  </div>
+</div>

themes/v2-hardwood/templates/projects/jquery_wysiwym/wysiwym.html

+{% extends "base_twocolumn.html" %}
+{% load widgets %}
+{% block title %}JQuery-Wysiwym - {{ block.super }}{% endblock %}
+
+{% block extrahead %}
+  <style type='text/css'>
+    div.wysiwym-buttons { float:left; margin-bottom:2px; }
+    a.wysiwym-help-toggle { float:left; }
+    div.wysiwym-help { float:left; clear:left; }
+  </style>
+  <script type='text/javascript'>
+    $(function() {
+        // Setup the Wysiwym Editor
+        $('#mytextarea').wysiwym(Wysiwym.Markdown, {});
+
+        // Setup Wysiwym Live-Preview
+        var showdown = new Showdown.converter();
+        var prev_text = "";
+        var update_live_preview = function() {
+            var input_text = $('#mytextarea').val();
+            if (input_text != prev_text) {
+                var text = $("<div>"+ showdown.makeHtml(input_text) +"</div>");
+                text.find('pre').addClass('prettyprint');
+                text.find('p code').addClass('prettyprint');
+                text.find('code').each(function() {
+                    $(this).html(prettyPrintOne($(this).html()));
+                });
+                $('#livepreview').html(text);
+                prev_text = input_text;
+            }
+        }
+        setInterval(update_live_preview, 200);
+
+    });
+  </script>
+{% endblock extrahead %}
+
+
+{% block leftcolumn %}
+    <div class='content'>
+      <h1 style='margin-top:20px;'>JQuery-Wysiwym</h1>
+      <p><img src='{{STATIC_URL}}img/icon/jquery_wysiwym.png' style='float:left; padding:5px 10px 5px 5px;'/>
+        The editor on this page is using <a href='http://en.wikipedia.org/wiki/WYSIWYM'>wysiwym</a>
+        (<em>What You See Is What You Mean</em>). It is not meant to be used to output HTML,
+        it simply helps with the desired markup syntax. Currently supported are Markdown, MediaWiki,
+        and BBCode. With a little help from other projects it can be used to create a live HTML
+        preview editor similar to what StackOverflow has.  Simpler examples can be found
+        <a href='{{STATIC_URL}}js/jquery-wysiwym/examples/basic.markdown.html'>here</a>.</p>
+      <div class='features' style='margin-top:15px;'>
+        <div class='feature'>Easy to Setup</div>
+        <div class='feature'>Adds an Editor Toolbar</div>
+        <div class='feature'>Auto-Indents Code</div>
+        <div class='feature'>Offers Syntax Help</div>
+        <div class='feature'>Auto-Indents Lists</div>
+        <div class='feature'>Display a Live Preview!</div>
+        <div class='clear'></div>
+      </div>
+
+      <div id='wysiwym-demowrap'>
+        {% anchor_header 'h2' 'Demo' 'margin:20px 0px 10px 0px;' %}
+        <div id='wysiwym-tryit'></div>
+      </div>
+      <textarea id='mytextarea' style='width:460px; height:200px;' wrap="off">{% include "projects/jquery_wysiwym/demo_input.txt" %}</textarea>
+      <div class='clear'></div>
+      <div id='livepreview'></div>
+
+      <!-- Documentation -->
+
+      {% anchor_header 'h1' 'Documentation' 'margin-top:20px;' %}
+      {% anchor_header 'h2' '.wysiwym(markup, [options])' %}
+      <p><strong>markup:</strong> Wysiwym markup class to use when editing inside the textarea.
+        This can be one of the currently supported markup languages: <code>Wysiwym.Markdown</code>,
+        <code>Wysiwym.Mediawiki</code>, or <code>Wysiwym.BBCode</code>.</p>
+      <p><strong>options:</strong> Object used to define optional arguments to pass the
+        Wysiwym plugin.  All options are defined below.</p>
+
+      <!-- Options -->
+      {% anchor_header 'h1' 'Options' 'margin-top:20px;' %}
+      {% anchor_header 'h2' 'containerButtons:' %}
+      <p>JQuery element to place buttons. This option is useful if you want to place the buttons
+        in a container other than the default. By default, buttons will be placed inside a newly
+        created element directly before the textarea:
+        <code>&lt;div class='wysiwym-button'&gt;...&lt;/div&gt;</code></p>
+      <p><em>An example value might be:</em> <code>$('div.my_own_button_container')</code>.</p>
+
+      {% anchor_header 'h2' 'containerHelp:' %}
+      <p>JQuery element to place help syntax table. This option is useful if you want to place
+        the help syntax in a container other than the default. By default, this will be placed
+        inside a newly created element directly after the <em>wysiwym-help-toggle
+        (helpToggleElem)</em> link: <code>&lt;div class='wysiwym-help'&gt;...&lt;/div&gt;</code></p>
+      <p><em>An example value might be:</em> <code>$('div.my_own_help_container')</code>.</p>
+
+      {% anchor_header 'h2' 'helpEnabled:' %}
+      <p>Boolean option to disable the help toggle link and help syntax all together. By
+        default, this value is <code>true</code>.</p>
+
+      {% anchor_header 'h2' 'helpToggle:' %}
+      <p>Boolean option to disable only the help toggle link. This means that the help syntax
+        table inside <em>wysiwym-help (containerHelp)</em> will always be visisble.  By default,
+        this value is <code>true</code>.</p>
+
+      {% anchor_header 'h2' 'helpToggleElem:' %}
+      <p>JQuery element to use as the toggle switch set the help syntax visibility. This option
+        is useful if you want to use an element as the toggle other than the
+        default. By default, this will be placed inside a newly created link directly
+        after the textarea: <code>&lt;a class='wysiwym-help-toggle'&gt;...&lt;/a&gt;</code></p>
+      <p><em>An example value might be:</em> <code>$('a.my_own_help_toggle')</code>.</p>
+
+      {% anchor_header 'h2' 'helpTextShow:' %}
+      <p>String value to use as the text to display the help syntax. This option is useful if
+        you use prefer a language other than English. By default, this value is
+        <code>'show markup syntax'</code>.</p>
+
+      {% anchor_header 'h2' 'helpTextHide:' %}
+      <p>String value to use as the text to hide the help syntax. This option is useful if
+        you use prefer a language other than English. By default, this value is
+        <code>'hide markup syntax'</code>.</p>
+
+    </div>
+{% endblock leftcolumn %}
+
+
+{% block rightcolumn %}
+
+  {% if package.version %}
+    <div class='call-to-action' style='margin-top:50px;'>
+      <a href='{{ package.get_absolute_url }}'>
+        <div class='title'>Download JQuery-Wysiwym</div>
+        <div class='subtitle'>Version: {{ package.version }} ({{ package.size }})</div>
+      </a>
+    </div>
+  {% endif %}
+
+  <div class='container'>
+    <h3 class='first'>About This Project</h3>
+    <p>JQuery-Wysiwym is a project created by me (<strong>Michael Shepanski</strong>), a web developer
+      located in Boston, MA. I developed this project out of a desire to have a helpful tools when
+      editing Markdown text for this blog. Feel free to manipulate, improve upon, and use however
+      you'd like.</p>
+    <p>Licensed via <a href='http://creativecommons.org/licenses/by/3.0'>Creative Commons Attribution</a>.</p>
+  </div>
+
+  <div class='container'>
+    <h3 class='first'>Browser Compatability</h3>
+    <p>My testing resulted the following. If you find different, please let me know and I will adjust.</p>
+    <ul>
+      <li>Chrome 8.0+</li>
+      <li>Firefox 4.0+</li>
+      <li>Internet Explorer 7.0+</li>
+      <li>iPhone & iPad</li>
+      <li>Safari 4.0+</li>
+    </ul>
+  </div>
+
+  <div class='container'>
+    <h3 class='first'>Support & Contact</h3>
+    <ul>
+      <li>Fork me from the <a href='https://bitbucket.org/mjs7231/jquery-wysiwym'>Bitbucket repository</a>.</li>
+      <li>Join discussions in the <a href='http://groups.google.com/group/jquery-wysiwym'>Google Group</a>.</li>
+      <li>Report issues and bugs <a href='https://bitbucket.org/mjs7231/jquery-wysiwym/issues?status=new&status=open'>here</a>.</li>
+      <li>Follow <a href='http://twitter.com/pkkid'>@PKKid</a> on Twitter for release updates and news.</li>
+    </ul>
+  </div>
+{% endblock rightcolumn %}

themes/v2-hardwood/templates/projects/projects.html

+{% extends "base.html" %}
+{% block title %}Projects - {{ block.super }}{% endblock %}
+
+
+{% block content %}
+  <div class='article'>
+    <div class='content'>
+      <h1>Recent Projects</h1>
+      <p>I wrote my first program when I was 17, a Blackjack game for AmigaBasic.
+        However, it's only been recently that I started writing useful little bits of code with
+        idea of sharing them in mind. Below is a list of recent projects I have been working on
+        in no particular order.</p>
+
+      <div style='width:280px; margin-right:20px; float:left'>
+        {% include "projects/jquery_wysiwym/description.html" %}
+      </div>
+      <div style='width:280px; margin-right:20px; float:left'>
+        {% include "projects/django_dbbackup/description.html" %}
+      </div>
+      <div class='clear'></div>
+
+      <h1>Support</h1>
+      <p>All projects are hosted on <a href='https://bitbucket.org/'>Bitbucket</a> and any bugs
+        should be reported there. If you have a question, need help setting up a project or just want
+        to chat, feel free to send a message on twitter <a href='http://twitter.com/pkkid'>@PKKid</a> or
+        send me an email at <strong>mjs7231<span style='display:none'>+site</span><span>@</span>gmail.com</strong>.</p>
+    </div>
+  </div>
+
+
+{% endblock %}

themes/v2-hardwood/templates/sidebar/projects.html

 
-{% if hidden != 'jquery_wysiwym' %}
+{% ifnotequal hidden 'jquery_wysiwym' %}
   {% include "projects/jquery_wysiwym/description.html" %}
-{% endif %}
+{% endifnotequal %}
 
-{% if hidden != 'django_dbbackup' %}
+{% ifnotequal hidden 'django_dbbackup' %}
   {% include "projects/django_dbbackup/description.html" %}
-{% endif %}
+{% endifnotequal %}