Permalink
Browse files

Move templates into app

  • Loading branch information...
1 parent 243c9ef commit ea392b9878830fd84fa4ecb1f3c32b8feb8998e3 @vkurup committed May 6, 2012
File renamed without changes.
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block title %}Portfolio{% endblock %}
+
+{% block content %}
+
+<h2>Portfolio</h2>
+<hr>
+
+<p><a href="txn">View all transactions</a></p>
+
+{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "portfolio/base.html" %}
+{% extends "base.html" %}
{% block title %}One Transaction{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "portfolio/base.html" %}
+{% extends "base.html" %}
{% block title %}Transactions{% endblock %}
View
@@ -1,11 +1,15 @@
from django.conf.urls import patterns, url, include
-from django.views.generic import ListView, DetailView
+from django.views.generic import ListView, DetailView, TemplateView
from portfolio.models import Transaction
urlpatterns = patterns(
'',
- (r'^$', ListView.as_view(
- model=Transaction)),
- (r'^(?P<pk>\d+)/$', DetailView.as_view(
- model=Transaction)),
+ (r'^$', TemplateView.as_view(
+ template_name="portfolio.html")),
+ (r'^txn/$', ListView.as_view(
+ model=Transaction,
+ template_name="transaction_list.html")),
+ (r'^txn/(?P<pk>\d+)/$', DetailView.as_view(
+ model=Transaction,
+ template_name="transaction_detail.html")),
)

0 comments on commit ea392b9

Please sign in to comment.