Esempio n. 1
0
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from django.views.generic import TemplateView

from app.auth.views import BaseChangePasswordView
from views import LoginView, LogoutView, RegistrationView

urlpatterns = patterns(
    '',
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', login_required(LogoutView.as_view()), name='logout'),
    url(r'^change-password/$',
        login_required(BaseChangePasswordView.as_view()),
        name='change_password'),
    url(r'^change-password/(?P<result>(saved|error))/$',
        login_required(BaseChangePasswordView.as_view()),
        name='change_password_result'),
    url(r'^registration/$', RegistrationView.as_view(), name='registration'),
    url(r'^registration-complete/$',
        TemplateView.as_view(
            template_name="site/auth/registration_complete.html"),
        name='registration_complete'),
)
Esempio n. 2
0
from django.conf.urls.defaults import patterns, url


from views import LoginView, LogoutView


urlpatterns = patterns('',
	
	# login
	url(r'^login/$', LoginView.as_view(), name='login'),

	# logout
	url(r'^logout/$', LogoutView.as_view(), name='logout'),

)
Esempio n. 3
0
url_names = {
	"signup":"signup",
	"login":"******",
	"logout":"logout",
	"confirm_email":"confirm_email",
	"password":"******",
	"password_reset":"password_reset",
	"settings":"settings",
	"delete":"delete",
}

urlpatterns = patterns("",
    url(r'^signup/$', SignupView.as_view(), name="account_signup"),
    url(r'^login/$', LoginView.as_view(), name="account_login"),
    url(r'^logout/$', LogoutView.as_view(), name="account_logout"),
    # url(r'^confirm_email/$', ConfirmEmailView.as_view(), name="account_confirm_email"),
	url(r"^confirm_email/(?P<key>\w+)/$", ConfirmEmailView.as_view(), name="account_confirm_email"),
    url(r'^password/$', ChangePasswordView.as_view(), name="account_password"),
    url(r'^password_reset/$', PasswordResetView.as_view(), name="account_password_reset"),
    url(r'^password_reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', PasswordResetTokenView.as_view(), name="account_password_reset_token"),
    url(r'^settings/$', SettingsView.as_view(), name="account_settings"),
    url(r'^profile/$', ProfileView.as_view(), name="account_profile"),
    url(r'^delete/$', DeleteView.as_view(), name="account_delete"),
    url(r'^image/(?P<content_type>[-\w]+)/(?P<object_id>\d+)/create/$',
        UploadNewAvatarView.as_view(),
        name='upload_new_avatar',
    ),
	url(r'^messages/', include('messages.urls')),
)
from django.conf.urls import url
from views import LoginView,LogoutView,RegisterView

urlpatterns = [
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^register/$',RegisterView.as_view(), name='register'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
]
from django.conf.urls import url, include
from django.contrib.auth import views as auth_views

from views import UpdateRadioDatabaseView, TrackerMainView, \
    SignUpView, LoginView, LogoutView, ChangeSeenView, DownloadFileView, GetPlayFileUrlView, GetRadioTableHtml

app_name = 'hpradiotracker'
urlpatterns = [
    url(r'^$', TrackerMainView.as_view(), name='tracker-main-view'),

    url(r'^signup/$', SignUpView.as_view(), name='sign-up-view'),
    url(r'^login$', LoginView.as_view(), name='login-view'),
    url(r'^logout$', LogoutView.as_view(), name='logout-view'),

    url(r'^update_radio_database$', UpdateRadioDatabaseView.as_view(), name='update-radio-database-view'),
    url(r'^change_seen$', ChangeSeenView.as_view(), name='change-seen'),
    url(r'^download_file$', DownloadFileView.as_view(), name='download-file-view'),
    url(r'^get_play_file_url$', GetPlayFileUrlView.as_view(), name='get-play-file-url'),
    url(r'^get_radio_table_html$', GetRadioTableHtml.as_view(), name='get-radio-table-html')


]
Esempio n. 6
0
from django.conf.urls import url

from views import ItemCreationView, ItemEditView, ItemDetailView, UserLogView
from views import VariantCreationView, VariantDetailView, VariantEditView, HomePage
from views import RegistrationView, LoginView, LogoutView

urlpatterns = [
    url(r'^$', HomePage.as_view(), name="homepage"),
    url(r'^user-log/$', UserLogView.as_view(), name="log"),
    url(r'^create-item/', ItemCreationView.as_view(), name="create-item"),
    url(r'^edit-item/(?P<pk>\w{0,50})/',
        ItemEditView.as_view(),
        name="edit-item"),
    url(r'^create-variant/',
        VariantCreationView.as_view(),
        name="create-variant"),
    url(r'^view-variant/(?P<pk>\w{0,50})/',
        VariantDetailView.as_view(),
        name="view-variant"),
    url(r'^view-item/(?P<pk>\w{0,50})/',
        ItemDetailView.as_view(),
        name="view-variant"),
    url(r'^edit-variant/(?P<pk>\w{0,50})/',
        VariantEditView.as_view(),
        name="edit-variant"),
    url(r'^register/', RegistrationView.as_view(), name="register-user"),
    url(r'^login/', LoginView.as_view(), name="login"),
    url(r'^logout/', LogoutView.as_view(), name="logout"),
]
Esempio n. 7
0
                 view_func=ItemDeleteView.as_view('itemdelete_view'))
