[damned-lies] Register PoFile in admin



commit f090af0878ae09c52ced7e789f59fb54cb139301
Author: Claude Paroz <claude 2xlibre net>
Date:   Wed Aug 3 22:54:55 2011 +0200

    Register PoFile in admin

 stats/admin.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/stats/admin.py b/stats/admin.py
index e602baf..8049bbe 100644
--- a/stats/admin.py
+++ b/stats/admin.py
@@ -23,7 +23,7 @@ from django.contrib.admin import helpers
 from django.shortcuts import render
 from django.utils.encoding import force_unicode
 from django import forms
-from stats.models import Statistics, Information, Module, Branch, Domain, Category, Release
+from stats.models import Statistics, Information, PoFile, Module, Branch, Domain, Category, Release
 
 class BranchInline(admin.TabularInline):
     model = Branch
@@ -123,7 +123,11 @@ class StatisticsAdmin(admin.ModelAdmin):
     raw_id_fields = ('branch', 'domain', 'language', 'full_po', 'part_po')
     inlines = [ InformationInline ]
 
+class PoFileAdmin(admin.ModelAdmin):
+    search_fields = ('path',)
+
 admin.site.register(Statistics, StatisticsAdmin)
+admin.site.register(PoFile, PoFileAdmin)
 admin.site.register(Branch, BranchAdmin)
 admin.site.register(Domain, DomainAdmin)
 admin.site.register(Category, CategoryAdmin)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]