From: Kriti Godey Date: Mon, 8 Mar 2010 21:44:07 +0000 (-0500) Subject: URLs all read from urls.py file now, no hardcoded URLs X-Git-Url: http://git.ithinksw.org/~kgodey/maayanwich.git/commitdiff_plain/46ed4211e32129bf050a0213e0469675a7d002f2 URLs all read from urls.py file now, no hardcoded URLs --- diff --git a/templates/base.html b/templates/base.html index a910bb1..e7a0140 100644 --- a/templates/base.html +++ b/templates/base.html @@ -12,11 +12,11 @@ @@ -28,11 +28,11 @@
diff --git a/templates/ingredient.html b/templates/ingredient.html index 23be3a0..2758320 100644 --- a/templates/ingredient.html +++ b/templates/ingredient.html @@ -3,7 +3,7 @@ {% block title %}Add an ingredient{% endblock %} {% block content %}

Add a new ingredient

-
+ {{ iform.as_p }}
diff --git a/templates/login.html b/templates/login.html index c92d7cf..aba342a 100644 --- a/templates/login.html +++ b/templates/login.html @@ -2,7 +2,7 @@ {% block content %}

Login

-
+ {{ aform.as_p }}
diff --git a/templates/newuser.html b/templates/newuser.html index fcba9c3..41eaa0e 100644 --- a/templates/newuser.html +++ b/templates/newuser.html @@ -2,7 +2,7 @@ {% block content %}

Create account

-
+ {{ cform.as_p }}
diff --git a/templates/sandwich.html b/templates/sandwich.html index d87265e..09d2a9a 100644 --- a/templates/sandwich.html +++ b/templates/sandwich.html @@ -3,7 +3,7 @@ {% block title %}Add a sandwich{% endblock %} {% block content %}

Add a new sandwich

-
+ {{ sform.as_p }}
diff --git a/urls.py b/urls.py index 08e08e5..8f48e0f 100644 --- a/urls.py +++ b/urls.py @@ -3,13 +3,13 @@ import views from django.shortcuts import render_to_response urlpatterns = patterns('', - (r'^sandwich/add/$', views.add_sandwich), - (r'^sandwich/addingredient/$', views.add_ingredient), - (r'^sandwich/all/$', views.all_sandwich), - (r'^sandwich/(?P[-\w]+)/(?P[-\w]+)/$', views.sandwich_month), + url(r'^sandwich/add/$', views.add_sandwich, name='add_sandwich'), + url(r'^sandwich/addingredient/$', views.add_ingredient, name='add_ingredient'), + url(r'^sandwich/all/$', views.all_sandwich, name='all_sandwiches'), + url(r'^sandwich/(?P[-\w]+)/(?P[-\w]+)/$', views.sandwich_month, name='sandwich_by_month'), url(r'^sandwich/(?P[-\w]+)/$', views.specific_sandwich, name='sandwich_by_slug'), - (r'^login/$', views.login_view), - (r'^logout/$', views.logout_view), - (r'^signup/$', views.create_user), - (r'', views.current_home), + url(r'^login/$', views.login_view, name='login'), + url(r'^logout/$', views.logout_view, name='logout'), + url(r'^signup/$', views.create_user, name='signup'), + url(r'', views.current_home, name='index'), )