urls.py 1017 B

123456789101112131415161718192021222324252627
  1. from django.conf import settings
  2. from django.conf.urls import patterns, include, url
  3. from django.contrib import admin
  4. admin.autodiscover()
  5. urlpatterns = patterns('',
  6. url(r'^', include('misago.urls')),
  7. # Uncomment next line if you plan to use Django admin for 3rd party apps
  8. #url(r'^django-admin/', include(admin.site.urls)),
  9. )
  10. # Serve static and media files in development
  11. from django.conf.urls.static import static
  12. urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
  13. urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  14. # Error Handlers
  15. # Misago needs those handlers to deal with errors raised by it's middlewares
  16. # If you replace those handlers with custom ones, make sure you decorate them
  17. # functions with shared_403_exception_handler or shared_404_exception_handler
  18. # decorators that are defined in misago.views.errorpages module!
  19. handler403 = 'misago.views.errorpages.permission_denied'
  20. handler404 = 'misago.views.errorpages.page_not_found'