Exemplo n.º 1
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$',
Exemplo n.º 2
0
Arquivo: urls.py Projeto: uxx53/bur1
from django.conf.urls import patterns, include, url
from django.contrib import admin
from profiles.views import SignInAndSignUp, LogoutView, AboutView
from chapter04 import views

urlpatterns = patterns(
    '',
 #   url(r'^$', SignInAndSignUp.as_view(template_name='home.html'),name='home'),
    url(r'^about/$', AboutView.as_view(),name='about'),
    url(r'^accounts/logout$', LogoutView.as_view(),name='logout'),
    url(r'^admin/', include(admin.site.urls)),

    # Chapter 4 URLs
    # ----------------------
    url(r'^hello-fn/(?P<name>\w+)/$', views.hello_fn),
    url(r'^hello-fn/$', views.hello_fn),

    url(r'^hello-cl/(?P<name>\w+)/$', views.HelloView.as_view()),
    url(r'^hello-cl/$', views.HelloView.as_view()),

    url(r'^hello-su/(?P<name>\w+)/$', views.SuperVillainView.as_view()),
    url(r'^hello-su/$', views.SuperVillainView.as_view()),

    url(r'^myfeed/$', views.MyFeed.as_view(), name='home'),
    url(r'^public/$', views.PublicPostJSONView.as_view()),
    url(r'^list/$', views.AutorList.as_view(), name='list_notes'),
    url(r'^create/$', views.AutorCreate.as_view(), name='create_note'),
    url(r'^edit/(?P<pk>\d+)/$', views.AutorEdit.as_view(), name='edit_note'),
    url(r'^delete/(?P<pk>\d+)/$',views.AutorDelete.as_view(), name='delete_note'),

)
Exemplo n.º 3
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from profiles.views import SignInAndSignUp, LogoutView, AboutView
from chapter04 import views

urlpatterns = patterns(
    '',
    url(r'^$', SignInAndSignUp.as_view(template_name='home.html'),
        name='home'),
    url(r'^about/$', AboutView.as_view(), name='about'),
    url(r'^accounts/logout$', LogoutView.as_view(), name='logout'),
    url(r'^admin/', include(admin.site.urls)),

    # Chapter 4 URLs
    # ----------------------
    url(r'^hello-fn/(?P<name>\w+)/$', views.hello_fn),
    url(r'^hello-fn/$', views.hello_fn),
    url(r'^hello-cl/(?P<name>\w+)/$', views.HelloView.as_view()),
    url(r'^hello-cl/$', views.HelloView.as_view()),
    url(r'^hello-su/(?P<name>\w+)/$', views.SuperVillainView.as_view()),
    url(r'^hello-su/$', views.SuperVillainView.as_view()),
    url(r'^myfeed/$', views.MyFeed.as_view()),
    url(r'^public/$', views.PublicPostJSONView.as_view()))
Exemplo n.º 4
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'},
Exemplo n.º 5
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)


Exemplo n.º 6
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)),
)
Exemplo n.º 7
0
    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"),
        name="auth_registration_complete",
    ),
Exemplo n.º 8
0
Arquivo: urls.py Projeto: uxx53/bur1
from django.conf.urls import patterns, include, url
from django.contrib import admin
from profiles.views import SignInAndSignUp, LogoutView, AboutView
from chapter04 import views

urlpatterns = patterns(
    '',
    url(r'^$', SignInAndSignUp.as_view(template_name='home.html'),
        name='home'),
    url(r'^about/$', AboutView.as_view(),
        name='about'),
    url(r'^accounts/logout$', LogoutView.as_view(),
        name='logout'),

    url(r'^admin/', include(admin.site.urls)),

     # Chapter 4 URLs
    # ----------------------
    url(r'^hello-fn/(?P<name>\w+)/$', views.hello_fn),
    url(r'^hello-fn/$', views.hello_fn),

    url(r'^hello-cl/(?P<name>\w+)/$', views.HelloView.as_view()),
    url(r'^hello-cl/$', views.HelloView.as_view()),

    url(r'^hello-su/(?P<name>\w+)/$', views.SuperVillainView.as_view()),
    url(r'^hello-su/$', views.SuperVillainView.as_view()),

    url(r'^myfeed/$', views.MyFeed.as_view()),
    url(r'^public/$', views.PublicPostJSONView.as_view())
)
Exemplo n.º 9
0
    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 django.conf.urls import include
from profiles.views import signup, LoginView, HomeView, LogoutView
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
    url(r'^', include('profiles.urls')),
    url(r'^admin/', admin.site.urls, name='admin'),
    url(r'^accounts/', include('django.contrib.auth.urls')),
    url(r'^signup/$', signup, name='signup'),
    url(r'login/$', LoginView.as_view(), name='login'),
    # url(r'home/$', HomeView.as_view(), name='home'),
    url(r'logout/$', LogoutView.as_view(), name='logout')
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

from django.contrib.staticfiles.urls import staticfiles_urlpatterns

urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemplo n.º 10
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"),
)
Exemplo 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"),
)
Exemplo n.º 12
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from profiles.views import SignInAndSignUp, LogoutView, AboutView, DebugTestView
from django.views import generic

urlpatterns = patterns(
    '',
    url(r'^$', SignInAndSignUp.as_view(template_name='home.html'),
        name='home'),
    url(r'^about/$', AboutView.as_view(),
        name='about'),
    url(r'^accounts/logout$', LogoutView.as_view(),
        name='logout'),

    url(r'^admin/', include(admin.site.urls)),

    url(r'^debugtest/$', DebugTestView.as_view()),
)