Tagged Questions
0
votes
1answer
26 views
How to write/overwrite a file with HTMLParser
I need to create some files from a template. I'm using psycopg2 to fetch from a database. Then I loop through. Now I need to write to file.
Thanks!
import sys
from HTMLParser import HTMLParser
from ...
-2
votes
0answers
29 views
How to enable postgis on existing database? [closed]
I have an existing postgres database.
How do I enable geodjango support on that database? so that I can use it for spatial lookups.
1
vote
1answer
14 views
Multiple insert statements failing postgresql / psycopg2
I'm using scrapy to scrape a webpage which I then add to a postgres database.
The first INSERT statements works fine, and I can select the items from the database. The second one seems to insert data ...
0
votes
0answers
38 views
Adding an 'alert' to custom module
I have a module called solvencia.py which manages the solvencies for my client.
I'll need to add an alert or alarm, based on the Fecha_de_Vence field:
import time
from datetime import datetime
from ...
0
votes
2answers
24 views
Product UOM field not showing on Purchase and Quotations - OpenErp
I'm using th purchase app on OpenErp.
I know this field is declared on purchase.py and called on purchase_view.xml but strangely it doesn't appears when i'm trying to add a new product quotation or ...
0
votes
2answers
42 views
Psycopg2 image not found
Trying to setup postgres with the postgres mac app and hit this error, which I haven't been able to solve. Any thoughts?
ImportError: ...
0
votes
1answer
50 views
How can I read application_name?
Can someone show me please, how I can read the application_name setting
inside a python trigger ?
Thanks in advance.
0
votes
1answer
12 views
How to return resultset with Plpython3 in Postgres
How can a plpython function return result set as a normal sql query resultset (not as text).
Here is function definition -
DROP FUNCTION IF EXISTS demo_report();
CREATE OR REPLACE FUNCTION ...
0
votes
2answers
40 views
Installing hstore extension in django nose tests
I've installed the hstore extension successfully, and everything works when I syncdb. (I'm using djorm-ext-hstore)
However, nose creates a new temp database to run tests in, and hstore is not ...
0
votes
0answers
35 views
Increment a counter and trigger an action when a threshold is exceeded
I have a model like this
class Thingy(models.Model):
# ...
failures_count = models.IntegerField()
I have concurrent processes (Celery tasks) that need to do this:
do some kind of ...
0
votes
0answers
55 views
Django - Multiple Databases
So I'm somewhat new to the whole Django databases and maybe I just don't fully understand the Django routers talked about here:
...
-1
votes
1answer
27 views
postgres not recognizing password [closed]
I am trying to make an application that reads from a database using webpy. When I run python code and try to access localhost from browser I am getting
>
class 'psycopg2.OperationalError' at /
...
0
votes
0answers
24 views
Print postgresql query field types web.py
When executing a query in web.py using a PostgreSQL database, is there anyway to get the type names of the fields that are returned? This is my code so far:
# queryString set above
result = ...
0
votes
2answers
34 views
Python - Postgres array to dict/json/array
So...
I have to pull data from postgres database using python ant return the results (JSON formatted) to a web page via an AJAX call
I have to live with a nasty constraint in that I have no access ...
1
vote
1answer
27 views
OpenErp - External Id Bulk Update
I need a way to add, some external ID's in the system without having to add them manually or by .csv
Is there any way to do this by a module, that maybe updates all the ir.model.data tables of the ...