Esempio n. 1
0
File: urls.py Progetto: yesic/Follme
    url(r'^comment/(?P<_id>\d+)/reply/$',
        mvc.views.comment_reply,
        name='comment_reply'),  #回复评论
    url(r'^comment/(?P<_id>\d+)/(?P<_page_index>\d+)/delete/$',
        mvc.views.comment_delete,
        name='tmitter-mvc-views-comment_delete'),  #删除评论
    url(r'^friend/add/(?P<_username>[a-zA-Z\-_\d]+)/$',
        mvc.views.friend_add,
        name="tmitter-mvc-views-friend_add"),
    url(r'^friend/remove/(?P<_username>[a-zA-Z\-_\d]+)/$',
        mvc.views.friend_remove,
        name="tmitter-mvc-views-friend_remove"),
    url(r'^api/note/add/', mvc.views.api_note_add),
    # Uncomment this for admin:
    #url(r'^admin/(.*)',admin.site.urls),
    url(r'^admin/', admin.site.urls),
    url(r'^feed/rss/(?P<url>.*)/$', django.contrib.syndication.views.Feed,
        {'feed_dict': rss_feeds}),
    url(r'^user/feed/rss/(?P<url>.*)/$', django.contrib.syndication.views.Feed,
        {'feed_dict': rss_user_feeds}),
    #    url(r'^statics/(?P<path>.*)$', django.views.static.serve, {'document_root': settings.STATIC_ROOT}),
    url(r'^i18n/', django.conf.urls.i18n.i18n_patterns),
    url(r'^home/$', mvc.views.test_ajax),
    url(r'^load_more_data/(?P<type>\d+)/',
        mvc.views.load_more_data,
        name='load_more_data'),  #加载更多的数据
    url(r'^range/$', mvc.views.rp_range, name='rp_range'),  #rp榜
    url('^recommend/$', mvc.views.recommend, name='recommend'),  #根据标签推荐好友
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + static(
    settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Esempio n. 2
0
def static_lazy(path):
    from django.templatetags.static import static
    from django.utils.functional import lazy

    return lazy(lambda: static(path), str)()
Esempio n. 3
0
from twostream.decorators import anonymous_view
sitemaps = OrderedDict([
        ("bills_current", bill.views.sitemap_current),
        #("bills_archive", bill.views.sitemap_archive), # takes too long to load
        ("people_current", person.views.sitemap_current),
        ("people_archive", person.views.sitemap_archive),
        ("districts", person.views.sitemap_districts),
        ("committees", committee.views.sitemap),
        ("votes_current", vote.views.sitemap_current),
        #("votes_archive", vote.views.sitemap_archive), # takes too long to load
	])
urlpatterns += patterns('',
    (r'^sitemap\.xml$', anonymous_view(sitemap_index_view), {'sitemaps': sitemaps, 'sitemap_url_name': 'sitemap_pages'}),
   url(r'^sitemap-(?P<section>.+)\.xml$', anonymous_view(sitemap_map_view), {'sitemaps': sitemaps}, name='sitemap_pages'),
)

# API access points
from website.api import v1_api
urlpatterns += patterns('',
    (r'^api/', include(v1_api.urls)),
)

if settings.DEBUG:
    # serve /static during debugging
    from django.contrib.staticfiles.urls import staticfiles_urlpatterns
    urlpatterns += staticfiles_urlpatterns()
 
    # serve /data during debugging
    from django.conf.urls.static import static
    urlpatterns += static("/data", document_root="data")
Esempio n. 4
0
File: urls.py Progetto: ximepa/uawp
# -*- coding: utf-8 -*-
__author__ = 'ximepa'
from django.views.static import *
from django.conf import settings
from django.conf.urls.static import static
from django.views.generic import TemplateView
from django.conf.urls import patterns, include, url
urlpatterns = patterns('feed_back.views',

    url(r'^thanks/$', TemplateView.as_view(template_name='feedback/feedback_success.html')),
    url(r'^$', 'feedback', name='feedback'),

) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Esempio n. 5
0
        name="review_tea"),
    url(r'^(?P<category>[\w-]+)/(?P<slug>[\w-]+)/review/thanks/$',
        review_tea_thanks,
        name="review_tea_thanks"),
    url(r'^(?P<y>[\w-]+)/(?P<z>[\w-]+)/(?P<slug>[\w-]+)/$',
        _finder,
        name="finder"),
    url(r'^(?P<x>[\w-]+)/(?P<y>[\w-]+)/(?P<z>[\w-]+)/(?P<slug>[\w-]+)/$',
        _finder,
        name="finder"),

    # urls for the pages
    url(r'^(?P<x>[\w-]+)/(?P<y>[\w-]+)/(?P<z>[\w-]+)/(?P<slug>[\w-]+)/$',
        page,
        name="sub_sub_sub_page"),
    url(r'^(?P<x>[\w-]+)/(?P<y>[\w-]+)/(?P<slug>[\w-]+)/$',
        page,
        name="sub_sub_page"),
    url(r'^(?P<y>[\w-]+)/(?P<slug>[\w-]+)/$', page, name="sub_page"),
    url(r'^(?P<slug>[\w-]+)/$', page, name="page"),
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

