Re: Django (cache?) make some mistake with formset generated class

2013-11-07 Thread Bastien Sevajol
You're right! I mistake with python object logic :/ Sorry ! Thank's ! Le jeudi 7 novembre 2013 14:45:45 UTC+1, Simone Federici a écrit : > > > On Thu, Nov 7, 2013 at 11:54 AM, Bastien Sevajol > > > wrote: > >> formsets = {} > > > this class variable is in ModelFormsetManager class namespace > s

Re: Complex query reduction

2013-11-07 Thread akaariai
On Friday, November 8, 2013 8:44:09 AM UTC+2, Robin St.Clair wrote: > > Anssi > > The last time I checked the use of IN, all the records from the database > in the query were brought back to the workstation, rather than being > processed on the backend and only the results returned to the workst

Re: Complex query reduction

2013-11-07 Thread Robin St . Clair
Anssi The last time I checked the use of IN, all the records from the database in the query were brought back to the workstation, rather than being processed on the backend and only the results returned to the workstation. Have there been changes that carry out the entire query on the backend

Re: Issues saving a formset form with multiple forms.

2013-11-07 Thread Jason S
Its likely i'm passing the wrong arguements, because its a type mismatch error However i'm only passing the request.POST, instance and request.user. Since the two arguements are "self" and "user", prehaps i'm not passing the self objject corrrectly, though I thought this was past of the request.

Re: Complex query reduction

2013-11-07 Thread akaariai
On Sunday, November 3, 2013 1:48:07 PM UTC+2, Robin St.Clair wrote: > > *IN* > >- if using Django avoid the IN operation at all costs > > > If there are potentially more than 15 items in the list, rework the IN as > a JOIN against whatever the source of the keys is > I don't necessarily agree

Re: Django 1.6 transactions witn multiple databases

2013-11-07 Thread akaariai
On Thursday, November 7, 2013 3:36:17 PM UTC+2, Vaal wrote: > > Hi > How to be in 1.6 with queries that involve multiple databases? > Previously recommended to create custom TransactionMiddleware. It was > convenient. Now TransactionMiddleware is deprecated. > You can set ATOMIC_REQUESTS per data

Re: Issues saving a formset form with multiple forms.

2013-11-07 Thread Jason S
Hi, Thanks for the tip, i tried adding the user as the argument, i tried the following: new_post = pform.save(user=request.user) new_post = pform.save(user) new_post = pform.save(request.user) and a few other things... Now i just get the following save() takes at least 2 arguments (2 given) Any

Re: django debugger

2013-11-07 Thread CLIFFORD ILKAY
On 11/07/2013 02:19 PM, Harjot Mann wrote: > Is it possible to view the sql queries working at the backend of > django from browser directly? Django debug toolbar will do that. -- Regards, Clifford Ilkay 647-778-8696 Dinamis

Re: Invitations Apps

2013-11-07 Thread Avraham Serour
You could create a invitation model, I don't see the problem but maybe you don't even need to, if all you want is for a user to ask the server to send some emails you can just do that: let the user ask the server to send emails. On Thu, Nov 7, 2013 at 11:43 PM, Rafael E. Ferrero wrote: > Im doi

Re: Invitations Apps

2013-11-07 Thread Rafael E. Ferrero
Im doing a project where visitors can registers with his social accounts (this it can be done with AllAuth in a very simple way) When a visitor get registered the system he can create a group. (this is not a problem too) But... a registered visitor can invitate, by email, to other people to join in

Re: Invitations Apps

2013-11-07 Thread Amirouche Boubekki
Héllo Rafael, I don't know those particular applications, so I can't help. Do you have a specific problem? 2013/11/7 Rafael E. Ferrero > No body can help me? > > > 2013/11/7 Rafael E. Ferrero > > >> Has someone used some invitation app for django like django-invitation >> [1]... and more, ha

Re: Issues saving a formset form with multiple forms.

2013-11-07 Thread Jason S
Hi Paul, Thanks, now you mention it and I look at it again it seems obvious, can't see the wood for the trees moment. Funnily enough I had that included at some point, but have made so many changes. I'll try that tonight when I get home, thanks very much for the prompt reply! Kind regards, Jaso

Re: Invitations Apps

2013-11-07 Thread Rafael E. Ferrero
No body can help me? 2013/11/7 Rafael E. Ferrero > > Has someone used some invitation app for django like django-invitation > [1]... and more, has someone integrated something like that with AllAuth > [2] ?? > > In a project I need visitors to register on the site with their social > accounts.

Re: django debugger

