Ejemplo n.º 1
0
Archivo: unit.py Proyecto: jlhg/djskgen
    def test_when_analytics_is_set_then_render_with_analytics(self):
        ga_id = 'google-analytics-id'
        request = RequestFactory().get('/')

        with mock.patch.object(settings, 'GOOGLE_ANALYTICS_ID', ga_id):
            response = IndexView(request=request).get(request)

        response.render()
        self.assertIn(ga_id, response.rendered_content)
Ejemplo n.º 2
0
"""AnimeTracker URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from app.views import AddAnimeView, UpdateAnimeView, IndexView, DeleteAnimeView, DownloadAnimeView
from django.views.generic import RedirectView
from django.urls import re_path, include

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', IndexView.as_view()),
    path('add', AddAnimeView.as_view()),
    path('add/', RedirectView.as_view(url='/add')),
    path('update/<int:anime_id>/', UpdateAnimeView.as_view()),
    path('delete/<int:anime_id>/', DeleteAnimeView.as_view()),
    path('download', DownloadAnimeView.as_view()),
]
Ejemplo n.º 3
0
    https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
from django.urls import path

from app.views import IndexView, RegisterView

urlpatterns = [
    path('admin/', admin.site.urls),
    url(r'^$', IndexView.as_view(), name='app_index'),
    url('register', RegisterView.as_view(), name='app_register'),
]

from . import settings
from django.contrib.staticfiles.urls import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Ejemplo n.º 4
0
from django.conf.urls import url
from django.contrib import admin
from django.urls import path, include, re_path

from app.views import IndexView, ListMoviesView, LoginView, LogoutView, SignUpView, DetailMovieView, SearchFormView

urlpatterns = [
    path('i18n/', include('django.conf.urls.i18n')),
    path('admin/', admin.site.urls),
    path('', IndexView.as_view(), name='index_view'),
    path('movies/', ListMoviesView.as_view(), name='list_movies_view'),
    re_path('^movies/letter/(?P<letter>\D+)',
            ListMoviesView.as_view(),
            name='list_movies_view'),
    path('movies/<int:pk>',
         DetailMovieView.as_view(),
         name='detail_movie_view'),
    path('login/', LoginView.as_view(), name='login_view'),
    path('logout/', LogoutView.as_view(), name='logout_view'),
    path('signup/', SignUpView.as_view(), name='signup_view'),
    path('search/', SearchFormView.as_view(), name='search_form_view'),
]
Ejemplo n.º 5
0
"""movi URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.9/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. Import the include() function: from django.conf.urls import url, include
    3. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import url
from django.contrib import admin

from . import settings

from app.views import IndexView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', IndexView.as_view()),
    url(r'^static/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': settings.STATIC_ROOT}),
]
Ejemplo n.º 6
0
from django.conf.urls import patterns, include, url
from app.views import IndexView, ResultsView

