Пример #1
0
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
PROJECT_ROOTDIR = getattr(settings, 'PROJECT_ROOTDIR', '')

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'dj15.views.home', name='home'),
    # url(r'^dj15/', include('dj15.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)),
    url(r'^about/', AboutView.as_view(), name="about-view"),

    #url(r'^dynamic/(?P<model_name>.*)/add', AddSomething.as_view(), name="dynamic-crud"),

    url(r'^gallery/add', CreateGallery.as_view(), name="galleries-add"),
    url(r'^gallery/update', UpdateGallery.as_view(), name="galleries-update"),
    url(r'^gallery/', GalleryView.as_view(), name="galleries-view"),
    url(r'^galleries/(?P<pk>\d+)/$', GalleryDetailView.as_view(), name="gallery-detail"),
    
    url(r'^categories/add', CreateCategory.as_view(), name="categories-add"),
    url(r'^categories/update', UpdateGallery.as_view(), name="categories-update"),
    url(r'^categories/', CategoryView.as_view(), name="categories-view"),
    url(r'^categories/(?P<pk>\d+)/$', CategoryDetailView.as_view(), name="category-detail"),


    #(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root':'%s/static/' % (PROJECT_ROOTDIR), 'show_indexes': True}),
Пример #2
0
"""intro URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
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 path

from web.views import HomeView, AboutView

urlpatterns = [
    path('', HomeView.as_view(), name="home"),
    path('about/', AboutView.as_view(), name="about" ),
    path('admin/', admin.site.urls),
]
Пример #3
0
urlpatterns = [
    path('i18n/', include('django.conf.urls.i18n')),
]

urlpatterns += i18n_patterns(
    path('reservation/', include('make_queue.urls')),
    path('adminpanel/', AdminPanelView.as_view(), name='adminpanel'),
    path('admin/', admin.site.urls),
    path('', IndexView.as_view(), name='front-page'),
    path('login/',
         RedirectView.as_view(url='/login/dataporten/'),
         name='login'),
    path('logout/', Logout.as_view(), name='logout'),
    re_path(r'^complete/(?P<backend>[^/]+){0}$'.format(extra), login_wrapper),
    path('', include('social_django.urls', namespace='social')),
    path('news/', include('news.urls')),
    path('contentbox/', include('contentbox.urls')),
    path('media/<path:path>', serve,
         {'document_root': settings.MEDIA_ROOT}),  # local only, nginx in prod
    path('checkin/', include('checkin.urls')),
    path('about/', AboutView.as_view(), name='about'),
    ContentBox.url('makerspace'),
    ContentBox.url('cookies'),
    ContentBox.url('rules'),
    path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'),
    prefix_default_language=False,
)

handler404 = View404.as_view()
Пример #4
0
from web.views import SightingsView
from web.views import SightingView
from web.views import SightQuestionView
from web.views import UserSignupView
from web.views import UserLoginView
from web.views import UserLogoutView
from web.views import UserProfileView
from web.views import InfoView
from web.views import ContactView
from web.views import AboutView
from web.views import TeamView


urlpatterns = [
    url(r'^$', HomePageView.as_view(), name='home'),

    url(r'^new_sighting/$', NewSightingView.new_sighting, name='new_sighting'),
    url(r'^sightings/$', SightingsView.as_view(), name='sightings'),
    url(r'^sighting/(?P<sighting_id>[0-9]+)/$', SightingView.sighting_view, name="sighting_id"),
    url(r'^sight_question/$', SightQuestionView.sight_question, name='sight_question'),

    url(r'^signup/$', UserSignupView.signup_user_view, name='signup'),
    url(r'^login/$', UserLoginView.login_view, name='login'),
    url(r'^logout/$', UserLogoutView.logout_view, name='logout'),
    url(r'^user_profile/$', UserProfileView.edit_profile, name='user_profile'),

    url(r'^info/$', InfoView.as_view(), name='info'),
    url(r'^contact/$', ContactView.contact_view, name='contact'),
    url(r'^about/$', AboutView.as_view(), name='about'),
    url(r'^team/$', TeamView.as_view(), name='team'),
]
Пример #5
0
from web.views import SightingsView
from web.views import SightingView
from web.views import SightQuestionView
from web.views import UserSignupView
from web.views import UserLoginView
from web.views import UserLogoutView
from web.views import UserProfileView
from web.views import InfoView
from web.views import ContactView
from web.views import AboutView
from web.views import TeamView

urlpatterns = [
    url(r'^$', HomePageView.as_view(), name='home'),
    url(r'^new_sighting/$', NewSightingView.new_sighting, name='new_sighting'),
    url(r'^sightings/$', SightingsView.as_view(), name='sightings'),
    url(r'^sighting/(?P<sighting_id>[0-9]+)/$',
        SightingView.sighting_view,
        name="sighting_id"),
    url(r'^sight_question/$',
        SightQuestionView.sight_question,
        name='sight_question'),
    url(r'^signup/$', UserSignupView.signup_user_view, name='signup'),
    url(r'^login/$', UserLoginView.login_view, name='login'),
    url(r'^logout/$', UserLogoutView.logout_view, name='logout'),
    url(r'^user_profile/$', UserProfileView.edit_profile, name='user_profile'),
    url(r'^info/$', InfoView.as_view(), name='info'),
    url(r'^contact/$', ContactView.contact_view, name='contact'),
    url(r'^about/$', AboutView.as_view(), name='about'),
    url(r'^team/$', TeamView.as_view(), name='team'),
]
Пример #6
0
    url(r'^logout/$', 'logout', name="web_logout"),
    url(r'^sina/login$', 'login_by_sina', name="web_login_by_sina"),
    url(r'^sina/auth/$', 'auth_by_sina', name="web_auth_by_sina"),
    url(r'^sina/bind/$', 'bind_sina', name="web_bind_sina"),
    url(r'^sina/unbind/$', 'unbind_sina', name="web_unbind_sina"),
    url(r'^taobao/login/$', 'login_by_taobao', name='web_login_by_taobao'),
    url(r'^taobao/bind/$', 'bind_taobao', name="web_bind_taobao"),
    url(r'^taobao/unbind/$', 'unbind_taobao', name="web_unbind_taobao"),
    url(r'^taobao/auth/$', 'auth_by_taobao', name="web_auth_by_taobao"),
    url(r'^reset_password/$', 'reset_password', name='web_reset_password'),

    url(r'^account/', include('web.urls.account')),
    url(r'^u/', include('web.urls.user')),
)


urlpatterns += patterns(
    '',
    url(r'^share/', include('web.urls.share_sns')),
)

urlpatterns += patterns(
    'web.views.search',
    url(r'^search/$', 'search', name='web_search')
)

urlpatterns += patterns(
    'web.views',
    url(r'^agreement/$', Agreement.as_view(), name="web_agreement"),
    url(r'^about/$', AboutView.as_view(), name="web_about"),
)
Пример #7
0
    patterns,
    url,
)
from django.conf.urls.static import static
from django.contrib import admin

from login.views import RegisterCreateView
from web.views import AboutView
from web.views import SettingsView
from web.views import DBRebuildView

admin.autodiscover()

urlpatterns = patterns(
    '',
    url(regex=r'^$', view=AboutView.as_view(), name='project.home'),
    url(regex=r'^', view=include('login.urls')),
    url(regex=r'^rebuilddb/',
        view=DBRebuildView.as_view(),
        name='project.settings.rebuilddb'),
    url(regex=r'^admin/', view=include(admin.site.urls)),
    url(regex=r'^settings/$',
        view=SettingsView.as_view(),
        name='project.settings'),
    url(regex=r'^web/', view=include('web.urls')),
    url(regex=r'^accounts/register/$',
        view=RegisterCreateView.as_view(),
        name='register'),
)

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Пример #8
0
from django.conf.urls.static import static
from django.contrib import admin

from login.views import RegisterCreateView
from web.views import AboutView
from web.views import SettingsView
from web.views import DBRebuildView


admin.autodiscover()


urlpatterns = patterns(
    '',
    url(regex=r'^$',
        view=AboutView.as_view(),
        name='project.home'
        ),
    url(regex=r'^',
        view=include('login.urls')
        ),
    url(regex=r'^rebuilddb/',
        view=DBRebuildView.as_view(),
        name='project.settings.rebuilddb'
        ),
    url(regex=r'^admin/',
        view=include(admin.site.urls)
        ),
    url(regex=r'^settings/$',
        view=SettingsView.as_view(),
        name='project.settings'