Help urls

16 views
Skip to first unread message

Mark Cooper

unread,
Mar 9, 2015, 8:27:33 AM3/9/15
to media...@googlegroups.com
After updating to Spring 2015 (Onomy) release, I get a 404 error when trying to follow the Help links (before and after login). Has something gone missing from urlpatterns = in urls.py? Or maybe I've failed to configure something somewhere? Thanks for any help you can offer. 

Page not found (404)

Request Method:GET
Request URL:http://mediathread.cas.sc.edu/help/

Using the URLconf defined in mediathread.urls, Django tried these URL patterns, in this order:

  1. ^$
  2. ^accounts/logout/$
  3. ^accounts/logout/$
  4. ^admin/
  5. ^password/change/$ [name='password_change']
  6. ^password/change/done/$ [name='password_change_done']
  7. ^password/reset/$ [name='password_reset']
  8. ^password/reset/done/$ [name='password_reset_done']
  9. ^password/reset/complete/$ [name='password_reset_complete']
  10. ^password/reset/confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$ [name='password_reset_confirm']
  11. ^accounts/register/$ [name='registration_register']
  12. ^accounts/
  13. ^api/asset/user/(?P<record_owner_name>\w[^/]*)/$ [name='assets-by-user']
  14. ^api/asset/(?P<asset_id>\d+)/$ [name='asset-detail']
  15. ^api/asset/$ [name='assets-by-course']
  16. ^api/user/courses$ [name='api-user-courses']
  17. ^api/tag/$
  18. ^api/project/user/(?P<record_owner_name>\w[^/]*)/$ [name='project-by-user']
  19. ^api/project/(?P<project_id>\d+)/$ [name='asset-detail']
  20. ^api/project/$
  21. ^api
  22. ^asset/
  23. ^accounts/
  24. ^bookmarklets/(?P<path>analyze.js)$ [name='analyze-bookmarklet']
  25. ^nocache/\w+/bookmarklets/(?P<path>analyze.js)$ [name='nocache-analyze-bookmarklet']
  26. ^comments/
  27. ^contact/success/$
  28. ^contact/$
  29. ^course/request/success/$
  30. ^course/request/
  31. ^accounts/logged_in.js$ [name='is_logged_in.js']
  32. ^nocache/\w+/accounts/logged_in.js$ [name='nocache-is_logged_in.js']
  33. ^crossdomain.xml$
  34. ^dashboard/migrate/materials/(?P<course_id>\d+)/$ [name='dashboard-migrate-materials']
  35. ^dashboard/migrate/$ [name='dashboard-migrate']
  36. ^dashboard/sources/ [name='class-manage-sources']
  37. ^dashboard/settings/ [name='course-settings']
  38. ^discussion/
  39. ^explore/redirect/$ [name='source_redirect']
  40. ^impersonate/
  41. ^jsi18n
  42. ^media/(?P<path>.*)$
  43. ^project/
  44. ^reports/
  45. ^save/$ [name='asset-save']
  46. ^setting/(?P<user_name>\w[^/]*)/$
  47. ^stats/
  48. ^smoketest/
  49. ^taxonomy/
  50. ^upgrade/
  51. ^s/
  52. ^__debug__/

The current URL, help/, didn't match any of these.

Susan Dreher

unread,
Mar 9, 2015, 9:15:24 AM3/9/15
to media...@googlegroups.com
Hi Mark - 

Help and About are configured via the django FlatPages app in order to allow instances to create customized help content. 