urlpatterns = [url(r"^$", IndexView.as_view(), name="index"), url(r"^results/$", ResultsView.as_view(), name="results")]
Ejemplo n.º 7
0
"""config URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include

# first party
from app.views import IndexView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/', IndexView.as_view()),
    path('api-auth', include('rest_framework.urls')),
]
Ejemplo n.º 8
0
from django.conf.urls import url

from app.views import IndexView
from app.views.crosswalk import CrosswalkListView
from app.views.institution import InstitutionListView, InstitutionDetailView, InstitutionCompletionListView, \
    InstitutionTuitionListView

from app.views.tuition import TuitionListView, TuitionDetailView

urlpatterns = [
    url(r'^api/crosswalk$', CrosswalkListView.as_view(),
        name='crosswalk_list'),
    url(r'^api/institution$',
        InstitutionListView.as_view(),
        name='institution_list'),
    url(r'^api/institution/(?P<unitid>[0-9]+)$',
        InstitutionDetailView.as_view(),
        name='institution_detail'),
    url(r'^api/institution/(?P<unitid>[0-9]+)/completions$',
        InstitutionCompletionListView.as_view(),
        name='institution_completions_list'),
    url(r'^api/institution/(?P<unitid>[0-9]+)/tuition$',
        InstitutionTuitionListView.as_view(),
        name='institution_tuition_list'),
    url(r'^api/tuition$', TuitionListView.as_view(), name='tuition_list'),
    url(r'^api/tuition/(?P<pk>[0-9]+)$',
        TuitionDetailView.as_view(),
        name='tuition_list'),
    url(r'^$', IndexView.as_view(), name='index_view')
]
Ejemplo n.º 9
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from app.views import LoginView, RegisterView, IndexView, SuccessView

urlpatterns = patterns(
    '',
    url(r'^$', IndexView.as_view(), name='inicio'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^info/$', 'app.views.FormularioView', name='datos_personales'),
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^register/$', RegisterView.as_view(), name='register'),
    url(r'^success/$', SuccessView.as_view(), name='success'),
)
Ejemplo n.º 10
0
from __future__ import unicode_literals

from django.conf.urls import include, url
from django.contrib import admin
from django.conf import settings

from rest_framework import routers

from app.views import IndexView

router = routers.DefaultRouter(trailing_slash=False)

urlpatterns = [
    url(settings.ADMIN_URL, admin.site.urls),
    url(r'^api/(?P<version>v[0-9]+)/', include(router.urls)),
    url(r'', include('app.users.urls', namespace='users')),
    url(r'^.*$', IndexView.as_view(), name='page-index'),
]

if settings.DEBUG:
    from django.conf.urls.static import static
    from django.contrib.staticfiles.urls import staticfiles_urlpatterns

    # Serve static and media files from development server
    urlpatterns += staticfiles_urlpatterns()
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Ejemplo n.º 11
0
api_urlpatterns = [
    url(r'^login', obtain_jwt_token, name='users-api-login'),
    url(r'^token-refresh', refresh_jwt_token, name='users-api-token_refresh'),
    url(r'^token-verify', verify_jwt_token, name='users-api-token-verify'),
    url(r'^register$',
        views.RegistrationView.as_view(),
        name='users-api-register'),
    url(r'^me$', views.UserView.as_view(), name='users-api-me'),
    url(r'^activate$',
        views.ActivationView.as_view(),
        name='users-api-activate'),
    url(r'^password/reset$',
        views.PasswordResetView.as_view(),
        name='users-api-password-reset'),
    url(r'^password/reset/confirm$',
        views.PasswordResetConfirmView.as_view(),
        name='users-api-password-reset-confirm'),
]

urlpatterns = [
    url(r'^login$', IndexView.as_view(), name='users-login'),
    url(r'^register$', IndexView.as_view(), name='users-register'),
    url(r'^activate/(?P<uid>[\w.-]+)/(?P<token>[\w.-]+)',
        TemplateView.as_view(template_name='users/activate.html'),
        name='users-activate'),
    url(r'^password/reset/confirm/(?P<uid>[\w.-]+)/(?P<token>[\w.-]+)',
        TemplateView.as_view(template_name='users/password_reset.html'),
        name='users-password-reset'),
    url(r'^api/(?P<version>v[0-9]+)/', include(api_urlpatterns)),
]
Ejemplo n.º 12
0
"""happydeploy URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from app.views import IndexView, TimestampListCreateAPIView
urlpatterns = [
    path('admin/', admin.site.urls),
    path("", IndexView.as_view()),
    path('auth/', include('djoser.urls')),
    path('auth/', include('djoser.urls.authtoken')),
    path('timestamps/', TimestampListCreateAPIView.as_view())
]
Ejemplo n.º 13
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from app.views import LoginView,RegisterView,IndexView,SuccessView

