1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: url(r'^$', Home.a,s_view(), name='home') Including another URLconf 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import url, include from django.contrib import admin from untitled import views from tasks import apps from tasks.api import TaskResource, DueDateTodayResource, SubTaskResource, DueDateThisWeekResource, \ DueDateNextWeekResource, DueDateOverdueResource from tastypie.api import Api task_resource = TaskResource() due_date_resource = DueDateTodayResource() due_date_this_week_resource = DueDateThisWeekResource() due_date_next_week_resource = DueDateNextWeekResource() due_date_overdue_resource = DueDateOverdueResource() app_name = 'home' v1_api = Api(api_name='v1') v1_api.register(TaskResource()) v1_api.register(SubTaskResource()) urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^update/', include('tasks.urls')), url(r'^$', views.index, name='index'),
from django.conf.urls import patterns, include, url from django.contrib import admin from tasks.api import TaskResource urlpatterns = patterns('', #url(r'^admin/', include(admin.site.urls)), url(r'api/tasks/', include(TaskResource.urls())) )
from django.conf.urls import patterns, include, url from django.contrib import admin from tasks.api import TaskResource urlpatterns = patterns( '', #url(r'^admin/', include(admin.site.urls)), url(r'api/tasks/', include(TaskResource.urls())))
from django.conf.urls import patterns, include, url from django.views.generic import TemplateView from tasks.api import TaskResource, UserResource from tastypie.api import Api from tasks.views import * v1_api = Api(api_name='v1') v1_api.register(UserResource()) v1_api.register(TaskResource()) urlpatterns = patterns( '', url(r'^$', 'tasks.views.task_list'), url(r'^tasks/', include('tasks.urls')), # Session management url(r'^login/$', 'django.contrib.auth.views.login'), url(r'^logout/$', logout_page), url(r'^register/$', register_page), url( r'^register/success/$', TemplateView.as_view( template_name="registration/register_success.html")), # Account management url(r'^api/', include(v1_api.urls)), url(r'^media/(?P<path>.*)$', "django.views.static.serve"))