[damned-lies] Adapted Action/ActionAdmin to ease admin edition



commit c2383330f1f4a8b64ed7aa291f1fb7105a0643ca
Author: Claude Paroz <claude 2xlibre net>
Date:   Tue Mar 18 08:41:23 2014 +0100

    Adapted Action/ActionAdmin to ease admin edition

 vertimus/admin.py  |    2 +-
 vertimus/models.py |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vertimus/admin.py b/vertimus/admin.py
index 46ebe48..67daf8e 100644
--- a/vertimus/admin.py
+++ b/vertimus/admin.py
@@ -9,7 +9,7 @@ class StateAdmin(admin.ModelAdmin):
 
 class ActionAdmin(admin.ModelAdmin):
     list_display = ('__unicode__', 'state_db', 'merged_file')
-    raw_id_fields = ('state_db', 'person')
+    raw_id_fields = ('state_db', 'person', 'merged_file')
     search_fields = ('comment',)
 
 admin.site.register(State, StateAdmin)
diff --git a/vertimus/models.py b/vertimus/models.py
index 4a47388..a6b6def 100644
--- a/vertimus/models.py
+++ b/vertimus/models.py
@@ -343,7 +343,7 @@ class ActionAbstract(models.Model):
     comment = models.TextField(blank=True, null=True)
     file = models.FileField(upload_to=generate_upload_filename, blank=True, null=True)
     #up_file     = models.OneToOneField(PoFile, null=True, related_name='action_p')
-    merged_file = models.OneToOneField(PoFile, null=True) #, related_name='action_m')
+    merged_file = models.OneToOneField(PoFile, blank=True, null=True) #, related_name='action_m')
 
     # A comment or a file is required
     arg_is_required = False


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