urlpatterns = patterns('',

    url(r'^$', IndexView.as_view(), name='inicio'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^info/$', 'app.views.FormularioView', name='datos_personales'),
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^register/$', RegisterView.as_view(), name='register'),
    url(r'^success/$', SuccessView.as_view(), name='success'),
)
Ejemplo n.º 14
0
from simditor.views import upload_handler


class ImageUploadView(generic.View):
    """ImageUploadView."""

    http_method_names = ['post']

    def post(self, request, **kwargs):
        """Post."""
        return upload_handler(request)


# pylint disable=C0103
urlpatterns = [
    url(r'^$', IndexView.as_view(), name='simditor-form'),
    url(r'^admin/', admin.site.urls),
    url(r'^simditor/upload', csrf_exempt(ImageUploadView.as_view())),
]

urlpatterns += static(
    settings.STATIC_URL,
    document_root=settings.STATIC_ROOT
)

urlpatterns += static(
    settings.MEDIA_URL,
    document_root=settings.MEDIA_ROOT
)
Ejemplo n.º 15
0
from django.urls import path

from app.views import IndexView, UrlView, UrlWithoutRedisView

urlpatterns = [
    path('index/', IndexView.as_view()),
    path('shorten/', UrlView.as_view()),
    path('shorten/<pk>/', UrlView.as_view(), name='detail'),
    path('detail_without_redis/<pk>',
         UrlWithoutRedisView.as_view(),
         name='detail_without_redis'),
]
Ejemplo n.º 16
0
from django.urls import path

from app import views
from app.views import IndexView, DetailView

app_name = "app"  # htmlからURLを生成する時に使う名前空間

urlpatterns = [
    # 書籍
    path("books/", IndexView.as_view(), name="book_list"),  # 一覧
    # path("books/", views.book_list, name="book_list"),  # 一覧
    path("books/detail/<int:pk>/", DetailView.as_view(),
         name="book_detail"),  # 詳細
    path("books/add/", views.book_edit, name="book_add"),  # 登録
    path("books/mod/<int:book_id>/", views.book_edit, name="book_edit"),  # 修正
    path("books/del/<int:book_id>/", views.book_del, name="book_del"),  # 削除
    # other
    path("other", views.other, name="other"),
]
Ejemplo n.º 17
0
# register template filters

app.jinja_env.filters['get_section'] = get_section

app.jinja_env.filters['data_format_friendly'] = date_format_friendly

app.jinja_env.filters['date_simple'] = date_simple

app.jinja_env.filters['thumb_url'] = thumb_url

# end register template filters

# register app components

IndexView.register(app)

UserView.register(app)

SearchView.register(app)

PricingView.register(app)

LightboxesView.register(app)

ImageDetailsView.register(app)

OrderView.register(app)

LightboxView.register(app)
Ejemplo n.º 18
0
"""DjangoProjects URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/dev/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
from django.urls import path

from app.views import IndexView, RecipeListView, RecipeDetailView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('recipes/<int:pk>', RecipeDetailView.as_view(),
         name="recipes_detail"),
    url('recipes', RecipeListView.as_view(), name="recipes_list"),
    url('', IndexView.as_view(), name="index"),
]
Ejemplo n.º 19
0
"""draftcast URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/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. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin

from app.views import IndexView, RoundView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', IndexView.as_view(), name="index_view"),
    url(r'^round/(?P<pk>\d+)/$', RoundView.as_view(), name='round_view')
]
Ejemplo n.º 20
0
"""sample URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from app.views import IndexView


urlpatterns = [
    path('admin/', admin.site.urls),
    path('react-index/', IndexView.as_view())
]
Ejemplo n.º 21
0
"""movieapi URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.9/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. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
from app.views import MovieListAPIView, ReviewListAPIView, RaterListAPIView, MovieDetailAPIView, ReviewDetailAPIView, RaterDetailAPIView, IndexView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', IndexView.as_view(), name='index_view'),
    url(r'^movies/$', MovieListAPIView.as_view(), name="movie_list_api_view"),
    url(r'^movies/(?P<pk>\d+)/$', MovieDetailAPIView.as_view(), name="movie_detail_api_view"),
    url(r'^reviews/$', ReviewListAPIView.as_view(), name="review_list_api_view"),
    url(r'^reviews/(?P<pk>\d+)/$', ReviewDetailAPIView.as_view(), name="review_detail_api_view"),
    url(r'^raters/$', RaterListAPIView.as_view(), name="rater_list_api_view"),
    url(r'^raters/(?P<pk>\d+)/$', RaterDetailAPIView.as_view(), name="rater_detail_api_view")

]
Ejemplo n.º 22
0
from django.conf.urls import patterns, include, url
from app.views import IndexView
import settings

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

urlpatterns = patterns(
    '',
    # Examples:
    # url(r'^$', 'haterest.views.home', name='home'),
    # url(r'^haterest/', include('haterest.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # url(r'^admin/', include(admin.site.urls)),
    url(r"^$", IndexView.as_view()))

if settings.DEBUG:
    urlpatterns += patterns(
        '',
        (r'^media/(?P<path>.*)$', 'django.views.static.serve', {
            'document_root': settings.MEDIA_ROOT,
            'show_indexes': True
        }),
    )
Ejemplo n.º 23
0
from django.conf import settings
from app.models import InstagramUser
from django.views.generic import ListView
from django.conf.urls import patterns, url, include
from app.views import IndexView, RegisterView, LoginView, LogoutView, AccountView, AccountSearch, PostView, fun

