from django.conf.urls import * from profiles.views import (ProfileEdit, ProfileDetail, PreferenceEdit, ) from django.contrib.auth.decorators import login_required urlpatterns = patterns('profiles.views', url('^(?P<username>[-\w]+)/edit/$', login_required(ProfileEdit.as_view()), name = 'edit'), url('^(?P<username>[-\w]+)/edit/preferences/$', login_required(PreferenceEdit.as_view()), name = 'preference_edit'), url('^(?P<username>[-\w]+)/$', login_required(ProfileDetail.as_view()), name = 'detail'), )
from django.conf.urls.defaults import * from profiles.views import ( ProfileEdit, ProfileDetail, PreferenceEdit, ) from django.contrib.auth.decorators import login_required urlpatterns = patterns( 'profiles.views', url('^(?P<username>[-\w]+)/edit/$', login_required(ProfileEdit.as_view()), name='edit'), url('^(?P<username>[-\w]+)/edit/preferences/$', login_required(PreferenceEdit.as_view()), name='preference_edit'), url('^(?P<username>[-\w]+)/$', login_required(ProfileDetail.as_view()), name='detail'), )
urlpatterns = patterns("", url(r"^$", HomepageView.as_view(), name="home"), url(r"^admin/", include(admin.site.urls)), url(r"^account/", include("account.urls")), url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')), url(r'^oauth/new/', OAuthClientCreateView.as_view(), name="newoauth"), url(r'^oauth/clients/', OAuthClientListView.as_view(), name="listoauth"), url(r'^api/profiles/', ProfileList.as_view()), url(r'^api/user/', ProfileUserDetail.as_view()), url(r'^api/profiles/(?P<pk>[0-9]+)/$', ProfileDetail.as_view()), url(r'^profile/somethingawful/', SAVerificationView.as_view(), name="somethingawful"), url(r"^profile/settings/", AccountSettingsView.as_view(), name="accountsettings"), url(r"^profile/steam/", SteamProfileSettingsView.as_view(), name="steamsettings"), url(r"^profile/eve/", EveOnlineProfileSettingsView.as_view(), name="eveonlinesettings"), url(r"^profile/league/", LeagueOfLegendsProfileSettingsView.as_view(), name="leaguesettings"), url(r"^profile/minecraft/", MinecraftProfileSettingsView.as_view(), name="minecraftsettings"), url(r"^profile/nintendo/", NintendoProfileSettingsView.as_view(), name="nintendosettings"), url(r"^profile/psn/", PlaystationNetworkProfileSettingsView.as_view(), name="psnsettings"), url(r"^profile/xbox/", XboxLiveProfileSettingsView.as_view(), name="xblsettings"), url(r"^profile/bf4/", BattlefieldFourProfileSettingsView.as_view(), name="bf4settings"), url(r"^profile/wot/", WorldOfTanksProfileSettingsView.as_view(), name="wotsettings"), url(r"^profile/blizzard/", BlizzardProfileSettingsView.as_view(), name="blizzardsettings"), )
from django.conf.urls import patterns, url from django.contrib.auth.decorators import login_required from profiles.views import ProfileDetail, ProfileUpdate urlpatterns = patterns('', url(r'^(?P<slug>[-_\w]+)/$', login_required(ProfileDetail.as_view()), name='profile-detail'), url(r'^(?P<slug>[-_\w]+)/update/$', login_required(ProfileUpdate.as_view()), name='profile-update'), )
from main.views import HomeView from profiles.views import ChangeProfileView, ProfileDetail from trips.views import TripsList, CreateTrip urlpatterns = [ # Общедоступные и статические страницы path('', HomeView.as_view(), name='home'), # Регистрация и аутентификация path('login/', LoginView.as_view(template_name='accounts/login.html'), name='login'), path('logout/', LogoutView.as_view(template_name='accounts/logout.html'), name='logout'), path('register/', RegistrationView.as_view(), name='register'), # Профиль path('me', ProfileDetail.as_view(), name='profile-details'), # Настройки path('settings/account', ChangeAccountView.as_view(), name='settings-account'), path('settings/profile', ChangeProfileView.as_view(), name='settings-profile'), path('settings/password', ChangePasswordView.as_view(), name='settings-password'), # Поездки path('trips/list', TripsList.as_view(), name='trips-list'), path('trips/create', CreateTrip.as_view(), name='trips-create'), path('admin/', admin.site.urls), ] urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)