# /category/item_id/update
app.add_url_rule('/<regex("{}"):category>'.format(utils.get_cat_regex()) +
                 '/<int:item_id>/update',
                 view_func=ItemUpdateView.as_view('itemupdate_view'))
app.add_url_rule("/me", view_func=MyAccountView.as_view('myaccount_view'))
app.add_url_rule("/items/add", view_func=ItemAddView.as_view('additem_view'))

app.add_url_rule("/user/<int:uid>", view_func=UserView.as_view('user_view'))

# /img/image.jpg - serves images from the db
app.add_url_rule("/img/<pid>",
                 view_func=ShowPictureView.as_view('showpicture_view'))

# delete current user - deletes their items as well
app.add_url_rule("/delete", view_func=DelUser.as_view('deleteuser_view'))
app.add_url_rule("/login", view_func=LoginView.as_view('login_view'))
app.add_url_rule("/logout", view_func=LogoutView.as_view('logout_view'))

app.add_url_rule("/disconnect",
                 view_func=DisconnectView.as_view('disconnect_view'))

# auth
app.add_url_rule('/auth/<provider>', view_func=AuthView.as_view("auth_first"))
app.add_url_rule('/auth/<provider>/callback',
                 'auth_callback',
                 view_func=AuthView.as_view("auth_callback"))

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000)
                  PhotosListView, PhotoUploadView,\
                  PhotoServiceView, PhotoUpdateDeleteView


