コード例 #1
0
from django.conf.urls.static import static
from django.conf.urls import url, include

from allauth.account.views import LoginView, SignupView, LogoutView
from games import views
from users.views import user_profile_view, pay_thankyou_view, user_profile_edit


urlpatterns = [
    path('', views.game_list_view, name='game_list'),
    path('game_details/<int:game_id>',
         views.game_details_view, name='game_details'),
    path('add_comment', views.add_comment, name='add_comment'),
    path('edit_comment', views.edit_comment, name='edit_comment'),
    path('delete_comment', views.delete_comment, name='delete_comment'),
    path('login', LoginView.as_view(), name='login'),
    path('logout', LogoutView.as_view(), name='logout'),
    path('signup', SignupView.as_view(), name='signup'),
    path('userprofile', user_profile_view, name='userprofile'),
    path('userprofile_edit', user_profile_edit, name='userprofile_edit'),
    path('pay_thankyou', pay_thankyou_view, name='pay_thankyou'),
    path('accounts/', include('allauth.urls')),
    path('admin/', admin.site.urls),
]

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL,
                          document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
コード例 #2
0
     r"^password_reset/$",
     PasswordResetView.as_view(template_name="account/password_reset.html"),
     name="password_reset",
 ),
 url(
     r"^password_reset/done/$",
     PasswordResetDoneView.as_view(
         template_name="account/password_reset_done.html"),
     name="password_reset_done",
 ),
 # Django Admin, use {% url 'admin:index' %}
 url(settings.ADMIN_URL, admin.site.urls),
 # User management
 url(r"^users/", include("users.urls", namespace="users")),
 url(r"^accounts/login/$", UserLookupLoginView.as_view(), name="login"),
 url(r"^accounts/logout/$", LogoutView.as_view(), name="logout"),
 url(r"^accounts/", include("allauth.urls")),
 # Your stuff: custom urls includes go here
 url(r"^$", RedirectView.as_view(url="/workflow/", permanent=False)),
 url(r"^report_builder/", include("report_builder.urls")),
 url(r"", include((modules.urls))),
 url(r"^ckeditor/", include("ckeditor_uploader.urls")),
 url(r"^terms/", include("termsandconditions.urls")),
 url(
     r"^privacy/",
     RedirectView.as_view(url="/terms/view/privacy/", permanent=True),
     name="privacy",
 ),
 url(
     r"^eula/",
     RedirectView.as_view(url="/terms/view/eula/", permanent=True),
コード例 #3
0
 path("api-auth/", include("rest_auth.urls")),
 path("api-auth/registration/", include("rest_auth.registration.urls")),
 path(
     "users/signup",
     SignupView.as_view(template_name="registration/signup.html"),
     name="account_signup",
 ),
 path(
     "users/login",
     logged_users_redirect(
         LoginView.as_view(template_name="registration/login.html")),
     name="account_login",
 ),
 path(
     "users/logout",
     LogoutView.as_view(template_name="registration/logout.html"),
     name="account_logout",
 ),
 path(
     "users/reset",
     logged_users_redirect(
         PasswordResetView.as_view(
             template_name="registration/password_reset_form.html")),
     name="account_reset_password",
 ),
 url(
     r"^users/password/reset/key/(?P<uidb36>[0-9A-Za-z]+)-(?P<key>.+)/$",
     logged_users_redirect(
         PasswordResetFromKeyView.as_view(
             template_name="registration/password_reset_confirm.html")),
     name="account_reset_password_from_key",
コード例 #4
0
        return render(requests, "Module_Account/login.html", result)

    # If not GET, then proceed
    try:
        username = requests.POST.get("username")
        password = requests.POST.get("password")

        # Proceed to validating of username and password
        user = processLogin.validate(username,password)

    except Exception as e:

        return render(requests, "Module_Account/login.html", {"error" : str(e)})

    if user != None :
        login(requests,user,backend='django.contrib.auth.backends.ModelBackend')
        return render(requests, "Administrator/admindashboard.html", result)

    else:
        #HttpResponseRedirect(('TMmod:home'))
        return render(requests, "Module_Account/login.html", result)

# LOGOUT ---------------------------------------------------------------------#
#@login_required(login_url='/')
def logout_view(requests):
    logout(requests)
    return redirect("/")


logout = LogoutView.as_view() #This is from allauth logout [Fixes the session problem]
コード例 #5
0
ファイル: urls.py プロジェクト: FinallyArs/meeting-website
    HomeView, UserListView, RegistrationView,\
    ProfileView, EditProfileView
from allauth.account.views import LoginView, LogoutView, PasswordResetView
urlpatterns = [
    path('home', HomeView.as_view(), name='home'),
    path('details/<str:pk>', user_details, name='user_detail'),
    path('users_list', UserListView.as_view(), name='list'),
    path('signup', RegistrationView.as_view(), name='registration'),
    path('profile/<str:pk>', ProfileView.as_view(), name='profile'),
    path('accounts/profile/edit',
         EditProfileView.as_view(),
         name='edit_profile'),
    path('contacts', views.contactform, name='contacts'),
    path('thanks', views.thanks, name='thanks'),
    path('login', LoginView.as_view(), name='custom_login'),
    path('logout', LogoutView.as_view(), name='custom_logout'),
    path('password_reset',
         PasswordResetView.as_view(),
         name='custom_reset_password'),
    path('dialogs',
         login_required(views.DialogsView.as_view()),
         name='dialogs'),
    path('dialogs/create/<str:user_id>',
         login_required(views.CreateDialogView.as_view()),
         name='create_dialog'),
    path('dialogs/<str:chat_id>',
         login_required(views.MessagesView.as_view()),
         name='messages'),
]

if settings.DEBUG:
コード例 #6
0
"""twitter_data 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, include
from django.contrib import admin
from webapp import views
from allauth.account.views import LogoutView
urlpatterns = [
    url(r'^admin/', admin.site.urls, name='admin'),
    url(r'^accounts/', include('allauth.urls')),
    url(r'^user/$', views.home, name="home-page"),
    url(r'^accounts/logout/', LogoutView.as_view(), name="account_logout")
]
コード例 #7
0
ファイル: urls.py プロジェクト: tieu/betterself
    # you may want to take out api-auth and have all traffic through rest-auth instead
    # im not sure if you even use rest_framework/api-auth anymore
    url(r'^api-auth/',
        include('rest_framework.urls', namespace='rest_framework')),

    # https://github.com/Tivix/django-rest-auth/issues/159#issuecomment-173909852
    url(r'^rest-auth/login/$', LoginViewCustom.as_view(), name='rest_login'),
    url(r'^rest-auth/', include('rest_auth.urls')),
    url(r'^rest-auth/registration/account-confirm-email/(?P<key>[-:\w]+)/$',
        ConfirmEmailView.as_view(),
        name='account_confirm_email'),
    url(r'^rest-auth/registration/', include('rest_auth.registration.urls')),
    # url(r'^rest-auth/github/$', GitHubLoginView.as_view(), name='github_login'),
    # url(r'^rest-auth/facebook/$', FacebookLogin.as_view(), name='fb_login'),
    url(r'^login/$', LoginView.as_view()),
    url(r'^logout/$', LogoutView.as_view()),
    url(r'^session-logout/$', SessionLogoutView.as_view()),
]

# might have to double check this, not sure why MEDIA is so oddly pronounced
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

if settings.DEBUG:
    # This allows the error pages to be debugged during development, just visit
    # these url in browser to see how these error pages look like.
    urlpatterns += [
        url(r'^400/$',
            default_views.bad_request,
            kwargs={'exception': Exception('Bad Request!')}),
        url(r'^403/$',
            default_views.permission_denied,
コード例 #8
0
from .views import AccountDeleteView, AccountSettingsView, HomeView, timeline

app_name = 'home'
urlpatterns = [
    # We do this twice because Allauth expects specific view names to exist
    path('', HomeView.as_view(), name='home'),
    path('', HomeView.as_view(), name='socialaccount_connections'),
    path('pages/', include('wiki.urls')),
    path('accounts/', include('allauth.socialaccount.providers.discord.urls')),
    path('accounts/', include('allauth.socialaccount.providers.github.urls')),
    path('accounts/login/cancelled',
         MessageRedirectView.as_view(pattern_name="home",
                                     message="Login cancelled."),
         name='socialaccount_login_cancelled'),
    path('accounts/login/error',
         MessageRedirectView.as_view(
             pattern_name="home",
             message="Login encountered an unknown error, please try again.",
             message_level=ERROR),
         name='socialaccount_login_error'),
    path('accounts/settings',
         AccountSettingsView.as_view(),
         name="account_settings"),
    path('accounts/delete', AccountDeleteView.as_view(),
         name="account_delete"),
    path('logout', LogoutView.as_view(), name="logout"),
    path('admin/', admin.site.urls),
    path('notifications/', include('django_nyt.urls')),
    path('timeline/', timeline, name="timeline"),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
コード例 #9
0
ファイル: urls.py プロジェクト: mikedutuandu/cayxanhtaynguyen
    'static': StaticSitemap,
}

urlpatterns = [
    # Examples:
    url(r'^$', HomeView.as_view(), name='home'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^ckeditor/', include('ckeditor_uploader.urls')),
    url(r'^tai-khoan/', include('allauth.urls')),
    url(r'^dang-nhap/$', LoginCustomView.as_view(), name='login_custom'),
    url(r'^dang-ky/$', SignupCustomView.as_view(), name='signup_custom'),
    url(r'^dia-chi-cua-toi/$', UserAddressView.as_view(), name='user_address'),
    url(r'^thong-tin-tai-khoan/$',
        UserProfileView.as_view(),
        name='user_profile'),
    url(r'^thoat-tai-khoan/$', LogoutView.as_view(), name='logout_custom'),
    url(r'^ve-tay-nguyen/$', PostListView.as_view(), name='post_list'),
    url(r'^ve-tay-nguyen/(?P<slug>[\w-]+)/$',
        PostDetailView.as_view(),
        name='post_detail'),
    url(r'^lien-he/$', ContactView.as_view(), name='base_contact'),
    url(r'^gioi-thieu/$', IntroductionView.as_view(),
        name='base_introduction'),
    url(r'^hinh-thuc-thanh-toan/$', PaymentView.as_view(),
        name='base_payment'),
    url(r'^nhan-xet/$', CreateCommentView.as_view(), name='create_comment'),
    url(r'^san-pham/$', ProductListView.as_view(), name='products'),
    url(r'^san-pham/(?P<slug>[\w-]+)/$',
        ProductDetailView.as_view(),
        name='product_detail'),
    url(r'^loai-san-pham/(?P<slug>[\w-]+)/$',
コード例 #10
0
"""project URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.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.urls import path, include
from allauth.account.views import SignupView, LoginView, LogoutView
from . import views
from users import urls

app_name = 'users'
urlpatterns = [
    path('signup', SignupView.as_view(),
         name="account_signup"),  # account_signup
    path('login', LoginView.as_view(), name="account_login"),  #  account_login
    path('logout', LogoutView.as_view(),
         name="account_logout"),  # account_logout
    path('mypage', views.mypage, name="mypage"),
    path('coin_add/<int:amount>', views.coin_add, name="coin_add"),
    path('coin_sub/<int:amount>', views.coin_sub, name="coin_sub"),
]
コード例 #11
0
ファイル: urls.py プロジェクト: townbull/dome
from django.conf.urls import patterns, include, url
import views
from allauth.account.views import LogoutView


urlpatterns = patterns('',
    url(r'^login/$', views.login_view, name="login"),
    url(r'^logout/$', LogoutView.as_view(), name="logout"),
)
コード例 #12
0
"""twitagging 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 allauth.account.views import LogoutView
from django.contrib import admin
from django.urls import include, path

urlpatterns = [
    path("", include("tagging.urls")),
    path("admin/", admin.site.urls),
    path("", include("allauth.socialaccount.providers.twitter.urls")),
    path("twitter/logout/", LogoutView.as_view(), name="twitter_logout"),
]
コード例 #13
0
ファイル: urls.py プロジェクト: AlexeyZag/News
from django.urls import path
from allauth.account.views import LoginView, LogoutView
from .views import UserPage, upgrade_me, EditProfile

urlpatterns = [

    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('', UserPage.as_view(), name='mypage'),
    path('upgrade/', upgrade_me, name = 'upgrade'),
    path('edit/<int:pk>', EditProfile.as_view(), name= 'edit')

]
コード例 #14
0
from django.urls import path, include
from . import views as auction_views
from allauth.account.views import LoginView, LogoutView, PasswordResetView

urlpatterns = [
    path('', auction_views.home, name='index'),
    path('register/', auction_views.register, name='register'),
    path('login/',
         LoginView.as_view(template_name='auction/login.html'),
         name='login'),
    path('logout/',
         LogoutView.as_view(template_name='auction/logout.html'),
         name='logout'),
    path(
        'password_reset/',
        PasswordResetView.as_view(template_name='auction/password_reset.html'),
        name='reset_password'),
    path('team/<str:pk>/',
         auction_views.TeamDetailView.as_view(),
         name='team-detail'),
    path('team/<str:pk>/edit',
         auction_views.updateTeamView.as_view(),
         name='team-edit'),
    #     path('team/list',
    #          auction_views.TeamLineUpListView.as_view(), name='lineup'),
    path('auctions/list',
         auction_views.AuctionListView.as_view(),
         name='auction-list'),
    path('auctions/new',
         auction_views.AuctionCreateView.as_view(),
         name='auction-new'),
コード例 #15
0
ファイル: urls.py プロジェクト: jeffshek/betterself
    # you may want to take out api-auth and have all traffic through rest-auth instead
    # im not sure if you even use rest_framework/api-auth anymore
    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),

    # https://github.com/Tivix/django-rest-auth/issues/159#issuecomment-173909852
    url(r'^rest-auth/login/$', LoginViewCustom.as_view(), name='rest_login'),
    url(r'^rest-auth/', include('rest_auth.urls')),
    url(r'^rest-auth/registration/account-confirm-email/(?P<key>[-:\w]+)/$', ConfirmEmailView.as_view(),
        name='account_confirm_email'),
    url(r'^rest-auth/registration/', include('rest_auth.registration.urls')),
    # url(r'^rest-auth/github/$', GitHubLoginView.as_view(), name='github_login'),
    # url(r'^rest-auth/facebook/$', FacebookLogin.as_view(), name='fb_login'),

    url(r'^login/$', LoginView.as_view()),
    url(r'^logout/$', LogoutView.as_view()),
    url(r'^session-logout/$', SessionLogoutView.as_view()),
]

# might have to double check this, not sure why MEDIA is so oddly pronounced
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

if settings.DEBUG:
    # This allows the error pages to be debugged during development, just visit
    # these url in browser to see how these error pages look like.
    urlpatterns += [
        url(r'^400/$', default_views.bad_request, kwargs={'exception': Exception('Bad Request!')}),
        url(r'^403/$', default_views.permission_denied, kwargs={'exception': Exception('Permission Denied')}),
        url(r'^404/$', default_views.page_not_found, kwargs={'exception': Exception('Page not Found')}),
        url(r'^500/$', default_views.server_error),
    ]
コード例 #16
0
ファイル: urls.py プロジェクト: pgbamane/Ecommerce_Site
from allauth.account.views import LoginView, AccountInactiveView, LogoutView
# from allauth.socialaccount.views import S
from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns
from allauth.socialaccount.providers.google.provider import GoogleProvider
from allauth.socialaccount.views import SignupView

urlpatterns = [
    # Django Admin
    path('admin/', admin.site.urls),

    path('', include('core.urls')),

    # User management
    # path('users_app/', include('users_app.urls')),
    path('accounts/signup/', views.SignupView.as_view(), name="account_signup"),
    path('accounts/login/', LoginView.as_view(), name="account_login"),
    path('accounts/logout/', LogoutView.as_view(), name="account_logout"),
    path('accounts/inactive', AccountInactiveView.as_view(), name="account_inactive"),
    path('accounts/socialaccount_signup', SignupView.as_view(), name='socialaccount_signup'),
    # path('accounts/socialaccount_signup', SignupView.as_view(), name='socialaccount_signup'),
    path('accounts/', include(default_urlpatterns(GoogleProvider))),
    # path('accounts/', include('allauth.urls')),

]

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL,
                          document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
コード例 #17
0
ファイル: urls.py プロジェクト: fuglede/cryptoparty.dk
from parties.models import Party
from people.views import ProfileView


class FrontPageView(TemplateView):
    template_name = 'frontpage.html'

    def get_context_data(self, **kwargs):
        context = super(FrontPageView, self).get_context_data(**kwargs)
        context['upcoming'] = Party.objects.upcoming().public()
        context['past'] = Party.objects.past().public()
        return context


urlpatterns = [
    url(r'^logout/', LogoutView.as_view(), name='logout'),
    url(r'^accounts/profile/', ProfileView.as_view(), name='profile'),
    url(r'^accounts/', include('allauth.urls')),
    url(
        r'^parties/',
        include(
            'parties.urls',
            namespace='parties',
            app_name='parties'
        )
    ),
    url(r'^admin/', include(admin.site.urls)),
    url(
        r'^$', FrontPageView.as_view()
    ),
]
コード例 #18
0
ファイル: urls.py プロジェクト: benjaoming/bornhack-website
        TemplateView.as_view(template_name='contact.html'),
        name='contact'
    ),
    url(
        r'^conduct/',
        TemplateView.as_view(template_name='coc.html'),
        name='conduct'
    ),
    url(
        r'^login/$',
        LoginView.as_view(),
        name='account_login',
    ),
    url(
        r'^logout/$',
        LogoutView.as_view(),
        name='account_logout',
    ),
    url(
        r'^privacy-policy/$',
        TemplateView.as_view(template_name='legal/privacy_policy.html'),
        name='privacy-policy'
    ),
    url(
        r'^general-terms-and-conditions/$',
        TemplateView.as_view(template_name='legal/general_terms_and_conditions.html'),
        name='general-terms'
    ),
    url(r'^accounts/', include('allauth.urls')),
    url(r'^admin/', include(admin.site.urls)),
コード例 #19
0
from allauth.account.views import LoginView, LogoutView
from django.urls import path
from django.views.generic import RedirectView

from apps.autenticacao.forms import FormularioLogin

urlpatterns = [
    path('login/',
         LoginView.as_view(template_name='autenticacao/login.html',
                           form_class=FormularioLogin),
         name='account_login'),
    path('logout/',
         LogoutView.as_view(template_name='autenticacao/logout.html'),
         name='account_logout'),
    path('',
         RedirectView.as_view(url='login', permanent=True),
         name='account_signup'),
]