示例#1
0
class HomePageHandler():
    def __init__(self):
        self._view = HomePageView()

    def getHomePage(self):
        page = self._view.render()
        return page
示例#2
0
from django.conf.urls import patterns, include, url

from django.contrib import admin
admin.autodiscover()

from views import HomePageView, SignUpView, LoginView, LogOutView

urlpatterns = patterns(
    '',
    # Examples:
    # url(r'^$', 'survivalguide.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^$', HomePageView.as_view(),
        name='home'),  # no parenthesis around the functions for views!!!
    url(r'^accounts/register/$', SignUpView.as_view(), name='signup'),
    url(r'^accounts/login/$', LoginView.as_view(), name='login'),
    url(r'^accounts/logout/$', LogOutView.as_view(), name='logout'),
    url(r'^talks/', include('talks.urls', namespace='talks')),
    url(r'^admin/', include(admin.site.urls)),
)
示例#3
0
文件: urls.py 项目: mfoacs/rcwk001
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
# from django.contrib.comments.feeds import LatestCommentFeed

from accounts.views import subscriptionCreate, subscriptionUpdate, subscriptionDelete, invitemany, cancel, profile_detail, ProfileListView, UpdateProfile

from views import HomePageView


urlpatterns = [
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', include(admin.site.urls)),
                       
    # MainMenu Class based Generic Views (TemplateView)
    url(r'^$', HomePageView.as_view(template_name='index.html',queryset='Featured'), name='Featured'),
    url(r'^discover/', HomePageView.as_view(template_name='inner.html',queryset='Discover'), name='Discover'),
    url(r'^about/', HomePageView.as_view(template_name='inner.html',queryset='About'), name='About'),
    url(r'^contact/', HomePageView.as_view(template_name='inner.html',queryset='Contact'), name='Contact'),
    url(r'^gtc/', HomePageView.as_view(template_name='inner.html',queryset='gtc'), name='GTC'),

    url(r'^directory/',ProfileListView.as_view(), name='directory'),

    url(r'^asterisk/', include('asterisk.urls')),
                       
    url(r'^circles/', include('circles.urls')),
                       
    url(r'^invitation/', include('invitation.urls')),

    url(r'^search/', include('haystack.urls')),
    url(r'^newsletter/', include('newsletter.urls')),
示例#4
0
from django.conf.urls import patterns, url

from views import HomePageView

urlpatterns = patterns('',

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

    # Uncomment the next line to enable the admin:
    # (r'^admin/', include(admin.site.urls)),
    url(r'^$', HomePageView.as_view()),
#    url(r'^create/$', create_shorturl, name="create"),
    url(r'^accounts/login/$', 'django.contrib.auth.views.login', name="login"),
    url(r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name="logout"),
)
示例#5
0
from django.conf.urls import url

from . import views
from views import HomePageView

urlpatterns = [
    url(r'^$', HomePageView.as_view(), name='index'),
    #url(r'^$', views.index, name='index'),
    url(r'^servo/$', views.servo_all),
    url(r'^servo/(?P<pk>[0-9]+)/$', views.servo_number),
    url(r'^scarysounds/(?P<sound>\w{1,50})/$', views.scarysounds),
    url(r'^speak/$', views.speak),
]
示例#6
0
from django.conf.urls import url

from views import (
    EnterPageView,
    HomePageView,
    ResumePDFVIew,
)

urlpatterns = [
    url(r'^$', EnterPageView.as_view(), name="enter_page"),
    url(r'^home/$', HomePageView.as_view(), name="external_homepage"),
    url(r'^resume/$', ResumePDFVIew.as_view(), name="resume"),
]
示例#7
0
from django.conf.urls import url
from views import HomePageView

urlpatterns = [url(r"^", HomePageView.as_view(), name="home")]
示例#8
0
from django.conf.urls import patterns, url

from views import HomePageView, AboutUsView, BlogView

urlpatterns = patterns(
    '',
    url(r'^$', HomePageView.as_view(), name="home"),
    url(r'^about-us/$', AboutUsView.as_view(), name="about_us"),
    url(r'blog/$', BlogView.as_view(), name="blog"),
)
示例#9
0
from django.conf.urls import patterns, include, url
from views import HomePageView, ModelView
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns(
    '',
    url(r'^$', HomePageView.as_view(), name='main_page'),
    url(r'^model/$', ModelView.as_view(), name='get_model'),
)
示例#10
0
from django.conf.urls import patterns, include, url
from views import HomePageView
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'lisitra.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url('^$' , HomePageView.as_view(), name='home'),
)

示例#11
0
文件: urls.py 项目: laDanz/BuLiTipp
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.conf.urls import patterns, url

from views import NewsPageView, HomePageView, SpieltagView, SpieltagPrintView, SaisontippView
from views import BestenlisteView, ImpressumView

