Re: "ResourceWarning: unclosed" error using mysql-connector-python

2014-06-12 Thread Zemian Deng
Anyone? On Tuesday, June 10, 2014 11:26:18 PM UTC-4, Zemian Deng wrote: > > Hi there, > > I am using mysql-connector-python (1.1.6) with Django (1.6.5) and myapp > is working fine. But each SQL call to DB will result the following warning > messages: > > Exception ignored in: type=SocketType.SO

Is anyone using MariaDB for Django on CentOS

2014-06-12 Thread Bill Freeman
I'm having trouble installing mysql-python because the MariaDB installed libmysqlclient_r.a is "incompatible" (missing dependencies according to http://data-matters.blogspot.com/2013/08/install-mysql-python-with-mariadb.html). There is rumored to be a fixed package for deb based systems, but neith

Re: How do I detect when a related object has been modified?

2014-06-12 Thread Mezzy
I see. I had feared that might be the answer when I was trying to think of a way to implement it. Incrementing the counter was just meant as a quick example not an actual use case. Maybe firing off a small function where accuracy can be fudged a bit when changes are detected. Thanks for your r

Re: Django OneToOne field problem

2014-06-12 Thread Max Demars
You will have to do content.link_set to retrieve the Link model related to the Content model instance. See: https://docs.djangoproject.com/en/dev/topics/db/queries/#following-relationships-backward On Thursday, June 12, 2014 2:54:48 PM UTC-4, Satinderpal Singh wrote: > > Suppose there are two t

Django OneToOne field problem

2014-06-12 Thread Satinderpal Singh
Suppose there are two tables defined in Django models: class Link(models.Model): links = models.CharField(max_length=50 ,blank=True) and class Content(models.Model): link = models.OneToOneField(Link, primary_key=True) title = models.CharField(max_length=50, blank=True) content =

Combine page content (html) and model instance (json) in ajax response

2014-06-12 Thread Max Demars
I would like my view to return the page content and some parameters that I would like to use in the Ext.Ajax.request success function. views.py def importFile(request): form = ImportVectorForm() html_response = render_to_response("page_content.html", {'form': form, 'folder':

Re: How to install psycpg2 in virtual enviroment with help easy_install.

2014-06-12 Thread Віталій Лисенко
Linux Mint 15 Olivia On 12 June 2014 18:48, Wellington Cordeiro wrote: > Just out of curiosity what OS are you on? > > On Thursday, June 12, 2014 7:48:43 AM UTC-6, Віталій Лисенко wrote: > >> Thank you. >> >> I am not have more questions. Thank. >> >> >> On 12 June 2014 16:11, Lachlan Musicman

Re: How to install psycpg2 in virtual enviroment with help easy_install.

2014-06-12 Thread Wellington Cordeiro
Just out of curiosity what OS are you on? On Thursday, June 12, 2014 7:48:43 AM UTC-6, Віталій Лисенко wrote: > > Thank you. > > I am not have more questions. Thank. > > > On 12 June 2014 16:11, Lachlan Musicman > > wrote: > >> Yep, "pip install" should be enough. Pip install is your friend in >

Re: How do I detect when a related object has been modified?

2014-06-12 Thread Tom Evans
On Thu, Jun 12, 2014 at 3:48 PM, Mezzy wrote: > Hello > > How do I detect when related models have changed; If I have models such as > the following: > > .. models.py > class Model1(models.Model): > > field = models.CharField(max_length=255, default="Some value") > > > class Model2(models.Model):

How do I detect when a related object has been modified?

2014-06-12 Thread Mezzy
Hello How do I detect when related models have changed; If I have models such as the following: .. models.py class Model1(models.Model): field = models.CharField(max_length=255, default="Some value") class Model2(models.Model): field = models.CharField(max_length=255, default="Some value")

Security release for Django REST framework: 2.3.14.

2014-06-12 Thread Tom Christie
Cross-posting this for the benefit of any Django REST framework users who aren't on the REST framework mailing list... The 2.3.14 version of REST framework has just been released to PyPI. Most importantly this includes

django-allauth--"cannot import name SignupForm"

2014-06-12 Thread willyhakim
Good morning the good people of django. I customized django-allauth signup page with following this advice from the author himself. https://stackoverflow.com/questions/12303478/how-to-customi

Re: How to install psycpg2 in virtual enviroment with help easy_install.

2014-06-12 Thread Віталій Лисенко
Thank you. I am not have more questions. Thank. On 12 June 2014 16:11, Lachlan Musicman wrote: > Yep, "pip install" should be enough. Pip install is your friend in > virtual environments. > > Jump into your environment ("workon ENV" or > "./path/to/ve/ENV/bin/activate"), and then > > pip insta

Re: Admin site doesn't work

2014-06-12 Thread Glen J
Running on linux mint. I'll keep plugging away and see what I can find. On Thursday, June 12, 2014 3:56:08 AM UTC-4, Sanjay Bhangar wrote: > > Hey Glen, > > Hm, whatever it is, is not apparent to me, sorry :/. The only thing I > can think of is possibly inconsistent indentation. Some comments /

Re: How to install psycpg2 in virtual enviroment with help easy_install.

2014-06-12 Thread Lachlan Musicman
Yep, "pip install" should be enough. Pip install is your friend in virtual environments. Jump into your environment ("workon ENV" or "./path/to/ve/ENV/bin/activate"), and then pip install Django postgresql_psycopg2 Is that what you were asking? On 12 June 2014 22:09, Віталій Лисенко wrote:

How to install psycpg2 in virtual enviroment with help easy_install.

2014-06-12 Thread Віталій Лисенко
Hi. 1. I installed easy_install 2. I installed virtual enviroment with help easy_install 3. I activated this enviroment 4. after this I created django project 5. Now I am need create database with help Postgresql: So, I am need to install backend namely postgresql_psycopg2 -- You received

Re: How to install psycopg2 using Pip?

2014-06-12 Thread Sugatang Itlog
Hi - When installing psycopg2 and errors like ... Error: pg_config executable not found do the following [root@localhost ~]# which -a pg_config /usr/bin/which: no pg_config in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin) [root@localhost ~]# find / -iname 'pg_co

Re: How to install psycopg2 using Pip?

2014-06-12 Thread Sugatang Itlog
Hi - If you get errors like this when install via pip install psycopg2 ... Error: pg_config executable not found. do the the following ... [root@localhost ~]# which -a pg_config /usr/bin/which: no pg_config in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin) [root@local

Re: Admin site doesn't work

2014-06-12 Thread Sanjay Bhangar
Hey Glen, Hm, whatever it is, is not apparent to me, sorry :/. The only thing I can think of is possibly inconsistent indentation. Some comments / questions inline -- On Thu, Jun 12, 2014 at 3:39 AM, Glen J wrote: > urls.py: > from django.conf.urls import patterns, include, url > > # Uncomment t