[damned-lies] Filter admin/variable naming improvements
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Filter admin/variable naming improvements
- Date: Fri, 18 Mar 2011 18:29:06 +0000 (UTC)
commit a8d34a2804a7c18bd67c6ca374a3a7db330b20cd
Author: Claude Paroz <claude 2xlibre net>
Date: Fri Mar 18 19:29:03 2011 +0100
Filter admin/variable naming improvements
stats/admin.py | 4 +++-
stats/utils.py | 4 ++--
templates/vertimus/vertimus_detail.html | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/stats/admin.py b/stats/admin.py
index 1a2f6a0..2267e5a 100644
--- a/stats/admin.py
+++ b/stats/admin.py
@@ -34,8 +34,10 @@ class DomainInline(admin.TabularInline):
def formfield_for_dbfield(self, db_field, **kwargs):
if db_field.name == 'description':
kwargs['widget'] = forms.Textarea(attrs={'rows':'1', 'cols':'20'})
- if db_field.name in ('name', 'directory'):
+ elif db_field.name in ('name', 'directory'):
kwargs['widget'] = forms.TextInput(attrs={'size':'20'})
+ elif db_field.name == 'red_filter':
+ kwargs['widget'] = forms.Textarea(attrs={'rows':'1', 'cols':'40'})
return super(DomainInline, self).formfield_for_dbfield(db_field, **kwargs)
class ModuleAdmin(admin.ModelAdmin):
diff --git a/stats/utils.py b/stats/utils.py
index ee39e9a..79f0e57 100644
--- a/stats/utils.py
+++ b/stats/utils.py
@@ -98,14 +98,14 @@ def po_grep(in_file, out_file, filter_):
if not has_toolkit or filter_ == u"-":
return
if not filter_:
- filter_loc, filter_str = "gschema.xml.in", "locations"
+ filter_loc, filter_str = "locations", "gschema.xml.in"
else:
try:
filter_loc, filter_str = filter_.strip("|")
except:
# Probably bad filter syntax in DB (TODO: log it)
return
- grepfilter = pogrep.GrepFilter(filter_loc, filter_str, invertmatch=True, keeptranslations=True)
+ grepfilter = pogrep.GrepFilter(filter_str, filter_loc, invertmatch=True, keeptranslations=True)
out = open(out_file, "w")
pogrep.rungrep(in_file, out, None, grepfilter)
out.close()
diff --git a/templates/vertimus/vertimus_detail.html b/templates/vertimus/vertimus_detail.html
index 4589e40..e3224a5 100644
--- a/templates/vertimus/vertimus_detail.html
+++ b/templates/vertimus/vertimus_detail.html
@@ -102,7 +102,7 @@ $(document).ready(function() {
{% endif %}
{% if other_states %}
-<div style="margin-top:0.5em;">
+<div style="margin-top:0.5em; clear: both;">
<img src="{{ MEDIA_URL }}img/warn.png" alt="Warning logo" />
{% trans "On-going activities in same module:" %}
{% for st in other_states %}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]