Skip to content

Instantly share code, notes, and snippets.

@artschwagerb
Created April 20, 2014 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artschwagerb/11123810 to your computer and use it in GitHub Desktop.
Save artschwagerb/11123810 to your computer and use it in GitHub Desktop.
Django URLs
from django.conf.urls import patterns, include, url
from chordcharts.views import ChordListView #for class based views
from chordcharts import views #for function based views
urlpatterns = patterns('',
url(r'^$', ChordListView.as_view(), name='chord_list'), #for class based views
url(r'^$', 'chordcharts.views.chord_list', name='chord_list'), #for function based views
url(r'^chordcharts/', include('chordcharts.urls')),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment