Ejemplo n.º 1
0
import two_factor.views
from two_factor.gateways.twilio.urls import urlpatterns as two_factor_twilio_urls
from django.views.generic.base import RedirectView


class Frame2FALoginView(two_factor.views.LoginView):
    def get(self, *args, **kwargs):
        self.template_name = 'two_factor/core/login_frame.html'  # ¡(X_X)¡
        return super(Frame2FALoginView, self).get(*args, **kwargs)


urlpatterns = [

    # old login form (TODO: disable later after 2FA tested in production)
    url(r'^login.fallbak/$',
        LoginView.as_view(), {'template_name': 'registration/login.html'},
        name='auth_login_fallback'),

    # django-two-factor-auth
    url(r'^login/', include(two_factor_urls)),
    url(r'^login-frame/', Frame2FALoginView.as_view()),
    url(r'^login/', include(two_factor_twilio_urls)),
    url(r'^login/',
        RedirectView.as_view(url='/login/account/login/'),
        name='auth_login'),
    url(r'^logout/$',
        auth_views.logout, {'template_name': 'registration/logout.html'},
        name='auth_logout'),
    url(r'^password/change/$',
        auth_views.password_change,
        {'template_name': 'registration/password_changeform.html'},
Ejemplo n.º 2
0
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from django.contrib.auth import views

from profiles.views import (RegistrationView, LoginView, LogoutView,
                            ProfileDetailView, ProfileUpdateView,
                            ProfileChannelsGraphView, ProfileArgumentsView,
                            ProfilePremisesView, ProfileFallaciesView)

urlpatterns = patterns(
    '',
    url(r'^login/$',
        LoginView.as_view(template_name="auth/login.html"),
        name='auth_login'),
    url(r'^logout/$', LogoutView.as_view(), name='auth_logout'),
    url(r'^auth/profile$',
        ProfileUpdateView.as_view(template_name="auth/update.html"),
        name='auth_profile_update'),
    url(r'^register/$',
        RegistrationView.as_view(template_name="auth/register.html"),
        name='auth_registration'),
    url(r'^complete/$',
        TemplateView.as_view(template_name="auth/complete.html"),
        name='auth_registration_complete'),
    url(r'^users/(?P<username>[\w\._-]+)$',
        ProfileDetailView.as_view(template_name="auth/profile.html"),
        name='auth_profile'),
    url(r'^users/(?P<username>[\w\._-]+)/arguments$',
        ProfileArgumentsView.as_view(),
        name='auth_profile_arguments'),
    url(r'^users/(?P<username>[\w\._-]+)/premises$',
Ejemplo n.º 3
0
from django.conf.urls import url
from django.views.generic import TemplateView
from django.contrib.auth import views

from profiles.views import (RegistrationView, LoginView, LogoutView,
                            ProfileDetailView, ProfileUpdateView, ProfileChannelsGraphView, ProfileResolutionsView,
                            ProfileDeclarationsView, ProfileFallaciesView, SpeakerDetailView)


urlpatterns = [
    url(r'^login/$', LoginView.as_view(template_name="auth/login.html"), name='auth_login'),
    url(r'^logout/$', LogoutView.as_view(), name='auth_logout'),
    url(r'^auth/profile$', ProfileUpdateView.as_view(
        template_name="auth/update.html"), name='auth_profile_update'),
    url(r'^register/$', RegistrationView.as_view(
        template_name="auth/register.html"), name='auth_registration'),
    url(r'^complete/$', TemplateView.as_view(
        template_name="auth/complete.html"), name='auth_registration_complete'),
    url(r'^users/(?P<username>[\w\._-]+)$', ProfileDetailView.as_view(
        template_name="auth/profile.html"), name='auth_profile'),
    url(r'^users/(?P<username>[\w\._-]+)/resolutions$',
        ProfileResolutionsView.as_view(), name='auth_profile_resolutions'),
    url(r'^users/(?P<username>[\w\._-]+)/declarations$',
        ProfileDeclarationsView.as_view(), name='auth_profile_declarations'),
    url(r'^users/(?P<username>[\w\._-]+)/fallacies$',
        ProfileFallaciesView.as_view(), name='auth_profile_fallacies'),
    url(r'^users/(?P<username>[\w\._-]+)/channels.json$',
        ProfileChannelsGraphView.as_view(), name='auth_profile_channels'),
    url(r'^password_reset/$', views.password_reset,
        {'template_name': 'auth/password_reset_form.html',
        'email_template_name': 'auth/password_reset_email.html'},
Ejemplo n.º 4
0
from django.conf.urls import url
from django.conf import settings
from django.conf.urls.static import static

# from django.urls import reverse_lazy

from profiles.views import (
    MyProfile,
    LoginView,
    LogoutView,
    ProfileListView,
    ProfileView,
    ShowInterest
)

urlpatterns = [
    url(r'^$', LoginView.as_view()),
    url(r'^admin/', admin.site.urls),
    url(r'^profiles/me/$', MyProfile.as_view()),
    url(r'^profiles/(?P<id>\d+)/$', ProfileView.as_view()),
    url(r'^profiles/$', ProfileListView.as_view()),
    url(r'^profiles/(?P<id>\d+)/show-interest$', ShowInterest.as_view()),
    url(r'^login/$', LoginView.as_view()),
    url(r'^logout/$', LogoutView.as_view()),
]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)


Ejemplo n.º 5
0
"""
from django.contrib import admin
from profiles.views import EditProfileView, LoginView, SignupView, StartPageView
from market.views import HomePageView, LogoutView, \
    CategoryAddView, CategoryDeleteView, \
    CategoryEditView, CategoryUpdateView, \
    CategoryProductsView, ProductAddView, \
    ProductDeleteView, ProductEditView, \
    SearchView, SingleCategoryView, SingleStoreView, \
    CartView, CartEditView, CheckoutView, OrderHistory, \
    OrderReceiptsView
from django.urls import path

urlpatterns = [
    path('', StartPageView.as_view(), name='start_view'),
    path('login/', LoginView.as_view(), name='login_view'),
    path('signup/', SignupView.as_view(), name='signup_view'),
    path('homepage/', HomePageView.as_view(), name='homepage_view'),
    path('homepage/logout', LogoutView.as_view(), name='logout_view'),
    path('homepage/edit', EditProfileView.as_view(), name='edit_profile_view'),
    path('homepage/order/history',
         OrderHistory.as_view(),
         name='order_history_view'),
    path('homepage/order/receipts',
         OrderReceiptsView.as_view(),
         name='order_receipts_view'),
    path('homepage/search', SearchView.as_view(), name='search_view'),
    path('homepage/cart', CartView.as_view(), name='cart_view'),
    path('homepage/cart/edit/<int:product_id>',
         CartEditView.as_view(),
         name='cart_edit_view'),
Ejemplo n.º 6
0
    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 core.views import HomepageView, ContactView, AboutView, MeetTheTeam, OurPartners, Partnerships, BecomeAPartner, WhoWeAre, HowItWorks
from profiles.views import LoginView, RegistrationView, RegistrationComplete, ActivationComplete, profile_update
from profiles.forms import PimpUserRegistrationForm

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', HomepageView.as_view(), name="index"),
    url(r'^login/', LoginView.as_view(), name="login"),
    url(r'^contact/', ContactView.as_view(), name="contact"),
    url(r'^about/', AboutView.as_view(), name="about"),
    url(r'^meet-the-team', MeetTheTeam.as_view(), name="team"),
    url(r'^who-we-are/', WhoWeAre.as_view(), name="who_we_are"),
    url(r'^how-it-works/', HowItWorks.as_view(), name="how_it_works"),
    url(r'^partnerships/', Partnerships.as_view(), name="partenrships"),
    url(r'^become-a-partner/',
        BecomeAPartner.as_view(),
        name="become_a_partner"),
    url(r'^our-partners/', OurPartners.as_view(), name="our_partners"),
    url(r'^accounts/register/',
        RegistrationView.as_view(form_class=PimpUserRegistrationForm),
        name='registration_register'),
    url(r'^accounts/registration-complete/',
        RegistrationComplete.as_view(),
Ejemplo n.º 7
0
from rest_framework import routers
from common.views import APIRootView
from profiles.views import (UserViewSet, LoginView, LogoutView,
                            PasswordResetView, PasswordResetCompleteView,
                            MedicalProfileViewSet)


class CustomRouter(routers.SimpleRouter):
    """Make trailing slash optional"""
    def __init__(self, *args, **kwargs):
        super(CustomRouter, self).__init__(*args, **kwargs)
        self.trailing_slash = '/?'


router = CustomRouter()

router.register(r'users', UserViewSet)
router.register(r'profiles', MedicalProfileViewSet)
# NOTE: hacky way to represent nested current/user items
# router.register(r'users/(?P<user_id>[\d]+|me)/profiles', ProfilesViewSet)

urlpatterns = patterns(
    url(r'^/?$', APIRootView.as_view(), name="root"),
    url(r'^login/?$', LoginView.as_view(), name='login'),
    url(r'^logout/?$', LogoutView.as_view(), name='logout'),
    url(r'^password_reset/?$', PasswordResetView.as_view()),
    url(r'^password_reset_complete/?$', PasswordResetCompleteView.as_view()),
    # url(r'^check_version', CheckVersionView.as_view()),
    url(r'^', include(router.urls)),
)
Ejemplo n.º 8
0
    RegistrationView,
    LoginView,
    LogoutView,
    ProfileDetailView,
    ProfileUpdateView,
    ProfileChannelsGraphView,
    ProfileResolutionsView,
    ProfileDeclarationsView,
    ProfileFallaciesView,
    SpeakerDetailView,
)


urlpatterns = [
    path(
        "login/", LoginView.as_view(template_name="auth/login.html"), name="auth_login"
    ),
    path("logout/", LogoutView.as_view(), name="auth_logout"),
    path(
        "auth/profile",
        ProfileUpdateView.as_view(template_name="auth/update.html"),
        name="auth_profile_update",
    ),
    path(
        "register/",
        RegistrationView.as_view(template_name="auth/register.html"),
        name="auth_registration",
    ),
    path(
        "complete/",
        TemplateView.as_view(template_name="auth/complete.html"),
Ejemplo n.º 9
0
from django.conf.urls import patterns, url

from profiles.views import RegistrationView, LoginView, LogoutView, EditView, DetailView

urlpatterns = patterns(
    "",
    url(r"^register/$", RegistrationView.as_view(), name="register"),
    url(r"^login/$", LoginView.as_view(), name="login"),
    url(r"^logout/$", LogoutView.as_view(), name="logout"),
    url(r"^edit/(?P<pk>\w+)/$", EditView.as_view(), name="edit"),
    url(r"^detail/(?P<publisher>\w+)/$", DetailView.as_view(), name="detail"),
)
Ejemplo n.º 10
0
"""
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth.views import LogoutView
from django.urls import path, include

from profiles import views
from profiles.views import LoginView, Signup, verify
from .view import home_view

urlpatterns = [
    path('admin/', admin.site.urls),
    path('signup/', Signup.as_view(), name='signup'),
    path('verify/', verify, name='verify'),
    path('reset/login/', LoginView.as_view(), name='login'),
    path('logout/', LogoutView.as_view(), name='logout'),
    # reset password
    path('reset/', include('django.contrib.auth.urls')),  # password_reset/
    path('activate/<slug:uidb64>/<slug:token>/',
         views.activate,
         name='activate'),
    path('', home_view, name='home-view'),
    path('profiles/', include('profiles.urls', namespace='profiles')),
    path('posts/', include('posts.urls', namespace='posts')),
]

# after adding the two lines below addresses run  collect static in the command line
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Ejemplo n.º 11
0
from django.conf.urls import patterns, url

from profiles.views import LoginView, RegisterView, LogoutView, ProfileDetailView, PasswordChangeView, ProfileChangeView


# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('profiles.views',
    url('^login$', LoginView.as_view(), name="login"),
    url('^register$', RegisterView.as_view(), name="register"),
    url('^logout$', LogoutView.as_view(), name="logout"),
    url('^profile$', ProfileDetailView.as_view(), name="profile"),
    url('^change-password$', PasswordChangeView.as_view(), name="password_change"),
    url('^update-profile$', ProfileChangeView.as_view(), name="profile_change"),
)
Ejemplo n.º 12
0
"""pimpmycause URL Configuration

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
from django.contrib import admin

from core.views import HomepageView, ContactView
from profiles.views import LoginView, RegistrationView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', HomepageView.as_view(), name="index"),
    url(r'^login', LoginView.as_view(), name="login"),
    url(r'^register', RegistrationView.as_view(), name="register"),
    url(r'^contact', ContactView.as_view(), name="contact"),

]
Ejemplo n.º 13
0
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from profiles.views import (RegistrationView, LoginView, LogoutView,
                            ProfileDetailView, ProfileUpdateView)


urlpatterns = patterns('',
    url(r'^login/$', LoginView.as_view(template_name="auth/login.html"), name='auth_login'),
    url(r'^logout/$', LogoutView.as_view(), name='auth_logout'),
    url(r'^auth/profile$',ProfileUpdateView.as_view(
        template_name="auth/update.html"), name='auth_profile_update'),
    url(r'^register/$', RegistrationView.as_view(
        template_name="auth/register.html"), name='auth_registration'),
    url(r'^complete/$', TemplateView.as_view(
        template_name="auth/complete.html"), name='auth_registration_complete'),
    url(r'^users/(?P<username>[\w\._-]+)$', ProfileDetailView.as_view(
        template_name="auth/profile.html"), name='auth_profile'),

)