예제 #1
0
    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.conf.urls.static import static
from django.contrib import admin
from django.urls import path,include
from django.views.generic import TemplateView
from Social_Media_App import myFunctions
from Social_Media_App import settings
from global_login_required import login_not_required

urlpatterns = [
    path('admin/', admin.site.urls),
    
    path('u/',include("SM_Users.urls")),
    path('notLoggeIn/',login_not_required(TemplateView.as_view(template_name="user/ulogin.html")),name="notLoggedIn"),
    path('',login_not_required(myFunctions.loginPage),name="u_login"),
    path('webpush/',include("webpush.urls")),
]
if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)
예제 #2
0
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 global_login_required import login_not_required

from django.conf.urls import url, include
from django.contrib import admin
from django.views.generic.base import RedirectView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
]

urlpatterns += [
    url(r'^predict/', include('prediction_app.urls')),
    url(r'^accounts/login/$',
        login_not_required(
            RedirectView.as_view(url='/predict/login', permanent=False)),
        name='redirect_url')
]
예제 #3
0
from django.conf.urls import url
from django.contrib.auth import views as auth_views
from . import views
from global_login_required import login_not_required

urlpatterns = [
    url(r'^$', views.index, name='index'),
    url(r'^(?P<match_id>[0-9]+)/$', views.match_detail),
    url(r'^question/(?P<question_id>[0-9]+)/$', views.question_detail),
    url(r'^answer/(?P<question_id>[0-9]+)/$', views.answer),
    url(r'^signup/$', views.signup, name='signup'),
    url(r'^logout/$', views.logout_view, name='logout'),
    url(r'^login/$',
        login_not_required(
            auth_views.LoginView.as_view(
                template_name='registration/login.html')),
        name='login'),
    url(r'^password_reset/$',
        auth_views.PasswordChangeView.as_view(),
        name='password_reset'),
    url(r'^user_info/$', views.user_info, name='user'),
    url(r'^get_model_data/$', views.get_model_data, name='model_data'),
    url(r'^send/$', views.send, name='send_mail'),
    url(r'^my_activity/$', views.activity, name='my_activity'),
    url(r'^leaderboard/$', views.leaderboard, name='leaderboard'),
]
예제 #4
0
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, include

from global_login_required import login_not_required
from django.contrib.auth import views as auth_views
from django.views.generic.base import RedirectView

urlpatterns = [
    path('',RedirectView.as_view(url='/users/', permanent=False)),
    path('users/', include('users.urls')),
    path('keyword/', include('kedata_keyword.urls')),
    path('schedule/', include('schedule.urls')),

    path('login/', login_not_required(auth_views.LoginView.as_view(template_name='login.html')), name='login'),
    path('logout/', login_not_required(auth_views.LogoutView.as_view()), name='logout'),
    path('admin/', admin.site.urls),
]
예제 #5
0
    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 global_login_required import login_not_required
from django.contrib import admin
from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from sbadmin.views import (
                            EmployedHashView, EmployeeNewView, EmployeeView, EmployeesView, EmployeeDeleteView, EmployeeEditView,
                            AreaView, EntriesView, EntryView, login_view, logout_view, home_view
                          )

urlpatterns = [
    path('admin/', admin.site.urls), #Acesso Admin
    path('', home_view, name='home'), #Home
    path("login", login_view, name='login'), #Login
    path("logout", logout_view, name='logout'), #Sair
    path('employees/', EmployeesView.as_view(), name='employees'), #Funcionários
    path('employee/new/', EmployeeNewView.as_view(), name='employee-new'), #Novo
    path('employee/delete/<int:id>/', EmployeeDeleteView.as_view(), name='employee-delete'), #Deletar
    path('employee/edit/<int:id>/', EmployeeEditView.as_view(), name='employee-edit'), #Editar
    path('employee/view/<int:id>/', EmployeeView.as_view(), name='employee-view'), #Visualizar
    path('areas/<int:id>', AreaView.as_view(), name='area'), #Areas
    path('entries/', EntriesView.as_view(), name='entries'), #Entradas
    path('entry/<int:registro>', login_not_required(EntryView.as_view()), name='entry'), #Entradas
    path('hash/<int:registro>', login_not_required(EmployedHashView.as_view()), name='entry'), #Entradas
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
예제 #6
0
"""

from django.urls import path
from django.views.generic import TemplateView
from SM_Users import views
from global_login_required import login_not_required
from SM_Users.views import ThreadView

urlpatterns = [
    path('sign_up/', views.sign_up, name="sign_up"),
    path('save_reg/', views.Save_Registration.as_view(), name="save_reg"),
    path('reg_validate_otp/',
         views.Reg_validate_otp.as_view(),
         name="reg_validate_otp"),
    path('login/',
         login_not_required(views.User_Login.as_view()),
         name="login"),
    path('logout/', views.User_Logout.as_view(), name="logout"),
    path('homepage/', views.Homepage, name="homepage"),
    path('u_forgot_pwd/',
         login_not_required(
             TemplateView.as_view(template_name="user/u_forgot_pwd.html")),
         name="u_forgot_pwd"),
    path('u_for_pwd_email/',
         views.Forgot_pwd_email.as_view(),
         name="u_for_pwd_email"),
    path('for_pwd_validate_otp/',
         views.Forgot_pwd_validate_otp.as_view(),
         name="for_pwd_validate_otp"),
    path('search_friends/',
         views.Search_Friends.as_view(),
예제 #7
0
파일: urls.py 프로젝트: swaq-hub/sms
from django.conf.urls import url, include
from . import views
from django.contrib.auth.views import LoginView as login_view
from django.contrib.auth.views import LogoutView as logout_view
from global_login_required import login_not_required
from django.conf.urls.static import static
from django.conf import settings

app_name = 'mgmnt'

urlpatterns = [
    url(r'^$', views.home, name="home"),
    url(r'^login/$',
        login_not_required(login_view.as_view()),
        {'template_name': 'mgmnt/login.html'},
        name="login_page"),
    url(r'^logout/$',
        login_not_required(logout_view.as_view()),
        {'template_name': 'mgmnt/login.html'},
        name="logout"),
    url(r'^user/list/$', views.userlist, name="user-list"),
    url(r'^user/add/$', views.userregistration, name="user-add"),
    url(r'^user/edit/(?P<id>\d+)/$', views.userregistration, name="user-edit"),
    url(r'^user/delete/(?P<id>\d+)/$', views.deluser, name="user-del"),
    url(r'^profile/$', views.userprofile, name="userprofile"),
    url(r'^profile/edit/$', views.edituserprofile, name="edituserprofile"),
    url(r'^passchang/$', views.passwordchange, name="passchang"),
]
# + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

if settings.DEBUG: