summaryrefslogtreecommitdiff
path: root/app/projects
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2013-04-23 22:18:04 -0400
committerluxagraf <sng@luxagraf.net>2013-04-23 22:18:04 -0400
commit33cf5ef19cd578fcbc5962764d72bbd7310bfb89 (patch)
treea84907902337b626be85e644633681c538c74e05 /app/projects
parent4b963b007e47feedce22938c0831d0f3bcf54f84 (diff)
swtiched from google maps api to OSM with leaflet
Diffstat (limited to 'app/projects')
-rw-r--r--app/projects/models/code.py2
-rw-r--r--app/projects/urls.py16
2 files changed, 7 insertions, 11 deletions
diff --git a/app/projects/models/code.py b/app/projects/models/code.py
index 62179dc..19de428 100644
--- a/app/projects/models/code.py
+++ b/app/projects/models/code.py
@@ -1,7 +1,7 @@
import datetime
from django.db import models
-from utils import markdown2 asfaccount.coms markdown
+from utils import markdown2 as markdown
PUB_STATUS = (
(0, 'Draft'),
(1, 'Published'),
diff --git a/app/projects/urls.py b/app/projects/urls.py
index f4d692c..bd7c13d 100644
--- a/app/projects/urls.py
+++ b/app/projects/urls.py
@@ -1,19 +1,15 @@
-from django.conf.urls.defaults import *
-from django.views.generic.list_detail import object_list
-from django.views.generic.simple import redirect_to,direct_to_template
-from django.views.generic import list_detail
-
+from django.conf.urls import *
+from django.views.generic import ListView
from projects.models.base import Project
-projects = {
- 'queryset': Project.objects.filter(status__exact=1).order_by('-pub_date'),
-}
urlpatterns = patterns('',
(r'data/(?P<id>\d+)/$', 'projects.views.data_json'),
(r'gifs/(?P<slug>[-\w]+)/$', 'projects.views.gif_detail'),
- (r'code/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/(?P<slug>[-\w]+)/$', 'projects.views.code_entry_detail'),
(r'(?P<slug>[-\w]+)/$', 'projects.views.detail'),
- (r'^$',list_detail.object_list, dict(projects, template_name='archives/projects.html')),
+ (r'^$', ListView.as_view(
+ queryset=Project.objects.filter(status__exact=1).order_by('-pub_date'),
+ template_name = "archives/projects.html",
+ )),
)