Permalink
Browse files

Add documentation, prep for inclusion in cheese shop.

  • Loading branch information...
1 parent d964e44 commit fd3d06e7647e14c6e20e624bb97bdafb51445935 Mike Seidle committed Dec 7, 2011
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -17,6 +17,7 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.append(os.path.abspath('..'))
+sys.path.append(os.path.abspath('../example'))
import myurls
os.environ['DJANGO_SETTINGS_MODULE'] = 'example.settings'
@@ -40,7 +41,7 @@
# General information about the project.
project = u'django-my-urls'
-copyright = u'2010, Mike Seidle'
+copyright = u'2011, DirectEmployers Foudation'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -1,3 +1,19 @@
Getting Started
===============
+*Fast Way:* Go to example directory and start hacking.
+*Methodical Way:* Add myurls to your installed apps in settings.py.
+
+Two methods are provided for implementing short URL redirection:
+
+- a 404 FallbackMiddleWare and a view.
+- a django view
+
+*When to use the FallBackMiddleWare:*
+
+- When every URL except those in URLs.py are short URLs
+- eg. mysite.com/si11S
+
+* When to use the view based redirector:*
+- When you need all URLs following a URL pattern to be redirected.
+- eg. mysite.com/click/si11S
@@ -3,7 +3,7 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
-Welcome to app's documentation!
+django-my-urls
===============================
Contents:
@@ -15,3 +15,4 @@ or
Dependencies
************
+django 1.3 or greater (yes, we use class based generic views)
@@ -9,4 +9,7 @@ Reference
:maxdepth: 2
:glob:
- settings
+ settings
+ basex
+ models
+
@@ -0,0 +1,5 @@
+Models
+======
+
+.. automodule:: myurls.models
+ :members:
@@ -1,3 +1,36 @@
-
+========
Settings
========
+
+The folowing settings are available and can be set in your settings.py:
+
+.. _available-settings:
+
+Available settings
+==================
+*MYURLS_CHARACTER_SET = "ABCabc123"*
+The character set used to encode URLs with. The default is all english language lowercase letters, uppercase letters and numerals.
+
+*MYURLS_DEFAULT_REDIRECT = '301'*
+Default redirect to use for short URLS. 301, 302 and 303 are all valid choices. This default can be overridden when a short url is created and chan be changed by editing the Shorty.redirect_type attribute.
+
+*MYURLS_ALLOW_ALL_SITES*
+If you are using the django.contrib.sites framework, MyURLs can allow short urls to work on just the site linked with the myrl or all of your sites.
+ *True*: Short URLS will work on all sites.
+ *False*: Short URLS will only work on the site linked to the short URL.
+
+*MYURLS_USE_UTM (Google Analytics Integraton)*
+Activates appending UTM (Urchin Tracking Metrics) codes to urls. This allows Google Analytics to better categorize traffic that is referred via MyURLS. When set to True, the following settings should be configured:
+
+ - MYURLS_DEFAULT_UTM_CAMPAIGN
+ - MYURLS_DEFAULT_UTM_MEDIUM
+ - MYURLS_DEFAULT_UTM_SOURCE
+ - MYURLS_DEFAULT_UTM_CONTENT
+
+
+.._deprecated_settings
+
+Deprecated Settings
+===================
+
+None yet

0 comments on commit fd3d06e

Please sign in to comment.