From 6d1b6a11f0a1df84cdd70c22fdd6dbfbfd0643a5 Mon Sep 17 00:00:00 2001
From: Felipe Vieira
Date: Thu, 13 Oct 2011 15:43:40 +0000
Subject: [PATCH] modificacoes feitas em producao, wrong!
---
etc/apache/django.wsgi | 10 +++++++++-
etc/apache/{apache.conf => sites-available/sigi.erb} | 0
media/css/base_site.css | 4 ++--
sigi/apps/casas/forms.py | 12 ++++++------
sigi/settings.py | 6 ++++--
sigi/templates/admin/base_site.html | 2 +-
sigi/templates/index.html | 2 +-
sigi/templates/snippets/modules/actions.html | 2 +-
.../templates/snippets/modules/charts-convenios.html | 10 +++++-----
9 files changed, 29 insertions(+), 19 deletions(-)
rename etc/apache/{apache.conf => sites-available/sigi.erb} (100%)
diff --git a/etc/apache/django.wsgi b/etc/apache/django.wsgi
index 1494900..f7fd4d8 100755
--- a/etc/apache/django.wsgi
+++ b/etc/apache/django.wsgi
@@ -2,8 +2,16 @@
# -*- mode: python -*-
import os, sys
-sys.path.insert(0, '/var/aplicacoes/django/SIGI')
+sys.path.insert(0, '/var/aplicacoes/django/sigi')
os.environ['DJANGO_SETTINGS_MODULE'] = 'sigi.settings'
+from django.core.management.validation import get_validation_errors
+try:
+ from cStringIO import StringIO
+except ImportError:
+ from StringIO import StringIO
+s = StringIO()
+num_errors = get_validation_errors(s, None)
+
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
diff --git a/etc/apache/apache.conf b/etc/apache/sites-available/sigi.erb
similarity index 100%
rename from etc/apache/apache.conf
rename to etc/apache/sites-available/sigi.erb
diff --git a/media/css/base_site.css b/media/css/base_site.css
index d75c7d4..c74592e 100644
--- a/media/css/base_site.css
+++ b/media/css/base_site.css
@@ -153,7 +153,7 @@ img.chart {
/* JQuery */
.tabs-conteudo li {
border: 1px solid #CCC;
- background-image: url("/admin_media/img/admin/nav-bg.gif");
+ background-image: url("/sigi/admin_media/img/admin/nav-bg.gif");
display: inline;
padding: 4px 8px;
}
@@ -164,7 +164,7 @@ img.chart {
.conteudo_regiao li{
border: 1px solid #CCC;
- background-image: url("/admin_media/img/admin/nav-bg.gif");
+ background-image: url("/sigi/admin_media/img/admin/nav-bg.gif");
padding: 4px 8px;
width: 30%;
list-style: none;
diff --git a/sigi/apps/casas/forms.py b/sigi/apps/casas/forms.py
index 4dbfc22..d300b4f 100644
--- a/sigi/apps/casas/forms.py
+++ b/sigi/apps/casas/forms.py
@@ -4,12 +4,12 @@ from django.contrib.localflavor.br.forms import BRCNPJField, BRZipCodeField
from sigi.apps.casas.models import CasaLegislativa
class CasaLegislativaForm(forms.ModelForm):
- cnpj = BRCNPJField(
- label='CNPJ',
- required=False,
- help_text='Utilize o formato XX.XXX.XXX/XXXX-XX ou '
- 'insira apenas os dígitos.'
- )
+ #cnpj = BRCNPJField(
+ # label='CNPJ',
+ # required=False,
+ # help_text='Utilize o formato XX.XXX.XXX/XXXX-XX ou '
+ # 'insira apenas os dígitos.'
+ #)
cep = BRZipCodeField(label='CEP', help_text='Formato: XXXXX-XXX.')
class Meta:
diff --git a/sigi/settings.py b/sigi/settings.py
index 1e970e6..80182b0 100644
--- a/sigi/settings.py
+++ b/sigi/settings.py
@@ -33,13 +33,15 @@ DATABASE_PORT = '5432'
TIME_ZONE = 'Brazil/East'
LANGUAGE_CODE = 'pt-br'
+DEFAULT_CHARSET = 'utf-8'
SITE_ID = 1
USE_I18N = True
+USE_L10N = True
MEDIA_ROOT = BASE_DIR + '/media/'
-MEDIA_URL = '/media/'
-ADMIN_MEDIA_PREFIX = '/admin_media/'
+MEDIA_URL = '/sigi/media/'
+ADMIN_MEDIA_PREFIX = '/sigi/admin_media/'
CACHE_BACKEND = 'dummy:///'
CACHE_MIDDLEWARE_SECONDS = 60
diff --git a/sigi/templates/admin/base_site.html b/sigi/templates/admin/base_site.html
index 50ef446..a7eb325 100644
--- a/sigi/templates/admin/base_site.html
+++ b/sigi/templates/admin/base_site.html
@@ -15,7 +15,7 @@
{% block branding %}
{% endblock %}
diff --git a/sigi/templates/index.html b/sigi/templates/index.html
index cd8a59f..5a0f7d8 100644
--- a/sigi/templates/index.html
+++ b/sigi/templates/index.html
@@ -1,6 +1,6 @@
{% extends "admin/index.html" %}
-{% block title %}Dashboard | SIGI{% endblock %}
+{% block title %}SIGI{% endblock %}
{% block content_title %}Dashboard
{% endblock %}
{% block content %}
diff --git a/sigi/templates/snippets/modules/actions.html b/sigi/templates/snippets/modules/actions.html
index 82e6e79..3f6d034 100644
--- a/sigi/templates/snippets/modules/actions.html
+++ b/sigi/templates/snippets/modules/actions.html
@@ -11,7 +11,7 @@
- {% if not entry.is_deletion %}{% endif %}
+ {% if not entry.is_deletion %}{% endif %}
{{ entry.object_repr|escape|truncatewords_html:3 }}
{% if not entry.is_deletion %}{% endif %}
diff --git a/sigi/templates/snippets/modules/charts-convenios.html b/sigi/templates/snippets/modules/charts-convenios.html
index 5120a77..37b4473 100644
--- a/sigi/templates/snippets/modules/charts-convenios.html
+++ b/sigi/templates/snippets/modules/charts-convenios.html
@@ -68,11 +68,11 @@