Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 6 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
Showing with 36 additions and 2 deletions.
  1. +2 −0 .gitignore
  2. +1 −1 curricula/__init__.py
  3. +8 −0 curricula/models.py
  4. +24 −0 curricula/urls.py
  5. +1 −1 requirements.txt
View
2 .gitignore
@@ -9,3 +9,5 @@ media/js/*.r*.js
media/css/*.r*.css
*DS_Store
*.egg-info
+dist/
+build/
View
2 curricula/__init__.py
@@ -4,7 +4,7 @@
__version_info__ = {
'major': 1,
'minor': 1,
- 'micro': 9,
+ 'micro': 10,
'releaselevel': 'final',
'serial': 1
}
View
8 curricula/models.py
@@ -213,6 +213,10 @@ class Activity(models.Model):
objects = ContentManager()
+ @models.permalink
+ def get_absolute_url():
+ return ('activity-detail', self.slug)
+
def __unicode__(self):
return strip_tags(self.title)
@@ -360,6 +364,10 @@ class Lesson(models.Model): # Publish):
objects = ContentManager()
+ @models.permalink
+ def get_absolute_url():
+ return ('lesson-detail', self.slug)
+
def __unicode__(self):
return strip_tags(self.title)
View
24 curricula/urls.py
@@ -1,4 +1,5 @@
from django.conf.urls.defaults import *
+from .models import Activity, Lesson
urlpatterns = patterns('curricula.views',
url(r'objectives/(?P<id>\d+)/$',
@@ -18,4 +19,27 @@
url(r'get_breakout_terms/(?P<id>\d+)/$',
'get_breakout_terms',
name='get-breakout-terms'),
+ url(r'^activity/$',
+ 'django.views.generic.list_detail.object_list',
+ {'template_name': 'curricula/activity_list.html',
+ 'queryset': Activity.objects.filter(published=True),},
+ name="activity-list",
+ ),
+ url(r'^activity/(?P<slug>[-\w]*)/$',
+ 'curricula.views.activity_detail',
+ {'template_name': 'curricula/activity_detail.html'},
+ name='activity-detail'
+ ),
+ url(r'^lesson/$',
+ 'django.views.generic.list_detail.object_list',
+ {'template_name': 'curricula/lesson_list.html',
+ 'queryset': Lesson.objects.filter(published=True),},
+ name="lesson-list",
+ ),
+ url(r'^lesson/(?P<slug>[-\w]*)/$',
+ 'curricula.views.lesson_detail',
+ {'template_name': 'curricula/lesson_detail.html'},
+ name='lesson-detail'
+ ),
+
)
View
2 requirements.txt
@@ -1,6 +1,6 @@
#--extra-index-url http://callowayproject.com/pypi/
BeautifulSoup
-django-audience>=0.5.1
+django-audience>=0.5.3
django-categories>=1.0.2
django-concepts>=0.3.1
django-edumetadata>=0.4

No commit comments for this range

Something went wrong with that request. Please try again.