コード例 #1
0
ファイル: urls.py プロジェクト: bjames647/fitnessWebsite
from django.conf.urls import patterns, include, url

from website.views import HomePageView
from website.views import SignUpView
from website.views import LoginView
from website.views import LogOutView
from website.views import UserPageView

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'website.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^accounts/profile/$', UserPageView.as_view(), name='profile'),
    url(r'^accounts/logout/$', LogOutView.as_view(), name='logout'),
    url(r'^accounts/login/$', LoginView.as_view(), name='login'),
    url(r'^accounts/register/$', SignUpView.as_view(), name='signup'),
    url('^$', HomePageView.as_view(), name='home'),
    url(r'^admin/', include(admin.site.urls)),
)
コード例 #2
0
ファイル: urls.py プロジェクト: rafaeloliveirati/block_3xbit
from django.urls import path

from website import transactionView, loginView, walletView
from website.views import LoginView

app_name = 'website'

urlpatterns = [
    path('login/', LoginView.as_view(), name='login'),
    path('sendLogin/', loginView.login),
    path('register/', loginView.register),
    path('wallet/', walletView.createWallet),
    path('history/', transactionView.history),
    path('sendTransaction/', transactionView.sendTransaction),
    path('findHash/', transactionView.findHash),
    path('receivedTransaction/', transactionView.receivedTransaction),
]
コード例 #3
0
    ChapterDetailView,
    IndexView,
    AboutView,
    LoginView,
    UserCenterView,
    BookMarketView,
)

app_name = "website"

urlpatterns = [
    path("", IndexView.as_view(), name="index"),
    path("about", AboutView.as_view(), name="about"),
    path("bookmarket", BookMarketView.as_view(), name="bookmarket"),
    path("bookinfo/<int:pk>", BookInfoView.as_view(), name="bookinfo"),
    path("chapter/<int:pk>",
         ChapterDetailView.as_view(),
         name="chapter_detail"),
    path("usercenter", UserCenterView.as_view(), name="usercenter"),
    path("login", LoginView.as_view(), name="login"),
    # path("", HomePageView.as_view(), name="home"),
    # path("formset", DefaultFormsetView.as_view(), name="formset_default"),
    # path("form", DefaultFormView.as_view(), name="form_default"),
    # path("form_by_field", DefaultFormByFieldView.as_view(), name="form_by_field"),
    # path("form_horizontal", FormHorizontalView.as_view(), name="form_horizontal"),
    # path("form_inline", FormInlineView.as_view(), name="form_inline"),
    # path("form_with_files", FormWithFilesView.as_view(), name="form_with_files"),
    # path("pagination", PaginationView.as_view(), name="pagination"),
    # path("misc", MiscView.as_view(), name="misc"),
]
コード例 #4
0
    path('my-deposits', MyDepositsView.as_view(), name='my-deposits'),
    path('preferences/global/',
         GlobalPreferencesView.as_view(),
         name='preferences-global'),
    path('preferences/repository/<int:pk>/',
         RepositoryPreferencesView.as_view(),
         name='preferences-repository'),
    # Admin interface
    path('admin/', admin.site.urls),
    # We keep notification urls, because the app is rather opaque
    path('', include('notification.urls')),
    path('jsreverse/', django_js_reverse.views.urls_js, name='js_reverse'),
    # Shibboleth Discovery
    path('shib-ds/', include('shibboleth_discovery.urls')),
    # Social auth
    path('accounts/login/', LoginView.as_view(), name='account-login'),
    path('accounts/logout/', LogoutView.as_view(), name='account-logout'),
    path('accounts/social/', include('allauth.socialaccount.urls')),
    # JavaScript i18n
    path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'),
    path('lang/', include('django.conf.urls.i18n'), name='set_language'),
    # Remove this in production
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + static(
    settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

# Allauth social providers (normally included directly in the standard installation
# of django-allauth, but as we disabled normal auth, we have to do it here).
for provider in providers.registry.get_list():
    try:
        prov_mod = importlib.import_module(provider.get_package() + '.urls')
    except ImportError:
コード例 #5
0
from django.conf.urls import patterns, include, url
from website.models import Image
from django.views.generic.detail import DetailView
from website.views import NewestView, BestView, UploadView, RegisterView,\
    LoginView, VoteUpView, VoteDownView, AboutView, DetailsView
from django.views.generic.base import TemplateView
from django.views.generic.list import ListView

urlpatterns = patterns('',
    url(r'^img/(?P<slug>[-a-zA-Z0-9]+)/$', DetailsView.as_view()),
    url(r'^img/(?P<slug>[-a-zA-Z0-9]+)/\+/$', VoteUpView.as_view(                                             )
        ),
    url(r'^img/(?P<slug>[-a-zA-Z0-9]+)/\-/$', VoteDownView.as_view(                                             )
        ),
    url(r'^$', NewestView.as_view()),
    #url(r'^search/', SearchView.as_view()),
    url(r'^search/', 'website.views.search'),
    url(r'^best/$', BestView.as_view()),
    url(r'^upload/$', UploadView.as_view()),
    url(r'^about/$', AboutView.as_view()),
    url(r'^register/$', RegisterView.as_view()),
    url(r'^registered/$', TemplateView.as_view(template_name='registered.html',)),
    url(r'^login/$', LoginView.as_view()),
    #url(r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'login.html'}),
    url(r'^logout/$', 'django.contrib.auth.views.logout', {'template_name': 'logout.html'}),
    
)
コード例 #6
0
    ForgotPasswordView,
    ChangePasswordView,
)

