def profile(): print 'Creating database ...', create_database() print 'done' print 'Profiling home view ...' profile_view(SearchView.as_view()) print 'Profiling cart view ...' profile_view(CartView.as_view()) print 'Profiling metadata view ...' profile_view(metadata) print 'Profiling manifest view ...' profile_view(manifest) print 'Profiling summary view ...' profile_view(summary) empty_cache() remove_database()
from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from cghub.apps.core.views import ( HomeView, SearchView, BatchSearchView, ItemDetailsView, MetadataView, MessageView) admin.autodiscover() urlpatterns = patterns( '', url(r'^$', HomeView.as_view(), name='home_page'), url(r'^search/$', SearchView.as_view(), name='search_page'), url(r'^search/batch/$', BatchSearchView.as_view(), name='batch_search_page'), url(r'^details/(?P<analysis_id>' '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/$', ItemDetailsView.as_view(), name='item_details'), url(r'^metadata/(?P<analysis_id>' '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/$', MetadataView.as_view(), name='metadata'), url(r'^message/(?P<message_id>\d+)/remove/$', MessageView.as_view(), name='message_remove'), url(r'^logout/', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'), url(r'^cart/', include('cghub.apps.cart.urls')), url(r'^help/', include('cghub.apps.help.urls')), url(r'^admin/', include(admin.site.urls)), ) urlpatterns += patterns('django.views.generic.simple',