Esempio n. 1
0
from misc.views import LoginEmailView
from speakers.views import ExportAcceptedSpeakerEmailView

WIKI_SLUG = r"(([\w-]{2,})(/[\w-]{2,})*)"

urlpatterns = [
    url(r"^admin/", include(admin.site.urls)),
    url(r"^$",
        TemplateView.as_view(template_name="homepage.html"),
        name="home"),
    url(r"^account/signup/$", SignupView.as_view(), name="account_signup"),
    url(r"^account/login/$", LoginEmailView.as_view(), name="account_login"),
    url(r"^account/", include("account.urls")),
    url(r"^dashboard/", symposion.views.dashboard, name="dashboard"),
    url(r"^speaker/export/$",
        staff_member_required(ExportAcceptedSpeakerEmailView.as_view()),
        name="speaker_email_export"),
    url(r"^speaker/", include("symposion.speakers.urls")),
    url(r"^proposals/", include("symposion.proposals.urls")),
    url(r"^sponsors/", include("symposion.sponsorship.urls")),
    url(r"^teams/", include("symposion.teams.urls")),
    url(r"^reviews/", include("symposion.reviews.urls")),
    url(r"^schedule/", include("symposion.schedule.urls")),
    url("^markdown/", include("django_markdown.urls")),
    url(r"^markitup/", include("markitup.urls")),
]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
markdown_flatpages.register()
Esempio n. 2
0
    https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin
from django_markdown import flatpages
from . import settings
admin.autodiscover()
flatpages.register()

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'', include('verse.urls')),
    url(r'^markdown/', include('django_markdown.urls')),
    url(r'^pages/', include('django.contrib.flatpages.urls')),
    url(r'^accounts/', include('allauth.urls')),
]

if settings.DEBUG:
    from django.conf.urls.static import static
    urlpatterns += static(settings.STATIC_URL, document_root =settings.STATIC_ROOT)
Esempio n. 3
0
from activities.views import AnswerViewSet
from forum.views import (CourseForumView, QuestionView, QuestionCreateView,
                         QuestionViewSet, QuestionVoteViewSet,
                         AnswerVoteViewSet, AnswerViewSet as
                         ForumAnswerViewSet)
from course_material.views import CourseMaterialView, FileUploadView, CourseMaterialViewSet, CourseMaterialFileViewSet
from notes.views import NotesViewSet, CourseNotesView, UserNotesView
from reports.views import UserCourseStats, CourseStatsByLessonViewSet, UserCourseLessonsStats
from rest_framework import routers
from django_markdown import flatpages

# Uncomment the next two lines to enable the admin:
from django.contrib import admin as django_admin
django_admin.autodiscover()

flatpages.register()

router = routers.DefaultRouter(trailing_slash=False)
router.register(r'user', TimtecUserViewSet, base_name='user')
router.register(r'profile', ProfileViewSet, base_name='profile')
router.register(r'user_admin', TimtecUserAdminViewSet, base_name='user_admin')
router.register(r'course', CourseViewSet, base_name='course')
router.register(r'course_carousel',
                CarouselCourseView,
                base_name='course_carousel')
router.register(r'course_professor',
                CourseProfessorViewSet,
                base_name='course_professor')
router.register(r'course_professor_picture',
                CoursePictureUploadViewSet,
                base_name='course_professor_picture')