To setup a flat page, navigate to the Mediathread /admin/ area, Flatpages, Create. Url should be /help/, select the site for your domain and add your help content. (If you haven't already done so, in the Sites admin area, rename "example.com" to "your domain". 

Our help documentation tailored for the Columbia community and our in-house video upload system is here: http://support.ccnmtl.columbia.edu/knowledgebase/topics/6593

And, Nate Autune helpfully added this a few months ago, "Thanks to Rebecca Darling from Wellesley College, who graciously gave
permission to re-publish her "Mediathread Guide for Students" under a
Creative Commons license. Here is a link to where you can download it:
http://bit.ly/MediathreadStudentsGuide"

Cheers,
Susan


--
You received this message because you are subscribed to the Google Groups "Mediathread" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mediathread+unsubscribe@googlegroups.com.
To post to this group, send email to media...@googlegroups.com.
Visit this group at http://groups.google.com/group/mediathread.
For more options, visit https://groups.google.com/d/optout.

Mark Cooper

unread,
Mar 9, 2015, 10:42:59 AM3/9/15
to media...@googlegroups.com
Hi Susan,

Thanks, I see how it should work now.  (Since "About" on the login page took me to http://ccnmtl.columbia.edu/our_services/tools/mediathread/ I guess I expected "help" to do something similar by default.)

But I still can't seem to make this work. I created /help/ in admin as indicated, but I still get the 404 error. Same goes for help/knowledge base after login  Suggestions? 

Thanks,
Mark 

To unsubscribe from this group and stop receiving emails from it, send an email to mediathread...@googlegroups.com.

Susan Dreher

unread,
Mar 9, 2015, 10:46:03 AM3/9/15
to media...@googlegroups.com
Hi Mark - 

This might possibly related to the Site configuration. Do you have that configured? (Available via /admin/ - Site)

s. 

Mark Cooper

unread,
Mar 9, 2015, 10:58:08 AM3/9/15
to media...@googlegroups.com
Susan,

Well that’s a thrill. I had added my domain but had not deleted “example.com” After deleting that, and making sure mediathread.cas.sc.edu was there, I no longer have any access to the site! 

Request Method: GET

...
Traceback:
File "/var/www/mediathread/ve/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  112.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/var/www/mediathread/ve/lib/python2.7/site-packages/django/views/decorators/debug.py" in sensitive_post_parameters_wrapper
  75.             return view(request, *args, **kwargs)
File "/var/www/mediathread/ve/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  99.                     response = view_func(request, *args, **kwargs)
File "/var/www/mediathread/ve/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  52.         response = view_func(request, *args, **kwargs)
File "/var/www/mediathread/ve/lib/python2.7/site-packages/django/contrib/auth/views.py" in login
  49.     current_site = get_current_site(request)
File "/var/www/mediathread/ve/lib/python2.7/site-packages/django/contrib/sites/models.py" in get_current_site
  103.         current_site = Site.objects.get_current()
File "/var/www/mediathread/ve/lib/python2.7/site-packages/django/contrib/sites/models.py" in get_current
  47.             current_site = self.get(pk=sid)
File "/var/www/mediathread/ve/lib/python2.7/site-packages/django/db/models/manager.py" in get
  151.         return self.get_queryset().get(*args, **kwargs)
File "/var/www/mediathread/ve/lib/python2.7/site-packages/django/db/models/query.py" in get
  310.                 self.model._meta.object_name)

Exception Type: DoesNotExist at /accounts/login/
Exception Value: Site matching query does not exist.

Mark 

You received this message because you are subscribed to a topic in the Google Groups "Mediathread" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mediathread/RFlDMVcFxBE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mediathread...@googlegroups.com.

Susan Dreher

unread,
Mar 9, 2015, 11:04:16 AM3/9/15
to media...@googlegroups.com
Hi Mark - 

This is a common issue. SITE_ID is specified in settings_shared.py, and defaults to SITE_ID=1 # example.com. I normally just rename example.com to the correct domain to keep the magic "1" id. In your case, just override SITE_ID in your local_settings.py with the mediathread.cas.sc.edu site object id.

Mark Cooper

unread,
Mar 9, 2015, 11:16:48 AM3/9/15
to media...@googlegroups.com
Hi Susan,

I think I follow. This object id should be an integer, correct, that was assigned in the database at the time I added a site via admin? How do I find out what it is? Trial and error? 

Also maybe you can address best practices about local_settings? Is this depreciated in favor of deploy_specific? (Which I have configured.) 

Thanks! 

Mark 

Susan Dreher

unread,
Mar 9, 2015, 11:30:37 AM3/9/15
to media...@googlegroups.com
Hi Mark - 

The site id will be set to the Site object's database id. The id can be found through the database with a "select * from django_site" query or through the admin by navigating to /admin/sites/, clicking on your site object and viewing the url bar. The number in the url is the object's database id, e.g. for /admin/sites/site/2/, the site_id is 2.

Good point on deploy_specific. I would probably choose deploy_specific/settings.py over local_settings.py in this case. In our shop, local_settings.py is used for very specific and secret configuration information, e.g. the Django secret key.

s.

To unsubscribe from this group and stop receiving emails from it, send an email to mediathread+unsubscribe@googlegroups.com.
To post to this group, send email to mediathread@googlegroups.com.

-- 
You received this message because you are subscribed to a topic in the Google Groups "Mediathread" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mediathread/RFlDMVcFxBE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mediathread+unsubscribe@googlegroups.com.

To post to this group, send email to mediathread@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Mediathread" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mediathread+unsubscribe@googlegroups.com.

To post to this group, send email to media...@googlegroups.com.
Visit this group at http://groups.google.com/group/mediathread.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Mediathread" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mediathread/RFlDMVcFxBE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mediathread+unsubscribe@googlegroups.com.

To post to this group, send email to media...@googlegroups.com.
Visit this group at http://groups.google.com/group/mediathread.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Mediathread" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mediathread+unsubscribe@googlegroups.com.

Mark Cooper

unread,
Mar 9, 2015, 2:33:59 PM3/9/15
to media...@googlegroups.com
Thanks, Susan. This all worked out. For the benefit of the thread: I could not succeed with SITE_ID in deploy_specific/settings, but I could make it work by adding the line to either local_settings or changing it in settings_shared. — Mark 

To unsubscribe from this group and all its topics, send an email to mediathread...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages