Skip to content

Commit

Permalink
merge with release-0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bbengfort committed Aug 24, 2015
2 parents eeafc19 + 24ff587 commit d1d7383
Show file tree
Hide file tree
Showing 17 changed files with 986 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ target/
# Virtual Environment
venv
.env

# Fixtures
fixtures
21 changes: 18 additions & 3 deletions catalog/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
##########################################################################

from django.contrib import admin
from catalog.models import Course, Instructor
from catalog.models import Course, Instructor, Enrollment
from catalog.models import Subscription, Publication

##########################################################################
## Inline Adminstration
Expand All @@ -27,23 +28,37 @@

class InstructorInline(admin.TabularInline):
"""
Inline administration descriptor for profile object
Inline administration descriptor for course instructors
"""

model = Instructor
extra = 1
verbose_name_plural = 'instructors'


class EnrollmentInline(admin.TabularInline):
"""
Inline administration descriptor for course enrollment
"""

model = Enrollment
extra = 5
verbose_name_plural = 'enrollment'


class CourseAdmin(admin.ModelAdmin):
"""
Define new Course admin view
"""

inlines = (InstructorInline, )
inlines = (InstructorInline, EnrollmentInline)


##########################################################################
## Register Admin
##########################################################################

admin.site.register(Course, CourseAdmin)
admin.site.register(Enrollment)
admin.site.register(Subscription)
admin.site.register(Publication)
18 changes: 18 additions & 0 deletions catalog/management/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# catalog.management
# Management commands for the catalog app.
#
# Author: Benjamin Bengfort <bbengfort@districtdatalabs.com>
# Created: Sun Aug 23 21:17:10 2015 -0500
#
# Copyright (C) 2015 District Data Labs
# For license information, see LICENSE.txt
#
# ID: __init__.py [] benjamin@bengfort.com $

"""
Management commands for the catalog app.
"""

##########################################################################
## Imports
##########################################################################
18 changes: 18 additions & 0 deletions catalog/management/commands/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# catalog.management
# Management commands for the catalog app.
#
# Author: Benjamin Bengfort <bbengfort@districtdatalabs.com>
# Created: Sun Aug 23 21:17:10 2015 -0500
#
# Copyright (C) 2015 District Data Labs
# For license information, see LICENSE.txt
#
# ID: __init__.py [] benjamin@bengfort.com $

"""
Management commands for the catalog app.
"""

##########################################################################
## Imports
##########################################################################

0 comments on commit d1d7383

Please sign in to comment.