urlpatterns += staticfiles_urlpatterns()

# logging for SORL - have to put it here because in settings it causes import errors
import logging
from sorl.thumbnail.log import ThumbnailLogHandler
handler = ThumbnailLogHandler()
handler.setLevel(logging.ERROR)
logging.getLogger('sorl.thumbnail').addHandler(handler)
Esempio n. 6
0
    ("votes_current", vote.views.sitemap_current),
    #("votes_archive", vote.views.sitemap_archive), # takes too long to load
])
urlpatterns += [
    url(r'^sitemap\.xml$', anonymous_view(sitemap_index_view), {
        'sitemaps': sitemaps,
        'sitemap_url_name': 'sitemap_pages'
    }),
    url(r'^sitemap-(?P<section>.+)\.xml$',
        anonymous_view(sitemap_map_view), {'sitemaps': sitemaps},
        name='sitemap_pages'),
]

if settings.DEBUG:
    # serve /static during debugging
    from django.contrib.staticfiles.urls import staticfiles_urlpatterns
    urlpatterns += staticfiles_urlpatterns()

    # serve /data during debugging
    from django.conf.urls.static import static
    urlpatterns += static("/data", document_root="data")

    # serve the debug toolbar
    import debug_toolbar
    urlpatterns = [
        url(r'^__debug__/', include(debug_toolbar.urls)),
    ] + urlpatterns

if "silk" in settings.INSTALLED_APPS:
    urlpatterns += [url(r'^silk/', include('silk.urls', namespace='silk'))]
Esempio n. 7
0
    re_path(r'^index/$', views.index),
    re_path(r'^admin/', admin.site.urls),
    re_path(r'^logout/$', views.logout),
    re_path(r'^register/$', views.register),
    re_path(r'^user_info/$', views.user_info),
    re_path(r'^login_action/$', views.login_action),
    re_path(r'^search_name/$', views.search_name),
    re_path(r'^change_password/$', views.change_password),
    re_path(r'^goods_view/$', views.goods_view),
    re_path(r'^view_goods/(?P<good_id>[0-9]+)/$', views.view_goods),
    re_path(r'^view_chart/$', views.view_chart),
    re_path(r'^remove_chart_all/$', views.remove_chart_all),
    re_path(r'^remove_chart/(?P<good_id>[0-9]+)/$', views.remove_chart),
    re_path(r'^add_chart/(?P<good_id>[0-9]+)/(?P<sign>[0-9]+)/$',
            views.add_chart),
    re_path(r'^update_chart/(?P<good_id>[0-9]+)/$', views.update_chart),
    re_path(r'^view_address/$', views.view_address),
    re_path(r'^add_address/(?P<sign>[0-9]+)/$', views.add_address),
    re_path(r'^delete_address/(?P<address_id>[0-9]+)/(?P<sign>[0-9]+)/$',
            views.delete_address),
    re_path(r'^update_address/(?P<address_id>[0-9]+)/(?P<sign>[0-9]+)/$',
            views.update_address),
    re_path(r'^delete_orders/(?P<orders_id>[0-9]+)/(?P<sign>[0-9]+)/$',
            views.delete_orders),
    re_path(r'^create_order/$', views.create_order),
    re_path(r'^view_order/(?P<orders_id>[0-9]+)/$', views.view_order),
    re_path(r'^view_all_order/$', views.view_all_order),
] + static(settings.STATIC_URL,
           document_root=settings.STATICFILES_DIRS) + static(
               settings.STATIC_URL, document_root=settings.STATICFILES_DIRS)
