Exemple #1
0
    url(r'^logout/', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='timtec_logout'),

    url(r'^profile/edit/?$', ProfileEditView.as_view(), name="profile_edit"),
    url(r'^profile/(?P<username>[\w.+-]+)?/?$', ProfileView.as_view(), name="profile"),

    # The django-allauth
    url(r'^accounts/', include('allauth.urls')),
    url(r'^api/user_search/?$', UserSearchView.as_view(), name='user_search'),
    url(r'^api/student_search/?$', StudentSearchView.as_view(), name='student_search'),

    url(r'^pages(?P<url>.*)$', FlatpageView.as_view(), name='flatpage'),

    # The django-rosetta
    url(r'^rosetta/', include('rosetta.urls')),

    url(r'^markdown/', include('django_markdown.urls')),

)

if settings.TWITTER_USER != '':
    from core.views import TwitterApi

    urlpatterns += (url(r'^api/twitter/?$', TwitterApi.as_view(), name='twitter'),)


if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

if 'ifs' in settings.INSTALLED_APPS:
    urlpatterns += (url(r'^ifs/', include('ifs.urls')),)
Exemple #2
0
    url(r'^pages(?P<url>.*)$', FlatpageView.as_view(), name='flatpage'),

    # The django-rosetta
    url(r'^rosetta/', include('rosetta.urls')),
    url(r'^markdown/', include('django_markdown.urls')),
    url(r'^djangular.js',
        TemplateView.as_view(template_name='djangular.js',
                             content_type='text/javascript'),
        name='djangular'),
)

if settings.TWITTER_USER != '':
    from core.views import TwitterApi

    urlpatterns += (url(r'^api/twitter/?$',
                        TwitterApi.as_view(),
                        name='twitter'), )

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)

    from django.views import defaults as default_views

    # This allows the error pages to be debugged during development, just visit
    # these url in browser to see how these error pages look like.
    urlpatterns += [
        url(r'^400/$', default_views.bad_request),
        url(r'^403/$', default_views.permission_denied),
        url(r'^404/$', default_views.page_not_found),
        url(r'^500/$', default_views.server_error),
Exemple #3
0
    # The django-rosetta
    url(r'^rosetta/', include('rosetta.urls')),

    url(r'^markdown/', include('django_markdown.urls')),

    url(r'^djangular.js',
        TemplateView.as_view(template_name='djangular.js', content_type='text/javascript'),
        name='djangular'),
    url(r'messages', login_required(TemplateView.as_view(template_name='user_messages.html')), name='user_all_messages'),

)

if settings.TWITTER_USER != '':
    from core.views import TwitterApi

    urlpatterns += (url(r'^api/twitter/?$', TwitterApi.as_view(), name='twitter'),)


if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

    from django.views import defaults as default_views

    # This allows the error pages to be debugged during development, just visit
    # these url in browser to see how these error pages look like.
    urlpatterns += [
        url(r'^400/?$', default_views.bad_request),
        url(r'^403/?$', default_views.permission_denied),
        url(r'^404/?$', default_views.page_not_found),
        url(r'^500/?$', default_views.server_error),
    ]