from django.conf.urls import patterns, include, url from django.contrib.auth.decorators import login_required from django.contrib import admin from accounts.views import (SignupView, SigninView, AccountSettingsView, ForgotPasswordView, HomePageView) # from django_messages.views import (inbox, outbox, trash, compose, reply, delete, undelete, view) urlpatterns = patterns('', # user relates urls # url(r'^$', views.home, name='home'), url(r'^admin/', include(admin.site.urls)), url(r'^signup/', SignupView.as_view(), name='signup'), url(r'^signin/', SigninView.as_view(), name='signin'), url(r'^account/', login_required(AccountSettingsView.as_view()), name='account_settings'), url(r'^forgot-password/', ForgotPasswordView.as_view(), name='forgot_password'), url(r'^signout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='signout'), url((r'^$'), login_required(HomePageView.as_view()), name='home'), url(r'^home$', login_required(HomePageView.as_view()), name='home'), # (r'^home/', include('django_messages.urls')), # url(r'^messaging/', include('django_messages.urls')), # (r'^messaging/', include('django_messages.urls')), )
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path, include from accounts.views import HomePageView urlpatterns = [ path('admin/', admin.site.urls), path('', HomePageView.as_view(), name='city_list'), path('account/', include(('accounts.urls', 'accounts'), namespace='accounts')), path('proparty/', include(('proparty.urls', 'proparty'), namespace='proparty')), ] if settings.DEBUG: urlpatterns = urlpatterns + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns = urlpatterns + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.contrib import admin from django.urls import path, include from accounts.views import Signup_create_view, HomePageView, ProfileUpdateView, ProfileView from django.contrib.auth.views import LoginView, PasswordResetView, PasswordResetDoneView, PasswordResetConfirmView from django.contrib.auth.views import PasswordChangeView, PasswordChangeDoneView, PasswordResetCompleteView, LogoutView urlpatterns = [ path('', HomePageView.as_view(), name='home'), path('login/', LoginView.as_view(template_name='account/login.html'), name='login'), path('logout/', LogoutView.as_view(template_name='account/logout.html'), name='logout'), path('profile', ProfileView.as_view(), name='profile'), path('edit-profile/', ProfileUpdateView.as_view(), name='edit-profile'), path('signup', Signup_create_view.as_view(), name='signup'), path('password-reset/', PasswordResetView.as_view( template_name='account/password_reset_form.html', email_template_name='account/password_reset_email.html'), name='password_reset'), path('password-reset/done/', PasswordResetDoneView.as_view( template_name='account/password_reset_done.html'), name='password_reset_done'), path('reset/<uidb64>/<token>/', PasswordResetConfirmView.as_view( template_name='account/password_confirm.html'), name='password_reset_confirm'), path('reset/done/', PasswordResetCompleteView.as_view(
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, include from django.contrib import admin from accounts.views import HomePageView, HowItWorksView, AboutUsView, IOTView urlpatterns = [ url(r'^$', HomePageView.as_view(), name='home'), url(r'^aboutus/$', AboutUsView.as_view(), name='aboutus'), url(r'^howitworks/$', HowItWorksView.as_view(), name='howitworks'), url(r'^iot/$', IOTView.as_view(), name='iot'), url(r'^dev/', include('echo-dev.urls', namespace='dev')), url(r'^accounts/', include('accounts.urls', namespace='accounts')), url(r'^recipes/', include('Recipes.urls', namespace='Recipes')), url(r'^session/', include('session.urls', namespace='session')), url(r'^admin/', admin.site.urls), ]
license=openapi.License(name="BSD License"), ), public=True, permission_classes=(permissions.AllowAny, ), ) def api(prefix=None): """ :param prefix: :return: Base url for API """ if prefix is None: return "api/v1/" else: return "api/v1/{}".format(prefix) from accounts.views import HomePageView urlpatterns = [ path('', HomePageView.as_view(), name="home"), path('admin/', admin.site.urls), path('api/v1/', include('accounts.urls')), path(api(), include('mess.urls')), path('api/v1/auth/', include('rest_framework.urls')), path('api/v1/rest-auth/', include('rest_auth.urls')), path('api/v1/rest-auth/registration/', include('rest_auth.registration.urls')), # path('api/v1/allauth/', include('allauth.urls')), ]
from django.contrib import admin from django.urls import include, path from django.conf import settings from django.conf.urls.static import static from accounts.views import HomePageView from django.views.i18n import JavaScriptCatalog from rest_framework import routers api_urlpatterns = [ url(r'^', include('course.api.urls', namespace='course_api')), url(r'^', include('assignment.api.urls', namespace='assignment_api')), ] urlpatterns = [ path('', HomePageView.as_view(), name='index'), path('api/', include(api_urlpatterns)), path('api-auth/', include('rest_framework.urls', namespace='rest_framework')), path('c/', include('course.urls', namespace='course')), path('accounts/', include('accounts.urls', namespace='accounts')), path('announcement/', include('announcement.urls', namespace='announcement')), path(r'comments/', include('django_comments_xtd.urls')), path(r'jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'), path('r/', include('result.urls', namespace='result')), path('w/', include('assignment.urls', namespace='assignment')), path('admin/', admin.site.urls), path('avatar/', include('avatar.urls')), url('^inbox/notifications/', include('notifications.urls', namespace='notifications')),