urlpatterns = patterns('',
    (r'^/?$', IndexView.as_view()),
    (r'^register/?$', RegisterView.as_view()),
    (r'^login/?$', LoginView.as_view()),
    (r'^logout/?$', LogoutView.as_view()),
    (r'^posts/view/(?P<pk>[-_\w]+)/?$', PostView.as_view()),
    (r'^accounts/(?P<slug>[-_\w]+)/?$', AccountView.as_view()),
    (r'^search/(?P<query>\w+)/$', AccountSearch.as_view()),
    (r'^search/$', AccountSearch.as_view()),
    (r'^s3cret/$', fun)
)

if settings.DEBUG:
    urlpatterns += patterns('',
        url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
            'document_root': settings.MEDIA_ROOT
        }),
    )


Ejemplo n.º 24
0
Archivo: unit.py Proyecto: jlhg/djskgen
    def test_that_it_returns_ok_status_on_get(self):
        request = RequestFactory().get('/')

        response = IndexView(request=request).get(request)

        self.assertEqual(response.status_code, 200)
Ejemplo n.º 25
0
from django.contrib import admin
from django.urls import path
from app.views import IndexView

urlpatterns = [path('', IndexView.as_view())]
Ejemplo n.º 26
0
                       TaskAjaxDetail, TaskAjaxList, TaskDelete, TaskDetail,
                       ViewProfile, ajax_stats, login_user, logout_user,
                       reset_token, total_tasks)
from django.conf.urls import include, url
from django.contrib import admin
from rest_framework import routers

router = routers.DefaultRouter()
router.register(r'tasks', TaskViewSet, 'Task')
router.register(r'projects', ProjectViewSet, 'Project')
router.register(r'task_types', TaskTypeViewSet, 'TaskType')

admin.autodiscover()

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='root'),

    url(r'^login/$',
        login_user, name='login'),
    url(r'^logout/$',
        logout_user, name='logout'),

    url(r'^captcha/', include('captcha.urls')),

    url(r'^change_password/$',
        'django.contrib.auth.views.password_change',
        {'post_change_redirect': '/',
         'template_name': 'password_change.html'},
        name="password_change"),

    url(r'^project/(?P<pk>\d+)/$',
Ejemplo n.º 27
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from app.views import (IndexView, LoginView, PaymentFormView, PaymentListView,
    PaymentDetailView, DashboardListView, EditUserView)

urlpatterns = patterns('',
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'),
    
    url(r'^$', IndexView.as_view(), name='home'),
    url(r'^profile/$', EditUserView.as_view(), name='profile'),
    url(r'^dashboard/$', DashboardListView.as_view(), name='dashboard'),
    url(r'^payment/$', PaymentFormView.as_view(), name='payment'),
    url(r'^payments/$', PaymentListView.as_view(), name='payments'),
    url(r'^payment/(?P<merchant_id>\w+)$', PaymentDetailView.as_view(), name='payment_detail'),
    
    # Examples:
    # url(r'^$', 'django_gateway.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/', include(admin.site.urls)),
)
Ejemplo n.º 28
0
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path

from app import views

from app.views import IndexView, GenerateCharacterView, CharacterDetailView, \
    SignUpView, LogInView, PlayGameView, \
    DropItem, EnemyList, ChangeItem, UseItem, PlayRound, NextEnemyView, LogoutView, end

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', IndexView.as_view(), name='home'),
]  # Admin & Home URL

urlpatterns += [
    path('signUp/', SignUpView.as_view(), name='signUp'),
    path('logIn/', LogInView.as_view(), name='logIn'),
    path('logOut/', LogoutView.as_view(), name='logOut'),
]  # Log system URL

urlpatterns += [
    path('playGame/<int:pk>', PlayGameView.as_view(), name='playGame'),
]  # Game URL