Esempio n. 8
0
    path('checkout/', include('checkout.urls')),
    path('dashboard/', include('dashboard.urls')),
    path('accounts/', include('accounts.urls')),

    path('reset_password/',
         auth_views.PasswordResetView.as_view(
             form_class=ResetPasswordForm,
             template_name='resetpassword.html'),
         name='reset_password'),

    path('reset_password_sent/',
         auth_views.PasswordResetDoneView.as_view(
             template_name='passwordsent.html'),
         name="password_reset_done"),

    path('reset/<uidb64>/<token>/',
         auth_views.PasswordResetConfirmView.as_view(
             form_class=PasswordSetForm,
             template_name='setpassword.html'),
         name="password_reset_confirm"),

    path('reset_password_complete/',
         auth_views.PasswordResetCompleteView.as_view(
             template_name='passwordset.html'),
         name="password_reset_complete"),

    
]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Esempio n. 9
0
         views.FullyDamageFactorMana,
         name='damgeFactorMana'),
    path('proposalMana/<int:proposalID>/chart/',
         views.RiskChartMana,
         name='riskChartMana'),
    path('proposalMana/<int:proposalID>/risk-matrix/',
         views.RiskMatrixMana,
         name='riskMatrixMana'),
    path('proposalMana/<int:proposalID>/fully-consequence/',
         views.FullyConsequenceMana,
         name='fullyConsequenceMana'),
    path('data_sensor/<int:mac_sensor>/',
         views.data_sensor_chart,
         name='sensor_chart'),
    path('pub/', views.mosquitto_mqtt_pub, name='mosPub'),
    path('json/temperature1/', views.get_json_tem, name='viewTemData'),
    path('json/temperature/', views.get_tem, name='viewTem'),
    path('chart/<int:sensorID>', views.show_chart_sensor, name='showChart'),
    path('gateway/<int:facilityID>/new', views.new_gateway, name='gwNew'),
    path('gateway/display/<int:facilityID>/',
         views.ListGateway,
         name='gatewayDisplay'),
    path('sensor/display/<int:gatewayID>/',
         views.ListSensor,
         name='sensorDisplay'),
]

urlpatterns += static(set_.STATIC_URL, document_root=set_.STATIC_ROOT)

handler404 = 'cloud.views.handler404'
handler500 = 'cloud.views.handler404'
Esempio n. 10
0
from django.contrib import admin
from django.urls import path
from django.conf import settings
from django.views import static
from django.conf.urls.static import static
from django.conf.urls.i18n import urlpatterns as i18n_urlpatterns
import landingpage.urls
import chat.urls
import bbb.urls
import authstuff.urls
import eventpage.urls
import partners.urls
import staticpages.urls

urlpatterns = [
    path('admin/', admin.site.urls),
]

urlpatterns += i18n_urlpatterns

if settings.DEBUG:
    urlpatterns += static('/media', document_root=settings.MEDIA_ROOT)

urlpatterns += landingpage.urls.urlpatterns
urlpatterns += chat.urls.urlpatterns
urlpatterns += bbb.urls.urlpatterns
urlpatterns += authstuff.urls.urlpatterns
urlpatterns += eventpage.urls.urlpatterns
urlpatterns += partners.urls.urlpatterns
urlpatterns += staticpages.urls.urlpatterns
Esempio n. 11
0
    # Examples:
    #url(r'^$', 'webapp.views.home', name='home'),
    # url(r'^memeja/', include('memeja.foo.urls')),

    # First page that user comes to 
    url(r'^$', include('webapp.urls')),
    url(r'', include('social_auth.urls')),

    # invitation urls
    url(r'^', include('invitation.urls')),
    #url(r'^', include('registration.backends.default.urls')),
    url(r'^', include('registration.backends.simple.urls')), ## temporary no email activation

    (r'^lookups/', include('ajax_select.urls')),

    url(r'^', include('webapp.urls')),
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)


    #url(r'^$', registration/registration_form),

    # 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)),
#)

handler404 = 'webapp.views.custom_404'
handler500 = 'webapp.views.custom_500'