from staticcontent.views import (AboutUsView, ContactUsView, PrivacyPolicyView,
                                 TermsConditionsView)

urlpatterns = [

    # Static content
    url(r'^about-us', AboutUsView.as_view(), name="about-us"),
    url(r'^contact-us', ContactUsView.as_view(), name="contact-us"),
    url(r'^privacy-policy', PrivacyPolicyView.as_view(),
        name="privacy-policy"),
    url(r'^terms-condition',
        TermsConditionsView.as_view(),
        name="terms-condition"),

    # Pre Auth
    url(r'^$', LoginView.as_view(), name="login"),
    url(r'^forgot-password$',
        ForgotPasswordView.as_view(),
        name="forgot-password"),

    # Post Auth
    url(r'^change-password$',
        ChangePasswordView.as_view(),
        name="change-password"),
    url(r'^logout$', LogoutView.as_view(), name="logout"),
]
コード例 #7
0
from django.conf.urls import patterns, include, url
from website.models import Image
from django.views.generic.detail import DetailView
from website.views import NewestView, BestView, UploadView, RegisterView,\
    LoginView, VoteUpView, VoteDownView, AboutView, DetailsView
from django.views.generic.base import TemplateView
from django.views.generic.list import ListView

urlpatterns = patterns(
    '',
    url(r'^img/(?P<slug>[-a-zA-Z0-9]+)/$', DetailsView.as_view()),
    url(r'^img/(?P<slug>[-a-zA-Z0-9]+)/\+/$', VoteUpView.as_view()),
    url(r'^img/(?P<slug>[-a-zA-Z0-9]+)/\-/$', VoteDownView.as_view()),
    url(r'^$', NewestView.as_view()),
    #url(r'^search/', SearchView.as_view()),
    url(r'^search/', 'website.views.search'),
    url(r'^best/$', BestView.as_view()),
    url(r'^upload/$', UploadView.as_view()),
    url(r'^about/$', AboutView.as_view()),
    url(r'^register/$', RegisterView.as_view()),
    url(r'^registered/$',
        TemplateView.as_view(template_name='registered.html', )),
    url(r'^login/$', LoginView.as_view()),
    #url(r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'login.html'}),
    url(r'^logout/$', 'django.contrib.auth.views.logout',
        {'template_name': 'logout.html'}),
)
コード例 #8
0
from django.urls import path
from . import views

from website.views import Home, LoginView, Login_instagram

urlpatterns = [
    path('', Home.as_view(), name='home'),
    path('login_view/', LoginView.as_view(), name='login_view'),
    path('login_insta/', Login_instagram.as_view(), name='login_insta'),
]
コード例 #9
0
    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 import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from registration.backends.hmac.views import RegistrationView

from website.forms import PersonUserRegistrationForm
from website.views import LoginView, LogoutView, ActivationView

urlpatterns = [
    url(r'^api-auth/',
        include('rest_framework.urls', namespace='rest_framework')),
    url(r'^', include('website.urls', namespace='website')),
    url(r'^', include('backend.urls')),
    url(r'^admin/', admin.site.urls),
    # Overwrite some views defined by the registration plugin;
    # e.g. logged in users should not be able to log in again
    url(r'^accounts/login/', LoginView.as_view()),
    url(r'^accounts/logout/', LogoutView.as_view()),
    url(r'^accounts/activate/(?P<activation_key>[-:\w]+)/$',
        ActivationView.as_view(),
        name='registration_activate'),
    url(r'^accounts/register/$',
        RegistrationView.as_view(form_class=PersonUserRegistrationForm),
        name='registration_register'),
    url(r'^accounts/', include('registration.backends.hmac.urls')),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)