Skip to content
Browse files

Adding 'TODO' to views.py

  • Loading branch information...
1 parent 89b0e08 commit 97dd365ab93b2a1608c688b8582e36a339f29441 @darkwing committed
Showing with 7 additions and 2 deletions.
  1. +7 −2 apps/wiki/views.py
View
9 apps/wiki/views.py
@@ -658,7 +658,11 @@ def new_document(request):
{'is_template': is_template,
'document_form': doc_form,
'revision_form': rev_form})
-
+
+ # DW TODO:
+ # 1. Need to re-validate that the parent doc exists
+ # 2. If so, need the parent_topic's ID so that it can be set for *this* document.
+
post_data = request.POST.copy()
post_data.update({'locale': request.locale})
doc_form = DocumentForm(post_data)
@@ -948,8 +952,9 @@ def autosuggest_documents(request):
searchBy = request.GET.get('searchBy', '')
if searchBy == 'slug':
+ # DW TODO:
# This must be improved; at this point, a full path like "/en-US/docs/en-US/David_Walsh"
- # doesn't provide a valid match :/
+ # doesn't provide a valid match, even though the page exists :/
docs = Document.objects.filter(slug__icontains=term).filter(is_template=0);
else:
docs = Document.objects.filter(title__icontains=term).filter(is_template=0)

0 comments on commit 97dd365

Please sign in to comment.
Something went wrong with that request. Please try again.