Permalink
Browse files

docstrings

  • Loading branch information...
1 parent 21782b1 commit b1f54f944d72c41870c8c1cd135ca2e4087946b3 Dave McLain committed Aug 29, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 project_template/urls/utils.py
@@ -3,6 +3,15 @@
from django.core.urlresolvers import reverse
def get_url_for_model(obj):
+ """ The get_url_for_model function is necessary because Armstrong has no
+ preconceptions about what your url schema actually looks like.
+ get_url_for_model is called whenever a BaseContent subclass has it's
+ get_absolute_url function calle_url_for_model is called whenever a
+ BaseContent subclass has it's get_absolute_url function called.
+
+ In the future we will most likely provide base urls for each app that will
+ allow new Armstrong implementations to not use this mechanism.
+ """
if obj.__class__ == Section:
return reverse('section_view', kwargs={'full_slug': obj.full_slug})
if obj.__class__ == Article:

0 comments on commit b1f54f9

Please sign in to comment.