urlpatterns = [

    url(r'^$',
        IndexView.as_view(),
        name='index'),

    url(r'^auth/facebook/$',
        FacebookAuthView.as_view(),
        name='facebook_auth'),

    url(r'^logout/$',
        LogoutView.as_view(),
        name='logout'),

    url(r'^dashboard/$',
        DashboardView.as_view(),
        name='dashboard'),

    url(r'^dashboard/photos/$',
        PhotosListView.as_view(),
        name='photos'),

    url(r'^dashboard/photos/upload/$',
        PhotoUploadView.as_view(),
        name='photo_upload'),

    url(r'^dashboard/photos/(?P<public_id>[\w]+)/$',
Esempio n. 9
0
from django.conf.urls import url
from views import LoginView, LogoutView, OTPView, ContactView, FeedView, UserView, ProfileRequestView, \
AddContactView, NotificationView, IntroduceContactView, InterestView, SocialProfileView, ImageView, \
PrivacyView, reminders, LogView, completion, completion_push, push_promotional, user_count, add_via_nfc

urlpatterns = [
    url(r'login/', LoginView.as_view()),
    url(r'logout/', LogoutView.as_view()),
    url(r'otp/', OTPView.as_view()),
    url(r'social_profile/', SocialProfileView.as_view()),
    url(r'privacy/', PrivacyView.as_view()),
    url(r'interest/', InterestView.as_view()),
    url(r'user/', UserView.as_view()),
    url(r'image_upload/', ImageView.as_view()),
    url(r'profile_request/', ProfileRequestView.as_view()),
    url(r'add_contact/', AddContactView.as_view()),
    url(r'contact/', ContactView.as_view()),


    url(r'introduce/', IntroduceContactView.as_view()),

    url(r'feed/', FeedView.as_view()),
    url(r'notification/', NotificationView.as_view()),

    url(r'reminders/', reminders),

    url(r'completion/', completion),

    url(r'completion_push', completion_push),

    url(r'log/', LogView.as_view()),
Esempio n. 10
0
from django.conf.urls import url

from views import (
    LoginView,
    LogoutView,
    UserDetailsView,
    PasswordChangeView,
    PasswordResetView,
    PasswordResetConfirmView,
)

urlpatterns = [
    # URLs that do not require a session or valid token
    url(r"^password/reset/$", PasswordResetView.as_view(), name="rest_password_reset"),
    url(r"^password/reset/confirm/$", PasswordResetConfirmView.as_view(), name="rest_password_reset_confirm"),
    url(r"^login/$", LoginView.as_view(), name="rest_login"),
    # URLs that require a user to be logged in with a valid session / token.
    url(r"^logout/$", LogoutView.as_view(), name="rest_logout"),
    url(r"^user/$", UserDetailsView.as_view(), name="rest_user_details"),
    url(r"^password/change/$", PasswordChangeView.as_view(), name="rest_password_change"),
]
app.add_url_rule('/<regex("{}"):category>'.format(utils.get_cat_regex()) +
                 '/<int:item_id>/update', view_func=ItemUpdateView.as_view('itemupdate_view'))
app.add_url_rule("/me", view_func=MyAccountView.as_view('myaccount_view'))
app.add_url_rule("/items/add", view_func=ItemAddView.as_view('additem_view'))

app.add_url_rule("/user/<int:uid>", view_func=UserView.as_view('user_view'))

# /img/image.jpg - serves images from the db
app.add_url_rule(
    "/img/<pid>",
    view_func=ShowPictureView.as_view('showpicture_view'))

# delete current user - deletes their items as well
app.add_url_rule("/delete", view_func=DelUser.as_view('deleteuser_view'))
app.add_url_rule("/login", view_func=LoginView.as_view('login_view'))
app.add_url_rule("/logout", view_func=LogoutView.as_view('logout_view'))

app.add_url_rule(
    "/disconnect",
    view_func=DisconnectView.as_view('disconnect_view'))

# auth
app.add_url_rule('/auth/<provider>', view_func=AuthView.as_view("auth_first"))
app.add_url_rule(
    '/auth/<provider>/callback',
    'auth_callback',
    view_func=AuthView.as_view("auth_callback"))


if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000)
Esempio n. 12
0
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 include, path, re_path

from rest_framework_simplejwt.views import (
    token_obtain_pair,
    token_refresh,
    token_verify,
)

from views import LogoutView

urlpatterns = [
    path("admin/", admin.site.urls),
    re_path(r"^api/auth/login", token_obtain_pair),
    re_path(r"^api/auth/refresh", token_refresh),
    re_path(r"^api/auth/verify", token_verify),
    re_path(r"^api/auth/logout", LogoutView.as_view()),
    path("api/mutualfunds/", include("mutualfunds.urls")),
    path("api/", include("folioman.urls")),
]
Esempio n. 13
0
from django.conf.urls import patterns, include, url
from views import menuView,accountView,LogoutView

urlpatterns = patterns('',
    # Examples:
    #url(r'login^$', 'account.views.login', name='login'),
    url(r'^$',menuView,name='admin_menu'),
    url(r'settings/$',accountView,name='admin_account_menu'),
    url(r'^logout/$', LogoutView.as_view(), name='admin_account_logout'),
    #url(r'admin/menu^$','account.views.admin_menu',name='admin_menu')
)
Esempio n. 14
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from views import SignupView, HomePageView, LoginView, LogoutView

urlpatterns = patterns('',
    # Examples:
    url(r'^$', HomePageView.as_view(), name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^accounts/register/', SignupView.as_view(), name='signup'),
    url(r'^accounts/login/', LoginView.as_view(), name='login'),
    url(r'^accounts/logout/', LogoutView.as_view(), name='logout'),
    url(r'^quiz/', include('quiz.urls', namespace='quiz')),
    url(r'^admin/', include(admin.site.urls)),
)
Esempio n. 15
0
__author__ = 'dheerendra'

from django.conf.urls import url, include
from views import LoginView, IndexView, LogoutView, AddNoticeView, UserNoticeViewset, UserEventsViewset, AddEventView, \
    AddNewsView, UserNewsViewset
from rest_framework.routers import DefaultRouter

router = DefaultRouter()
router.register('notice', UserNoticeViewset, base_name='content_notice')
router.register('event', UserEventsViewset, base_name='content_event')
router.register('news', UserNewsViewset, base_name='content_news')

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='content_home'),
    url(r'^login/', LoginView.as_view(), name='login_page'),
    url(r'^logout/', LogoutView.as_view(), name='logout_page'),
    url(r'^add_notice/', AddNoticeView.as_view(), name='add_content_notice'),
    url(r'^add_event/', AddEventView.as_view(), name='add_content_event'),
    url(r'^add_news/', AddNewsView.as_view(), name='add_content_news'),
    url(r'^api/', include(router.urls)),
]
Esempio n. 16
0
# -*- coding: utf-8 -*-
__author__ = 'Dmitry Astrikov'

from django.conf.urls import include, patterns, url
from django.contrib.auth.decorators import login_required

from views import LoginView, LogoutView

urlpatterns = patterns('',
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', login_required(LogoutView.as_view()), name='logout'),
)
Esempio n. 17
0
# -*- coding: utf-8 -*-
from django.conf.urls import url
from views import LoginView, LogoutView, SignupView


urlpatterns = [
    # Users URLs
    url(r'^login$', LoginView.as_view(), name='users_login'),
    url(r'^logout$', LogoutView.as_view(), name='users_logout'),
    url(r'^signup$', SignupView.as_view(), name='users_signup'),
]