import re from django.conf import settings from django.conf.urls import patterns, include, url from django.contrib import admin from game.views import GameDemoView, MainView, AboutView, GameView, create_game admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'game.views.home_view', name='home'), url("", include("django_socketio.urls")), url(r'^accounts/', include('allauth.urls')), url(r'^singlegame/$', GameDemoView.as_view()), url(r'^game/(?P<game_id>\d+)/$', GameView.as_view()), url(r'^about/$', AboutView.as_view()), url(r'^mainview/$', MainView.as_view()), url(r'^create_game/$', create_game), url(r'^admin/', include(admin.site.urls)), url(r'^%s(?P<path>.*)$' % re.escape(settings.STATIC_URL.lstrip('/')), 'django.views.static.serve', {'document_root':settings.STATIC_ROOT}), )
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, include from rest_framework import routers from api.views import TruecallerViewSet, GetPolicyQuotes, TDITipsViewSet from game.views import IndexView, LogoutView, VehicleView, AgentView, AreaView, HomeView, AreaView1, HouseForm, GameView from policycompare.views import PolicyCompareView router = routers.DefaultRouter() router.register(r'truecaller', TruecallerViewSet) router.register(r'tditips', TDITipsViewSet) urlpatterns = [ url(r'^$', IndexView.as_view(), name='index'), url(r'^logout/$', LogoutView.as_view(), name='logout'), url(r'^agent/$', AgentView.as_view(), name='agent'), url(r'^area/$', AreaView.as_view(), name='area'), url(r'^area1/$', AreaView1.as_view(), name='area1'), url(r'^vehicle/$', VehicleView.as_view(), name='vehicle'), url(r'^getquotes/$', GetPolicyQuotes.as_view(), name='getquotes'), url(r'^policy/$', PolicyCompareView.as_view(), name='policy'), url(r'^home/$', HomeView.as_view(), name='homes'), url(r'^houseform/$', HouseForm.as_view(), name='houseform'), url(r'^game/$', GameView.as_view(), name='game'), url(r'^api/', include(router.urls)), path('admin/', admin.site.urls), ]
from django.conf.urls import patterns, url from django.contrib.auth.decorators import login_required from game import views from game.views import GameListView, GameView, \ RoundListView, RoundView urlpatterns = patterns( '', url(r'^$', views.tournament, name='tournament'), url(r'^games/$', GameListView.as_view(), name='games'), # (r'^add_game/', login_required(GameView.as_view())), url(r'^games/(?P<pk>\d+)/$', GameView.as_view(), name='game-detail'), url(r'^games/(?P<pk>\d+)/edit$', views.edit_game_result, name='game-result-edit'), url(r'^rounds/$', RoundListView.as_view(), name='rounds'), # (r'^add_round/', login_required(RoundView.as_view())), url(r'^rounds/(?P<pk>\d+)/$', RoundView.as_view(), name='round-detail'), url(r'^rounds/(?P<pk>\d+)/finish$', views.finish_round, name='round-finish'), )
from django.urls import path from game.views import GameView urlpatterns = [ path('', GameView.as_view()), ]
GameRoundView, JoinGameView, JoinRoundView, ResultsView, ResultsJoinView, ) urlpatterns = [ path('admin/', admin.site.urls), url('^$', BasicView.as_view()), url('^register/$', AddUserView.as_view(), name="register"), url('^login/$', UserLoginView.as_view(), name="login"), url('^logout/$', UserLogoutView.as_view(), name="logout"), url('^create/$', LoggedUserView.as_view(), name="create"), url('^lobby/$', LobbyView.as_view(), name="lobby"), url('^game-view/(?P<id>(\d)+)$', GameView.as_view(), name="game_view"), url('^game-view/(?P<id>(\d)+)/round/(?P<round_id>(\d)+)$', GameRoundView.as_view(), name="round"), url('^join-game/(?P<game_id>(\d)+)$', JoinGameView.as_view(), name="join_game"), url('^join-game/(?P<game_id>(\d)+)/round/(?P<round_id>(\d)+)$', JoinRoundView.as_view(), name="join_round"), url('^game-view/(?P<game_id>(\d)+)/results/$', ResultsView.as_view(), name="results"), url('^join-game/(?P<game_id>(\d)+)/results/$', ResultsJoinView.as_view(), name="results_join"),
from django.urls import path from game.views import GameView, ShoutView, JoinView, StartView, LeadView, GuessView, StandingsView urlpatterns = [ path('standings/', StandingsView.as_view(), name="standings"), path('<uuid>/', GameView.as_view(), name="game"), path('<uuid>/shout/<chars>/', ShoutView.as_view(), name="shout"), path('<uuid>/join/', JoinView.as_view(), name="join"), path('<uuid>/lead/', LeadView.as_view(), name="lead"), path('<uuid>/start/', StartView.as_view(), name="start"), path('<uuid>/guess/', GuessView.as_view(), name="guess"), ]
__author__ = 'marc' from game.views import GameView game = GameView() game.play_game()
from django.conf.urls import patterns, url from game.views import GameView urlpatterns = patterns('', url(r'^$', GameView.as_view()) )
router = routers.DefaultRouter() router.register(r'cards', views.RetrieveImages) from accounts import views as accounts_views from profiles import views as profiles_views import accounts.urls as accounts_urls import profiles.urls as profiles_urls import game.views as game_views from game.apiviews import CurrentUserView, GameParticipantsView urlpatterns = [ path('admin/', admin.site.urls), url(r'^game/(?P<game_id>\d+)/$', GameView.as_view()), url(r'^img-api/', include(router.urls)), url(r'^upload/$', views.model_form_upload, name='upload'), url(r'^create_game', game_views.create_game, name='create_game'), url(r'^current-user/', CurrentUserView.as_view()), url(r'^game/participants/(?P<game_id>\d+)/$', GameParticipantsView.as_view()), # TODO: Use path instead of url. # TODO: Fix this clusterfuck - subdivide urls by app. url(r'^$', accounts_views.home, name='home'), url(r'^', include(accounts_urls)), url(r'^', include(profiles_urls)) ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # //////// POLICE LINE DO NOT CROSS //////// POLICE LINE DO NOT CROSS //////// urlpatterns += static(settings.STATIC_URL, document_root=settings.TEST_DIRECT_STATIC)
from django.conf.urls import patterns, url from game.views import LobbiesView, GameView urlpatterns = patterns( '', # Route requests that go to /game/<gameid> url(r'(?P<gameid>.+)$', GameView.as_view(), name="game_view"), # Route requests with no <gameid> url(r'$', LobbiesView.as_view(), name="lobbies_view") )
from django.urls import path, include from rest_framework import routers <<<<<<< HEAD from api.views import TruecallerViewSet from game.views import IndexView, LogoutView, VehicleView, AgentView, AreaView,GameView ======= from api.views import TruecallerViewSet, GetPolicyQuotes from game.views import IndexView, LogoutView, VehicleView, AgentView, AreaView from policycompare.views import PolicyCompareView >>>>>>> 3f02355e662c03fb0f056677826f2529845a5d4d router = routers.DefaultRouter() router.register(r'truecaller', TruecallerViewSet) urlpatterns = [ url(r'^$', IndexView.as_view(), name='index'), url(r'^logout/$', LogoutView.as_view(), name='logout'), url(r'^agent/$', AgentView.as_view(), name='agent'), url(r'^area/$', AreaView.as_view(), name='area'), url(r'^vehicle/$', VehicleView.as_view(), name='vehicle'), <<<<<<< HEAD url(r'^game/$', GameView.as_view(), name='vehicle'), ======= url(r'^getquotes/$', GetPolicyQuotes.as_view(), name='getquotes'), url(r'^policy/$', PolicyCompareView.as_view(), name='policy'), >>>>>>> 3f02355e662c03fb0f056677826f2529845a5d4d url(r'^api/', include(router.urls)), path('admin/', admin.site.urls), ]
from django.urls import path from game.views import GameView urlpatterns = [ path('', GameView.as_view(), name='game') ]