summaryrefslogtreecommitdiff
path: root/fossee_manim/admin.py
diff options
context:
space:
mode:
authorAkshen2019-03-05 11:33:41 +0530
committerAkshen2019-03-05 11:33:41 +0530
commitefda4b675ab162346a72abf0ceee29cfc0f99001 (patch)
tree72b1f971823ecb1aed88ce793c69921f66e4291e /fossee_manim/admin.py
parenteed46efdccfb2821cb07b6a189f439ba6f7bb3f2 (diff)
downloadFOSSEE_animations-efda4b675ab162346a72abf0ceee29cfc0f99001.tar.gz
FOSSEE_animations-efda4b675ab162346a72abf0ceee29cfc0f99001.tar.bz2
FOSSEE_animations-efda4b675ab162346a72abf0ceee29cfc0f99001.zip
Major Update 1
- User can register/login/logout - Contributor can send proposal and comment on it - Reviewer can comment/approve/reject proposals
Diffstat (limited to 'fossee_manim/admin.py')
-rw-r--r--fossee_manim/admin.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/fossee_manim/admin.py b/fossee_manim/admin.py
index f076a3c..35bf57b 100644
--- a/fossee_manim/admin.py
+++ b/fossee_manim/admin.py
@@ -1,16 +1,16 @@
from django.contrib import admin
import csv
from django.http import HttpResponse
-from .models import (
- Profile
- )
+from .models import (Category, Profile, User, Animation, Comment,
+ AnimationStats)
# Register your models here.
try:
- from StringIO import StringIO as string_io
+ from StringIO import StringIO as string_io
except ImportError:
- from io import BytesIO as string_io
+ from io import BytesIO as string_io
-#Custom Classes
+
+# Custom Classes
class ProfileAdmin(admin.ModelAdmin):
list_display = ['title','user', 'institute','location','department',
'phone_number','position']
@@ -41,6 +41,10 @@ class ProfileAdmin(admin.ModelAdmin):
download_csv.short_description = "Download CSV file for selected stats."
+class CategoryAdmin(admin.ModelAdmin):
+ list_display = ['name', 'created', 'description']
+ list_filter = ['name']
-admin.site.register(Profile, ProfileAdmin)
+admin.site.register(Category, CategoryAdmin)
+admin.site.register(Profile, ProfileAdmin) \ No newline at end of file