from guardian.compat import include, url, patterns, handler404, handler500
from django.conf import settings
from django.contrib import admin

__all__ = ['handler404', 'handler500']


admin.autodiscover()

urlpatterns = patterns('',
    (r'^admin/', include(admin.site.urls)),
    url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'},
        name='logout'),
    (r'^', include('example_project.posts.urls')),
)

if 'grappelli' in settings.INSTALLED_APPS:
    urlpatterns += patterns('',
        (r'^grappelli/', include('grappelli.urls')),
    )