urlpatterns += [
    path('playRound/<int:pkParty>/<int:pkEnemy>',
         PlayRound.as_view(),
Ejemplo n.º 29
0
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 channels import route
from django.conf.urls import include, url
from django.contrib import admin

from app.views import IndexView
from channels_example.app.consumers import ws_message, ws_add, ws_disconnect

urlpatterns = [
    url(r'^$', IndexView.as_view()),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^accounts/', include('django.contrib.auth.urls')),

]

channel_routing = [
    route("websocket.receive", ws_message),
    route("websocket.connect", ws_add),
    route("websocket.disconnect", ws_disconnect),
]
Ejemplo n.º 30
0
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
# from django.contrib import admin
from app.views import D3PlanetView, D3ModelCameraView, D3CubePuzzleView, D3PixelGraphView
from app.views import D3LineAvatarView, D3BookFlipView, D3WaveView, D3ExplodClockView
from app.views import D3HeartAnimationView, D3ImagesView, D3ImageBlockView
from app.views import D3UnfoldCube01View, D3UnfoldCube02View, IndexView
from app.views import LandingView, APlayerView

from django.views.static import serve
from D3Cool.settings import STATIC_ROOT

urlpatterns = [
    # url(r'^admin/', admin.site.urls),
    url('^$', IndexView.as_view(), name='index'),
    url('^D3Planet.html$', D3PlanetView.as_view(), name='D3Planet'),
    url('^D3ModelCamera.html$',
        D3ModelCameraView.as_view(),
        name='D3ModelCamera'),
    url('^D3CubePuzzle.html$', D3CubePuzzleView.as_view(),
        name='D3CubePuzzle'),
    url('^D3PixelGraph.html$', D3PixelGraphView.as_view(),
        name='D3PixelGraph'),
    url('^D3LineAvatar.html$', D3LineAvatarView.as_view(),
        name='D3LineAvatar'),
    url('^D3BookFlip.html$', D3BookFlipView.as_view(), name='D3BookFlip'),
    url('^D3Wave.html$', D3WaveView.as_view(), name='D3Wave'),
    url('^D3HeartAnimation.html$',
        D3HeartAnimationView.as_view(),
        name='D3HeartAnimation'),
Ejemplo n.º 31
0
    # url(r'^web/', include('web.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
    
    url(r'^rest/participants/$',                 ListOrCreateModelView.as_view(resource=ParticipantResource), name='model-resource-root'),
    url(r'^rest/participant/(?P<pk>[0-9]+)/$',   InstanceModelView.as_view(resource=ParticipantResource)),
    url(r'^rest/events/$',                       ListOrCreateModelView.as_view(resource=EventResource), name='model-resource-root'),
    url(r'^rest/event/(?P<pk>[0-9]+)/$',         InstanceModelView.as_view(resource=EventResource)),
    url(r'^rest/groups/$',                       ListOrCreateModelView.as_view(resource=GroupResource), name='model-resource-root'),
    url(r'^rest/group/(?P<pk>[0-9]+)/$',         InstanceModelView.as_view(resource=GroupResource)),
    url(r'^rest/types/$',                        ListOrCreateModelView.as_view(resource=ExpenseTypeResource), name='model-resource-root'),
    url(r'^rest/type/(?P<pk>[0-9]+)/$',          InstanceModelView.as_view(resource=ExpenseTypeResource)),
    url(r'^rest/weights/$',                      ListOrCreateModelView.as_view(resource=WeightResource), name='model-resource-root'),
    url(r'^rest/weight/(?P<pk>[0-9]+)/$',        InstanceModelView.as_view(resource=WeightResource)),
    url(r'^rest/expenses/$',                     ListOrCreateModelView.as_view(resource=ExpenseResource)),
    url(r'^rest/expense/(?P<pk>[0-9]+)/$',       InstanceModelView.as_view(resource=ExpenseResource)),
    url(r'^rest/authenticate$',                  AuthenticationView.as_view()),
    url(r'^rest/add_expense$',                   ExpenseAddView.as_view()),
    url(r'^rest/calculator$',                    CalculatorView.as_view()),
    url(r'^rest/event/(?P<pk>[0-9+])/participants$', EventParticipantsView.as_view()),
    url(r'^rest/event/(?P<pk>[0-9+])/expense_types$', EventExpenseTypesView.as_view()),
    url(r'^$',                                   login_required( IndexView.as_view() )),
    url(r'^login$',                              LoginView.as_view()),
    url(r'^events$',                             login_required( EventsView.as_view() )),
    url(r'^balance$',                            login_required( BalanceView.as_view() )),
)
Ejemplo n.º 32
0
from django.conf.urls import patterns, url, include

from django.contrib import admin

from app.views import IndexView

from rest_framework_nested import routers

from authentication.views import AccountViewSet, LoginView, LogoutView
from posts.views import PostViewSet, AccountPostsViewSet

router = routers.SimpleRouter()
router.register(r'accounts', AccountViewSet)
router.register(r'posts', PostViewSet)
accounts_router = routers.NestedSimpleRouter(
    router, r'accounts', lookup='account'
)
accounts_router.register(r'posts', AccountPostsViewSet)


urlpatterns = patterns(
    '',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^universe/api/v1/', include(router.urls)),
     url(r'^universe/api/v1/', include(accounts_router.urls)),
    url(r'^universe/api/v1/auth/login/$', LoginView.as_view(), name='login'),
    url(r'^universe/api/v1/auth/logout/$', LogoutView.as_view(), name='logout'),
    url('^universe/.*$', IndexView.as_view(), name='index'),
)
Ejemplo n.º 33
0
from django.conf.urls.i18n import i18n_patterns
from django.utils.translation import ugettext_lazy as _

from djangoPress import settings

urlpatterns = [
    path('admin/', admin.site.urls),
    url(
        r'^media/(?P<path>.*)$',
        serve,
        {'document_root': settings.MEDIA_ROOT},
    ),
    url(r'login', LoginView.as_view(), name="login"),
    url(r'register', RegisterView.as_view(), name="register"),
    url(r'logout', auth_views.logout, {'next_page': '/'}, name='logout')
]

urlpatterns += i18n_patterns(
    url(_(r'profile/(?P<pk>\w+)'), ProfileView.as_view(), name='profile'),
    url(_(r'search$'), SearchView.as_view(), name='search'),
    url(_(r'create$'), ArticleCreation.as_view(), name="createArticle"),
    url(_(r'update/(?P<pk>\d+)'),
        ArticleUpdate.as_view(),
        name="updateArticle"),
    url(_(r'delete/(?P<pk>\d+)'),
        ArticleDelete.as_view(),
        name="deleteArticle"),
    url(_(r'^$'), IndexView.as_view(), name="index"),
    url(_(r'(?P<pk>\d+)'), ArticleDetails.as_view(), name="article"),
)
Ejemplo n.º 34
0
from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
from app.views import IndexView, ProtectedView

urlpatterns = patterns('',
    # Examples:
    url(r'^$', IndexView.as_view(), name='home'),
    url(r'^protected/$', ProtectedView.as_view(), name='protected'),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
    url('', include('social.apps.django_app.urls', namespace='social'))
)
Ejemplo n.º 35
0
__author__ = 'havard'

from django.conf.urls.defaults import patterns, url

from app.views import IndexView

urlpatterns = patterns('',
    url(r'^/$', IndexView.as_view()))
Ejemplo n.º 36
0
from django.urls import path
#from django.contrib import admin

from app.views import IndexView as AppView

urlpatterns = [
    path('unit/', AppView.as_view()),
    #path('admin/', admin.site.urls),
]
Ejemplo n.º 37
0
from app.views import LinkListView,SearchView2,tagged_links


urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'djangolinks.views.home', name='home'),
    # url(r'^djangolinks/', include('djangolinks.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
     url(r'^admin/', include(admin.site.urls)),

     url(r'^$', IndexView.as_view(),name="index"),
     url(r'^list/$', LinkListView.as_view(paginate_by=settings.RESULTS_PER_PAGE),name="list"),
     url(r'^favorite/$', login_required(FavoriteListView.as_view(paginate_by=settings.RESULTS_PER_PAGE)),name="favorite"),
     url(r'^detail/([-\w]+)-(?P<pk>\d+)/$',LinkDetailView.as_view(model=Link),name="detail"),
     url(r'^submit/$',LinkCreateView.as_view(model=Link,form_class=LinkSubmitForm,template_name='app/link_submit.html'),name="submit"),

     url(r'^search/$', search_view_factory(
        view_class=SearchView2,
        template='app/link_list.html',
        form_class=LinkSearchForm2,
    ), name='haystack_search'),
 
     url(r'^%s/' % settings.DAJAXICE_MEDIA_PREFIX, include('dajaxice.urls')),
     url(r'^contact/', include('contact_form.urls',namespace='contact_form',app_name='contact_form')),
     url(r'', include('social_auth.urls')),
     url(r'^login/$', TemplateView.as_view(template_name="app/login.html"),name="login"),
Ejemplo n.º 38
0
# -*- encoding: utf-8 -*-
from flask import Flask
#from flask_sqlalchemy import SQLAlchemy
#import config

#db = SQLAlchemy()
from app.flask_app import app
from app.views import IndexView

app.add_url_rule('/index/', view_func=IndexView.as_view('index'))
Ejemplo n.º 39
0
__author__ = 'havard'

from django.conf.urls.defaults import patterns, url

from app.views import IndexView

urlpatterns = patterns('', url(r'^/$', IndexView.as_view()))
Ejemplo n.º 40
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static

from app.views import DataView, StructureDataView,  IndexView


urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'smyt.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', IndexView.as_view(), name='author_add'),
    url(r'^api/structure/', StructureDataView.as_view(),
        name='structure-date-view'),
    url(r'^api/data/', DataView.as_view(), name='date-view'),
) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)