Tagged Questions
3
votes
1answer
102 views
Python 2.7 connection string to PostgreSQL (OOP method)
I'm new to python and I'm trying to make this work. I'm using Python 2.7 and PostgreSQL 9.3:
#! F:\Python2.7.6\python
import psycopg2
class Database:
host = "192.168.56.101"
user = ...
1
vote
2answers
41 views
Django Query with multiple matches
I have 2 lists, I can't process the logic in my head on what I'm supposed to do to complete the next step.
Versions:
Django 1.5.4
Python 2.7
PostgreSQL 9.3
Model:
class Channel(models.Model):
...
1
vote
1answer
83 views
Why in SQLAlchemy base.metadata.create_all(engine) in python console not showing table?
I am trying to create database and insert values in it. I am using postgres database. I do not see any error when I do following
>>> from sqlalchemy import create_engine
>>> engine ...
1
vote
1answer
217 views
Django Query sort case-insensitive using Model method with PostgreSQL
I'm really new to django, python and postgres... I can't seem to find the answer on how to order_by being case insensitive while using Model as the query method, only if you use direct SQL queries.
...
1
vote
0answers
76 views
ipython notebook and psycopg2 don't work together
I am new with using mac os, maybe thats why i got such troubles.
So firstly I found out problem with running ipython notebook and successfully solved it with this two commands in shell (thx to ...
0
votes
1answer
198 views
How to install PL/Python on PostgreSQL 9.3 x64 Windows 7?
I have tried to install the PL/Python v2.x language inside PostgreSQL on my database running the query:
CREATE EXTENSION plpythonu;
(I got this from ...
0
votes
1answer
24 views
Django ORM grouping by birthdates
I've been really struggling to find a good way to group by a range of dates using django's ORM. I have a user that has a field for birthdate, and I would like to group by all the users that are in ...