Ejemplo n.º 1
0
    DocumentListView, DocumentCreateView, UpdateDocumentView, DocumentDetailView, DocumentDeleteView, 
    download_document)
from django.conf.urls.static import static
from django.conf import settings


app_name = 'common'


urlpatterns = [
    path('', HomeView.as_view(), name='home'),
    path('login/', LoginView.as_view(), name='login'),
    path('forgot-password/', ForgotPasswordView.as_view(), name='forgot_password'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('change-password/', ChangePasswordView.as_view(), name='change_password'),
    path('profile/', ProfileView.as_view(), name='profile'),

    # User views
    path('users/list/', UsersListView.as_view(), name='users_list'),
    path('users/create/', CreateUserView.as_view(), name='create_user'),
    path('users/<int:pk>/edit/', UpdateUserView.as_view(), name="edit_user"),
    path('users/<int:pk>/view/', UserDetailView.as_view(), name='view_user'),
    path('users/<int:pk>/delete/', UserDeleteView.as_view(), name='remove_user'),

    path(
        'password-reset/', PasswordResetView.as_view(), name='password_reset'),
    path('password-reset/done/', auth_views.PasswordResetDoneView.as_view(), name='password_reset_done'),
    path(
        'reset/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
    path('reset/done/', auth_views.PasswordResetCompleteView.as_view(), name='password_reset_complete'),
Ejemplo n.º 2
0
    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 path
from django.views.generic.base import TemplateView, RedirectView

from common.views import CreateUserView, MyLoginView, ProfileView
from resume.views import ResumeListView, ResumeView
from vacancy.views import VacancyListView, VacancyView

urlpatterns = [
    path("admin/", admin.site.urls),
    path("home", ProfileView.as_view()),
    path("resume/new", ResumeView.as_view()),
    path("vacancy/new", VacancyView.as_view()),
    path("resumes", ResumeListView.as_view()),
    path("vacancies", VacancyListView.as_view()),
    path("", TemplateView.as_view(template_name="common/menu.html")),
    path("login", MyLoginView.as_view()),
    path("signup", CreateUserView.as_view()),
    path('login/', RedirectView.as_view(url='/login')),
    path('signup/', RedirectView.as_view(url='/signup'))
]
Ejemplo n.º 3
0
from django.contrib.auth.decorators import login_required
from django.conf import settings
from django.views.generic import TemplateView

from common.views import LoginRegisterView, LogoutView, AjaxLoginRegisterView, ProfileView, ContactUsView
from common.decorators import login_redirect

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'django_andblog.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^pages/', include("pages.urls", namespace='pages')),
    (r'^ckeditor/', include('ckeditor.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url('^contact-us/$', ContactUsView.as_view(), name='contact'),
    url('^account/profile/$', ProfileView.as_view(), name='profile'),
    url('^account/(?P<username>[\w]+)/$', ProfileView.as_view(), name='profile_with_name'),
    url('^logout/$', login_required(LogoutView.as_view()), name='logout'),
    url('^login/$', login_redirect(LoginRegisterView.as_view()), name='regular_login'),
    url('^login/js/$', login_redirect(AjaxLoginRegisterView.as_view()), name='popup_login'),
    url('^social/', include("social.apps.django_app.urls", namespace="social")),
    url(r'^', include("blog.urls", namespace='blog')),
)


if settings.DEBUG:
    # static files (images, css, javascript, etc.)
    urlpatterns += patterns('',
        (r'^media/(?P<path>.*)$', 'django.views.static.serve', {
        'document_root': settings.MEDIA_ROOT}))
Ejemplo n.º 4
0
from django.conf import settings
from django.views.generic import TemplateView

from common.views import LoginRegisterView, LogoutView, AjaxLoginRegisterView, ProfileView, ContactUsView
from common.decorators import login_redirect

urlpatterns = patterns(
    '',
    # Examples:
    # url(r'^$', 'django_andblog.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^pages/', include("pages.urls", namespace='pages')),
    (r'^ckeditor/', include('ckeditor.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url('^contact-us/$', ContactUsView.as_view(), name='contact'),
    url('^account/profile/$', ProfileView.as_view(), name='profile'),
    url('^account/(?P<username>[\w]+)/$',
        ProfileView.as_view(),
        name='profile_with_name'),
    url('^logout/$', login_required(LogoutView.as_view()), name='logout'),
    url('^login/$',
        login_redirect(LoginRegisterView.as_view()),
        name='regular_login'),
    url('^login/js/$',
        login_redirect(AjaxLoginRegisterView.as_view()),
        name='popup_login'),
    url('^social/', include("social.apps.django_app.urls",
                            namespace="social")),
    url(r'^', include("blog.urls", namespace='blog')),
)
Ejemplo n.º 5
0
from django.conf.urls.defaults import patterns, include, url

from common.views import IndexView, ProfileView

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

urlpatterns = patterns('',
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^profile/$', ProfileView.as_view(), name='profile'),
    url(r'', include('banana_py.urls')),
    # Examples:
    # url(r'^$', 'mailchimp_demo.views.home', name='home'),
    # url(r'^mailchimp_demo/', include('mailchimp_demo.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # url(r'^admin/', include(admin.site.urls)),
)
Ejemplo n.º 6
0
)

app_name = "common"


urlpatterns = [
    path("", landing_page, name="landing_page"),
    path("dashboard/", HomeView.as_view(), name="dashboard"),
    path("login/", CompanyLoginView.as_view(), name="login"),
    #     path('login/', LoginView.as_view(), name='login'),
    path("register/", RegistrationView.as_view(), name="register"),
    path("auth/domain/", check_sub_domain, name="check_domain"),
    path("forgot-password/", ForgotPasswordView.as_view(), name="forgot_password"),
    path("logout/", LogoutView.as_view(), name="logout"),
    path("change-password/", ChangePasswordView.as_view(), name="change_password"),
    path("profile/", ProfileView.as_view(), name="profile"),
    # User views
    path("users/list/", UsersListView.as_view(), name="users_list"),
    path("users/create/", CreateUserView.as_view(), name="create_user"),
    path("users/<int:pk>/edit/", UpdateUserView.as_view(), name="edit_user"),
    path("users/<int:pk>/view/", UserDetailView.as_view(), name="view_user"),
    path("users/<int:pk>/delete/", UserDeleteView.as_view(), name="remove_user"),
    path("password-reset/", PasswordResetView.as_view(), name="password_reset"),
    path(
        "password-reset/done/",
        auth_views.PasswordResetDoneView.as_view(),
        name="password_reset_done",
    ),
    path(
        "reset/<uidb64>/<token>/",
        auth_views.PasswordResetConfirmView.as_view(),
Ejemplo n.º 7
0
from django.conf.urls import patterns, include, url
from django.conf import settings
from common.views import HomeView, ProfileView
from screenwriter.views import ScreenwriterView
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    url(r'^$', HomeView.as_view(), name='home'),
    url(r'^screenplay/$', ScreenwriterView.as_view()),
    url(r'^screenplay/(?P<screenplay_slug>[-\w]+)/$', ScreenwriterView.as_view()),


    # url(r'^blog/', include('blog.urls')),
    #url(r'^accounts/', include('registration.backends.default.urls')),
    (r'^accounts/login/$', 'django.contrib.auth.views.login'),
    (r'^accounts/profile/$', ProfileView.as_view()),
    (r'^grappelli/', include('grappelli.urls')),
    url(r'^admin/', include(admin.site.urls)),
)


urlpatterns += patterns("",
    url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True }),
)
Ejemplo n.º 8
0
from django.conf.urls.defaults import patterns, include, url

from common.views import IndexView, ProfileView

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

urlpatterns = patterns(
    '',
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^profile/$', ProfileView.as_view(), name='profile'),
    url(r'', include('banana_py.urls')),
    # Examples:
    # url(r'^$', 'mailchimp_demo.views.home', name='home'),
    # url(r'^mailchimp_demo/', include('mailchimp_demo.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # url(r'^admin/', include(admin.site.urls)),
)