Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
Die, weird docstrings!
Browse files Browse the repository at this point in the history
  • Loading branch information
erikrose committed Jun 18, 2010
1 parent 1e0ee6b commit 0856843
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
16 changes: 4 additions & 12 deletions apps/forums/views.py
Expand Up @@ -21,9 +21,7 @@


def forums(request):
"""
View all the forums.
"""
"""View all the forums."""

forums_ = paginate(request, Forum.objects.all())

Expand All @@ -48,9 +46,7 @@ def sort_threads(threads_, sort=0, desc=0):


def threads(request, forum_slug):
"""
View all the threads in a forum.
"""
"""View all the threads in a forum."""

forum = get_object_or_404(Forum, slug=forum_slug)

Expand Down Expand Up @@ -79,9 +75,7 @@ def threads(request, forum_slug):


def posts(request, forum_slug, thread_id, form=None):
"""
View all the posts in a thread.
"""
"""View all the posts in a thread."""

forum = get_object_or_404(Forum, slug=forum_slug)
thread = get_object_or_404(Thread, pk=thread_id, forum=forum)
Expand All @@ -104,9 +98,7 @@ def posts(request, forum_slug, thread_id, form=None):

@login_required
def reply(request, forum_slug, thread_id):
"""
Reply to a thread.
"""
"""Reply to a thread."""
form = ReplyForm(request.POST)

if form.is_valid():
Expand Down
12 changes: 3 additions & 9 deletions apps/notifications/__init__.py
Expand Up @@ -5,9 +5,7 @@


def create_watch(kls, id, email):
"""
Start watching an object. If already watching, returns False.
"""
"""Start watching an object. If already watching, returns False."""

# Check that this object exists, or raise DNE.
kls.objects.get(pk=id)
Expand All @@ -22,9 +20,7 @@ def create_watch(kls, id, email):


def check_watch(kls, id, email):
"""
Check whether an email address is watching an object.
"""
"""Check whether an email address is watching an object."""

ct = ContentType.objects.get_for_model(kls)

Expand All @@ -36,9 +32,7 @@ def check_watch(kls, id, email):


def destroy_watch(kls, id, email):
"""
Destroy a watch on an object. If watch does not exist, return False.
"""
"""Destroy a watch on an object. If watch does not exist, return False."""

ct = ContentType.objects.get_for_model(kls)

Expand Down

0 comments on commit 0856843

Please sign in to comment.