瀏覽代碼

Linking urls, writing basic template

David Leonard 10 年之前
父節點
當前提交
34d02aaa3f
共有 2 個文件被更改,包括 9 次插入0 次删除
  1. 1 0
      hackathon_starter/hackathon/templates/hackathon/index.html
  2. 8 0
      hackathon_starter/hackathon/urls.py

+ 1 - 0
hackathon_starter/hackathon/templates/hackathon/index.html

@@ -0,0 +1 @@
+<h1> Hello! </h1>

+ 8 - 0
hackathon_starter/hackathon/urls.py

@@ -0,0 +1,8 @@
+from django.conf.urls import patterns, url
+
+from hackathon import views
+
+urlpatterns = patterns('',
+    url(r'^$', views.index, name='index'),
+    url(r'^test/$', views.test, name='test'),
+)