urlpatterns = patterns('',
	url(r'^$', 'BuLiTippApp.views.home'),
	url(r'^/$', 'BuLiTippApp.views.home'),
	url(r'^news/$', NewsPageView.as_view(), name='news'),
	url(r'^home/$', HomePageView.as_view(), name='home'),
	url(r'^home/(?P<spielzeit_id>\d+)/$', HomePageView.as_view(), name='home'),
	url(r'^home/(?P<spielzeit_id>\d+)/(?P<spieltag_id>\d+)/$', HomePageView.as_view(), name='home'),
	url(r'^spieltag/$', SpieltagView.as_view(), name='spieltag'),
	url(r'^spieltag/(?P<spielzeit_id>\d+)/$', SpieltagView.as_view(), name='spieltag'),
	url(r'^spieltag/(?P<spielzeit_id>\d+)/(?P<spieltag_id>\d+)/$', SpieltagView.as_view(), name='spieltag'),
	url(r'^spieltag/(?P<spielzeit_id>\d+)/(?P<spieltag_id>\d+)/print/$', SpieltagPrintView.as_view(), name='spieltag_print'),
	url(r'^spieltag/(?P<spielzeit_id>\s*)(?P<spieltag_id>\s*)$', SpieltagView.as_view(), name='spieltag'),
	url(r'^spieltag/(?P<spielzeit_id>\d+)/(?P<spieltag_id>\s*)$', SpieltagView.as_view(), name='spieltag'),
	url(r'^bestenliste/$', BestenlisteView.as_view(), name='bestenliste'),
	url(r'^user$', 'BuLiTippApp.views.userform', name='user'),
	url(r'^user/changepw$', 'BuLiTippApp.views.change_pw', name='user_pwchange'),
	url(r'^user/delete$', 'BuLiTippApp.views.delete_account', name='user_delete'),
	url(r'^user/(?P<referer>\S+)$', 'BuLiTippApp.views.userform', name='user'),
	url(r'^impressum$', ImpressumView.as_view(), name='impressum'),
	url(r'^login$', "django.contrib.auth.views.login", name='login'),
	url(r'^spieltag/(?P<spielzeit_id>\d+)/(?P<spieltag_id>\d+)/tipp/$', 'BuLiTippApp.views.tippen', name='tipp'),
	url(r'^spieltag/(?P<spielzeit_id>\d+)/(?P<spieltag_id>\d+)/postk/$', 'BuLiTippApp.views.post_kommentar', name='postk'),
示例#12
0
from django.conf.urls import patterns, include, url

from django.contrib import admin
admin.autodiscover()

from views import HomePageView, SignUpView, LoginView, LogOutView

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'survivalguide.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^$', HomePageView.as_view(), name='home'), # no parenthesis around the functions for views!!!
    url(r'^accounts/register/$', SignUpView.as_view(), name='signup'),
    url(r'^accounts/login/$', LoginView.as_view(), name='login'),
    url(r'^accounts/logout/$', LogOutView.as_view(), name='logout'),
    url(r'^talks/', include('talks.urls', namespace='talks')),
    url(r'^admin/', include(admin.site.urls)),
)
示例#13
0
 def __init__(self):
     self._view = HomePageView()
示例#14
0
from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from views import HomePageView, SaveTweetView


urlpatterns = patterns('twitter_face.views',
    url(r'^$', login_required(HomePageView.as_view()), name='home'),
    url(r'^tweet/save/$', login_required(SaveTweetView.as_view()), name='save_tweet'),
)
示例#15
0
from django.conf.urls import patterns, include, url
from views import HomePageView
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
    '',
    # Examples:
    # url(r'^$', 'lisitra.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url('^$', HomePageView.as_view(), name='home'),
)
示例#16
0
from django.conf.urls import patterns, url
from views import HomePageView, PayView, ShipView, SettingsView
from views import EditProduct, CreateProduct
from views import FinishedOrderList
# Uncomment the next two lines to enable the admin:
#from django.contrib import admin
#admin.autodiscover()

urlpatterns = patterns(
    '',
    url(r'^$', HomePageView.as_view(), name='shop-home'),
    url(r'^paid/', PayView.as_view(), name='order-paid'),
    url(r'^ship/', ShipView.as_view(), name='order-ship'),
    url(r'^product/(?P<pk>\d+)/edit/',
        EditProduct.as_view(),
        name='product-edit'),
    url(r'^product/add/(?P<content_type_id>\d+)',
        CreateProduct.as_view(),
        name='product-add'),
    url(r'^order/', FinishedOrderList.as_view(), name='order-list'),
    url(r'^settings/', SettingsView.as_view(), name='shop-settings'),
)
示例#17
0
from django.conf.urls import patterns, url

from views import HomePageView, AboutUsView, BlogView, MediaView

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

    url(r'^about-us/$', AboutUsView.as_view(), name="about_us"),

    url(r'^blog/$', BlogView.as_view(), name="blog"),

    url(r'^media/$', MediaView.as_view(), name="media"),
)
示例#18
0
from django.conf.urls import patterns, include, url
from views import HomePageView, ModelView
from django.contrib import admin
admin.autodiscover()


urlpatterns = patterns('',
    url(r'^$', HomePageView.as_view(), name='main_page'),
    url(r'^model/$', ModelView.as_view(), name='get_model'),
)
示例#19
0
文件: urls.py 项目: AMHZR/appartments
__author__ = 'aamirhussain'
from django.conf.urls import patterns, include, url
from views import HomePageView

urlpatterns = patterns('',
    url(r'^$', HomePageView.as_view(), name='HomePage'),
)
示例#20
0
"""multi_language URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.8/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. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin
from views import HomePageView, SetLangView

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^i18n/', include('django.conf.urls.i18n')),
    url(r'^$', HomePageView.as_view(),name="about_page"),
    url(r'^set_lang/(?P<lang_code>\w+)/$', SetLangView.as_view(),name="set_lang"),
    
]