This repository has been archived by the owner on Oct 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from DrClockwork/dev
Dev
- Loading branch information
Showing
21 changed files
with
811 additions
and
433 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,56 @@ | ||
from django.contrib import admin | ||
from h5pp.models import * | ||
|
||
# Register your models here. | ||
class LibrariesAdmin(admin.ModelAdmin): | ||
list_display = ('title', 'machine_name', 'library_id') | ||
ordering = ('title', 'machine_name') | ||
|
||
admin.site.register(h5p_libraries, LibrariesAdmin) | ||
|
||
class LibrariesLanguageAdmin(admin.ModelAdmin): | ||
list_display = ('library_id', 'language_code') | ||
ordering = ('library_id', 'language_code') | ||
|
||
admin.site.register(h5p_libraries_languages, LibrariesLanguageAdmin) | ||
|
||
class LibrariesLibrariesAdmin(admin.ModelAdmin): | ||
list_display = ('library_id', 'required_library_id', 'dependency_type') | ||
ordering = ('library_id', 'required_library_id') | ||
|
||
admin.site.register(h5p_libraries_libraries, LibrariesLibrariesAdmin) | ||
|
||
class ContentsAdmin(admin.ModelAdmin): | ||
list_display = ('title', 'author', 'content_type') | ||
ordering = ('title', 'author') | ||
|
||
admin.site.register(h5p_contents, ContentsAdmin) | ||
|
||
class ContentsLibrariesAdmin(admin.ModelAdmin): | ||
list_display = ('content_id', 'library_id', 'dependency_type') | ||
ordering = ('content_id', 'library_id') | ||
|
||
admin.site.register(h5p_contents_libraries, ContentsLibrariesAdmin) | ||
|
||
class PointsAdmin(admin.ModelAdmin): | ||
list_display = ('content_id', 'uid', 'points', 'max_points') | ||
ordering = ('content_id', 'uid') | ||
|
||
admin.site.register(h5p_points, PointsAdmin) | ||
|
||
class ContentUserAdmin(admin.ModelAdmin): | ||
list_display = ('user_id', 'content_main_id') | ||
ordering = ('user_id', 'content_main_id') | ||
|
||
admin.site.register(h5p_content_user_data, ContentUserAdmin) | ||
|
||
class EventsAdmin(admin.ModelAdmin): | ||
list_display = ('user_id', 'type', 'sub_type', 'library_name') | ||
ordering = ('user_id', 'type') | ||
|
||
admin.site.register(h5p_events, EventsAdmin) | ||
|
||
class CountersAdmin(admin.ModelAdmin): | ||
list_display = ('type', 'library_name', 'num') | ||
ordering = ('type', 'library_name') | ||
|
||
admin.site.register(h5p_counters, CountersAdmin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.