2013-11-07 Thread Harjot Mann
On Thu, Nov 7, 2013 at 11:35 PM, Andrew Farrell wrote: > It is possible to use pdb (or ipdb: https://pypi.python.org/pypi/ipdb) by > inserting a set_trace() call and then running the django dev server with > `manage.py runserver`. For example, the following will print the number of > database quer

Re: Problem with Oauth and 1.6

2013-11-07 Thread Thomas Murphy
What's the full 403 response header? On Thu, Nov 7, 2013 at 10:27 AM, Saurabh Ganeriwal wrote: > I have a backend that is build on rest framework and uses python social auth > for Google OAuth2 authentication. The app suddenly stopped working > yesterday. And after spending a day the problem seem

Re: django debugger

2013-11-07 Thread Andrew Farrell
It is possible to use pdb (or ipdb: https://pypi.python.org/pypi/ipdb) by inserting a set_trace() call and then running the django dev server with `manage.py runserver`. For example, the following will print the number of database queries before and then after a function which touches the datab

Re: foreign key within a manytomany within a model in admin

2013-11-07 Thread MikeKJ
Think this may be a solution: Models: Advice, AdviceLevel, Organisation class Organsiation(models.Model): title = models.CharField(max_length=150) advice = models.ManyToManyField(Advice, through='AdviceLevel') class AdviceLevel(models.Model): advice = models.ForeignKey(Advice)

Problem with Oauth and 1.6

2013-11-07 Thread Saurabh Ganeriwal
I have a backend that is build on rest framework and uses python social auth for Google OAuth2 authentication. The app suddenly stopped working yesterday. And after spending a day the problem seems to be django 1.6. Following combination seems to work properly: Django - 1.5.5 Django rest frame

Re: Django 1.5 or Django 1.6 with python 3.3 on windos Server 2008

2013-11-07 Thread Timothy W. Cook
RTFM: https://docs.djangoproject.com/search/?q=Apache It is very good. On Thu, Nov 7, 2013 at 11:33 AM, Robert Jonathan Šimon wrote: > OK thank you, i need a real server, because a already created aplication (a > part) and i want to deliver to the internet. So best solution is Apache. How > can

Re: Issues saving a formset form with multiple forms.

2013-11-07 Thread pnichols104
Hey Jason-- You defined the save method as needing the user parameter, but you don't pass that in. Try that (assuming user should equal request.user). Good luck! -Paul On Thursday, November 7, 2013 5:25:18 AM UTC-5, Jason S wrote: > > Hi, > Disclaimer - I'm new to django and python, so plea

Re: Django 1.5 or Django 1.6 with python 3.3 on windos Server 2008

2013-11-07 Thread Harry Houdini
You will want to use mod_wsgi: https://code.google.com/p/modwsgi/ On Thursday, November 7, 2013 8:33:12 AM UTC-5, Robert Jonathan Šimon wrote: > > OK thank you, i need a real server, because a already created aplication > (a part) and i want to deliver to the internet. So best solution is Apach

AbstractBaseUser with a foreignkey...

2013-11-07 Thread Vanni Brutto
i'm trying to use AbstractBaseUser to extend the user model... i used the code found on django pages, the only difference is that i use a foreignkey to "Sistema" models. The originale code is on django pages: https://docs.djangoproject.com/en/dev/topics/auth/customizing/ my changes was: [...]

Re: Django (cache?) make some mistake with formset generated class

2013-11-07 Thread Simone Federici
On Thu, Nov 7, 2013 at 11:54 AM, Bastien Sevajol wrote: > formsets = {} this class variable is in ModelFormsetManager class namespace so it is shared across the subclasses. You are using formsets to save before the object class, and after the instances, so when in the formset there is the insta

foreign key within a manytomany within a model in admin

2013-11-07 Thread MikeKJ
Sorry didnt know how else to describe what I am trying to do I have 3 models Advice AdviceLevel Organisation So the idea is: An organisation can dispense more than 1 advice: class Organsiation(models.Model): title = models.CharField(max_length=150) advice = models.ManyToManyField(Adv

Re: Django 1.6 transactions witn multiple databases

2013-11-07 Thread Vaal
err queries = requests -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-use

Django 1.6 transactions witn multiple databases

2013-11-07 Thread Vaal
Hi How to be in 1.6 with queries that involve multiple databases? Previously recommended to create custom TransactionMiddleware. It was convenient. Now TransactionMiddleware is deprecated. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsu

Re: Django 1.5 or Django 1.6 with python 3.3 on windos Server 2008

2013-11-07 Thread Robert Jonathan Šimon
OK thank you, i need a real server, because a already created aplication (a part) and i want to deliver to the internet. So best solution is Apache. How can i install it with django 1.5 and python 3.3? On Thu, Nov 7, 2013 at 1:40 PM, Mike Dewhirst wrote: > On 7/11/2013 9:34pm, Robert Jonathan Š

Invitations Apps

2013-11-07 Thread Rafael E. Ferrero
Has someone used some invitation app for django like django-invitation [1]... and more, has someone integrated something like that with AllAuth [2] ?? In a project I need visitors to register on the site with their social accounts. Once registered the system will create a group which will own. The

Django (cache?) make some mistake with formset generated class

2013-11-07 Thread Bastien Sevajol
Hello, i don't know if it's a django or python problem. But i correct a strange bug and would know why my code was bugging and if it was django, python, or me. The situation (and solution) is exposed here

Re: Django 1.5 or Django 1.6 with python 3.3 on windos Server 2008

2013-11-07 Thread Mike Dewhirst
On 7/11/2013 9:34pm, Robert Jonathan Šimon wrote: I still dont now how i can install Django into IIS. If you decide to use IIS you will find very few people able to help you if things go wrong. From a practical perspective, it would be safer to use Apache in your Django stack. However, you

Re: [ANNOUNCE] Django 1.6 and Django 1.4.10 released

2013-11-07 Thread Sithembewena Lloyd Dube
Thank you to everyone who's making this framework better :) On Thu, Nov 7, 2013 at 1:30 PM, Mário Neto wrote: > Thanks for all! =) > > > 2013/11/6 wudiweb > >> Thanks for all contributors >> >> 在 2013年11月6日星期三UTC+8下午11时09分45秒,James Bennett写道: >> >>> Django 1.6 and Django 1.4.10 are out today;

Re: [ANNOUNCE] Django 1.6 and Django 1.4.10 released

2013-11-07 Thread Mário Neto
Thanks for all! =) 2013/11/6 wudiweb > Thanks for all contributors > > 在 2013年11月6日星期三UTC+8下午11时09分45秒,James Bennett写道: > >> Django 1.6 and Django 1.4.10 are out today; the latter is a bugfix >> release to restore Python 2.5 compatibility in the 1.4 series. >> >> Full details are in the blog po

Re: Django 1.5 or Django 1.6 with python 3.3 on windos Server 2008

2013-11-07 Thread Robert Jonathan Šimon
I still dont now how i can install Django into IIS. On Thu, Nov 7, 2013 at 11:21 AM, Timothy W. Cook wrote: > Did you see this: > https://docs.djangoproject.com/en/1.6/howto/auth-remote-user/# > > On Thu, Nov 7, 2013 at 8:18 AM, Robert Jonathan Šimon > wrote: > > I search for how can i do this

Issues saving a formset form with multiple forms.

2013-11-07 Thread Jason S
Hi, Disclaimer - I'm new to django and python, so please bear with me. Note: My django instance uses a nosql database. I'm trying to create a formset which has multiple forms based on models. The formset will have one form "post", then 1-3 "comment" forms. Eventually i'd like to be able to add/

Re: Django 1.5 or Django 1.6 with python 3.3 on windos Server 2008

2013-11-07 Thread Timothy W. Cook
Did you see this: https://docs.djangoproject.com/en/1.6/howto/auth-remote-user/# On Thu, Nov 7, 2013 at 8:18 AM, Robert Jonathan Šimon wrote: > I search for how can i do this, but i didnt find anything. Can you help me? > It would be great if it can be on IIS 7.5 > > -- > You received this messag

Django 1.5 or Django 1.6 with python 3.3 on windos Server 2008

2013-11-07 Thread Robert Jonathan Šimon
I search for how can i do this, but i didnt find anything. Can you help me? It would be great if it can be on IIS 7.5 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an emai

Re: Django storage engine

2013-11-07 Thread Roberto López López
Which is the question? On 07. nov. 2013 09:15, Harjot Mann wrote: Is using the InnoDb storage engine as default as per my knowledge in MySql MyISAM is the default storage engine. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: Django storage engine

2013-11-07 Thread François Schiettecatte
Hi InnoDB is the default storage engine in MySQL from version 5.5 onwards. I would not recommend using MyISAM for anything other than archive tables, the table level locking on any update is a serious bottleneck. Cheers François On Nov 7, 2013, at 3:15 AM, Harjot Mann wrote: > Is using th

Saving an inline view and executing an aggregating function only once

2013-11-07 Thread Victor
I made an effort to simplify my app and translate it into English. Here it is = models.py . class Items(models.Model): code = models.CharField(primary_key=True,max_length=15,db_column='code') description = models.CharField(max_length=255, db_

Django storage engine

2013-11-07 Thread Harjot Mann
Is using the InnoDb storage engine as default as per my knowledge in MySql MyISAM is the default storage engine. -- Harjot Kaur Mann Blog: http://harjotmann.wordpress.com/ Daily Dairy: http://harjotmann.wordpress.com/daily-diary/ -- You received this message because you are subscribed to the Go