from activity.scraper import activity_json from twitter.view_twitter import index as twitter_index from log.view_log import index as log_index def get_index(): # The index URI regex, ^$, contains no parameters, named or otherwise. # You can simply just return nothing here. return None urlpatterns = [ distill_url( r'^$', TemplateView.as_view(template_name='index.html'), name='index', distill_func=get_index, distill_file='index.html', ), distill_url( r'static/activity-data.json', activity_json, name='activity_json', distill_func=get_index, distill_file='static/activity-data.json', ), distill_url( r'activity/', TemplateView.as_view(template_name='activity.html'), name='activity', distill_func=get_index,
def test_no_param_func(): return None def test_positional_param_func(): return ('12345', ) def test_named_param_func(): return [{'param': 'test'}] urlpatterns = [ distill_url(r'^url/$', test_no_param_view, name='url-no-param', distill_func=test_no_param_func, distill_file='test'), distill_url(r'^url/([\d]+)$', test_positional_param_view, name='url-positional-param', distill_func=test_positional_param_func), distill_url(r'^url/(?P<param>[\w]+)$', test_named_param_view, name='url-named-param', distill_func=test_named_param_func), path('path/namespace1/', include('tests.namespaced_urls', namespace='test_namespace')), path('path/no-namespace/', include('tests.no_namespaced_urls')), ]
def get_all_affiliatedcommitters(): for affiliatedcommitter in AffiliatedCommitter.objects.all(): yield {'pk': affiliatedcommitter.id} def get_organization(): for organization in Organization.objects.all(): yield {'pk': organization.id} urlpatterns = [ distill_url( r'^$', HomePageView.as_view(), name='index', distill_func=get_index, distill_file='index.html', ), distill_url( 'info.txt', info, name='index', distill_func=get_index, distill_file='info.txt', ), distill_url( r'static/activity-data.json', activity_json, name='activity_json', distill_func=get_index,
from django.views.generic import TemplateView from gci.views import index as gci_index def get_index(): # The index URI regex, ^$, contains no parameters, named or otherwise. # You can simply just return nothing here. return None urlpatterns = [ distill_url( r'^$', TemplateView.as_view(template_name='index.html'), name='index', distill_func=get_index, distill_file='index.html', ), distill_url( r'activity/', TemplateView.as_view(template_name='activity.html'), name='activity', distill_func=get_index, distill_file='activity/index.html', ), distill_url( r'gci/', gci_index, name='community-gci', distill_func=get_index,
from data.views import index as contributors_index from inactive_issues.inactive_issues_scraper import inactive_issues_json from openhub.views import index as openhub_index def get_index(): # The index URI regex, ^$, contains no parameters, named or otherwise. # You can simply just return nothing here. return None urlpatterns = [ distill_url( r'^$', TemplateView.as_view(template_name='index.html'), name='index', distill_func=get_index, distill_file='index.html', ), distill_url( 'info.txt', info, name='index', distill_func=get_index, distill_file='info.txt', ), distill_url( r'static/activity-data.json', activity_json, name='activity_json', distill_func=get_index,
from log.view_log import index as log_index from data.views import index as contributors_index def get_index(): # The index URI regex, ^$, contains no parameters, named or otherwise. # You can simply just return nothing here. return None urlpatterns = [ distill_url( r'^$', TemplateView.as_view(template_name='index.html'), name='index', distill_func=get_index, distill_file='index.html', ), distill_url( r'log/', log_index, name='log', distill_func=get_index, distill_file='log/index.html', ), distill_url( r'contributors/$', contributors_index, name='community-data', distill_func=get_index,
# url(r'^efforia/pagseguro', pagseguro), # url(r'^efforia/paypal/cart', paypalcart), # url(r'^efforia/paypal', paypal), # url(r'^efforia/pages', page), # url(r'^efforia/pageview', pageview), # url(r'^efforia/pageedit', pageedit), # url(r'^efforia/discharge', discharge), # url(r'^efforia/recharge', recharge), # url(r'^efforia/balance', balance), # url(r'^efforia/deadlines', deadlines), # ] from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from django_distill import distill_url admin.autodiscover() def getNone(): return None urlpatterns += [ distill_url(r'^$', start, name='home', distill_func=getNone), url(r'^socialize/',include('socialize.urls')), url(r'^shipping/',include('shipping.urls')), url(r'^feedly/',include('feedly.urls')), url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), ] urlpatterns += staticfiles_urlpatterns()
from django.views.generic import TemplateView from gsoc.views import index as gsoc_index from gsoc.views import projects as gsoc_projects def get_index(): # The index URI regex, ^$, contains no parameters, named or otherwise. # You can simply just return nothing here. return None urlpatterns = [ distill_url( r'^$', TemplateView.as_view(template_name='index.html'), name='index', distill_func=get_index, distill_file='index.html', ), distill_url( r'^gsoc/$', gsoc_index, name='community-gsoc', distill_func=get_index, distill_file='gsoc/index.html', ), distill_url( r'^gsoc/projects/$', gsoc_projects, name='community-gsoc-projects', distill_func=get_index, distill_file='gsoc/projects.html', ), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
""" Community URL configuration. """ from django_distill import distill_url from gci.views import index def get_index(): # The index URI regex, ^$, contains no parameters, named or otherwise. # You can simply just return nothing here. return None urlpatterns = [ distill_url( r'^$', index, name='community-gci', distill_func=get_index, distill_file='index.html', ), ]
return None def test_positional_param_func(): return ('12345',) def test_named_param_func(): return [{'param': 'test'}] urlpatterns = [ distill_url(r'^url/$', test_no_param_view, name='url-no-param', distill_func=test_no_param_func, distill_file='test'), distill_url(r'^url/([\d]+)$', test_positional_param_view, name='url-positional-param', distill_func=test_positional_param_func), distill_url(r'^url/(?P<param>[\w]+)$', test_named_param_view, name='url-named-param', distill_func=test_named_param_func), ] if settings.HAS_RE_PATH: