0
votes
0answers
17 views

Alternative to django concrete inheritance

I have a Django model class which encompass various types of model classes like: Content > (Audio, Video, Image) I want to perform queries on this parent model like Content.objects.filter() or ...
0
votes
0answers
11 views

Subtract product_qty of a product, in a confirmed purchase.order (stock.move) - to a custom module

I need to subtract the product_qty of a choosen product in a purchase.order.line (for this i made a boolean type field) So if you click at this boolean field, it tells my custom module that this ...
-1
votes
0answers
20 views

COmmunication between windows host and centos guest through vbox [migrated]

I am trying to access the db which is there on my windows 7 machine through centos mounted on oracle virtual box. I am using python as the language, using Django. I have made the following changes ...
2
votes
1answer
13 views

manage.py throwing error “PostgreSQL with tsearch2 support is needed to use the pgsql FTS backend”

First off, the requisite "I'm quite new to python" comment must be made. Some of my environment details: - Windows 7 - Python 2.7 - Django 1.3.4 - PostgreSQL 9.2 I get the following error thrown ...
0
votes
1answer
20 views

copy command with psycopg2 library

Is it possible to run the command below through psycopg2? If so, how can I do it? COPY table_name(col1,col2) FROM 'path/to/file.csv' WITH HEADER DELIMITER ',' CSV;
-1
votes
0answers
21 views

Django ORM: select_related with subquery

Is it possible to perform such select_related query on LineIdentification model: SELECT bli."id", bli."basket_id", [...] FROM ( SELECT * FROM "line_identification" as b ORDER BY ...
2
votes
1answer
51 views

syntax error when attempting to insert data into postgresql

I am attempting to insert parsed dta data into a postgresql database with each row being a separate variable table, and it was working until I added in the second row "recodeid_fk". The error I now ...
0
votes
0answers
22 views

gevent and posgres: Asynchronous connection failed

I'm using gevent to handle API I/O on a Django-based web system. I've monkey-patched using: import gevent.monkey; gevent.monkey.patch_socket() I've patched psychopg using: import psycogreen; ...
2
votes
1answer
42 views

Where to check for constraints, in django or database?

When considering performance, 1) Is it better to implement and check a constraint in python/django or in the database? Or possibly both? 2) In django, where is it best to check for constraints? ...
0
votes
1answer
28 views

Django unique together constraint failure?

Using Django 1.5.1. Python 2.7.3. I wanted to do a unique together constraint with a foreign key field and a slug field. So in my model meta, I did foreign_key = models.ForeignKey("self", null=True, ...
2
votes
0answers
128 views

SQLAlchemy ─ Mapping a Class against Multiple Tables

# ! /usr/bin/env python # -*- coding: utf-8 -*- # login_frontend.py """ Python 2.7.3 Cherrypy 3.2.2 PostgreSQL 9.1 psycopy2 2.4.5 SQLAlchemy 0.7.10 """ I'm ...
0
votes
2answers
62 views

Python: Array vs Database for storage of key/value

Q: Which is quicker for this scenario? My scenario: my application will be storing either in either an array or postgresql db a list of links, so it might look like: 1) mysite.com a) ...
0
votes
1answer
32 views

after working in local server, how to move OpenERP on a remote server?

I installed OpenERP V 7 on my local machine. I made ​​modification in the CSS. I also remove some menu, change the labels of some windows and change the position of some menus (one after the other in ...
-1
votes
1answer
33 views

Need serious help after attempting to deploy django to linode server [closed]

I recently attempted to deploy my django site on a linode ubuntu 10.4 server using linode..my file structure is as follows /srv/www/mysite.com/(all my django apps/files) I have configured the apache2 ...
0
votes
2answers
35 views

Psycopg2 - return first 1000 results and randomly pick one

Hi I have a postgresql "TABLE1" with 2.7 million records. Each record has a field "FIELD1" that may be empty or may have data. I want a SELECT statement or method that a) returns the first 1000 ...

1 2 3 4 5 58
15 30 50 per page