ManyToManyFields - a double operation to the database?

2010-04-04 Thread Robert
I wonder whether you have to save a record to the database BEFORE you can update a ManyToMany field? I came across a post by Karen Tracey that seems to suggest this. The problem is that I am unable to do so because the ManyToManyField in my model has no default value and this triggers an error wh

Re: ManyToManyFields - a double operation to the database?

2010-04-04 Thread Daniel Roseman
On Apr 4, 11:56 am, Robert wrote: > I wonder whether you have to save a record to the database BEFORE you > can update a ManyToMany field? > > I came across a post by Karen Tracey that seems to suggest this. > > The problem is that I am unable to do so because the ManyToManyField > in my model has

Re: Model inheritance foreign key user

2010-04-04 Thread Daniel Roseman
On Apr 3, 10:37 pm, Fredrik wrote: > What I want is to "automatic" add an owner to every object.. > > Is there another way to accomplish the same? > > Fredrik > Do you need the PersistentModel field to exist in a separate table? It sounds to me as if that would be better off as an abstract model.

Re: ManyToManyFields - a double operation to the database?

2010-04-04 Thread Robert
Hi, I get OperationalError: (1364, "Field, 'user_id' doesn't have a default value") As I understand, the many-to-many relationship shall be taken care of by a join table.No such table shows up when I run mysql show tables;. I have of course run a syncdb command. All other tables are present. Tha

Re: ManyToManyFields - a double operation to the database?

2010-04-04 Thread Daniel Roseman
On Apr 4, 1:44 pm, Robert wrote: > Hi, > > I get OperationalError: (1364, "Field, 'user_id' doesn't have a > default value") > > As I understand, the many-to-many relationship shall be taken care of > by a join table.No such table shows up when I run mysql show tables;. > I have of course run a sy

Re: ManyToManyFields - a double operation to the database?

2010-04-04 Thread Robert
That's a spot on, DR. I'll try that and I'm sure it will work out. Have an excellent day. R On 4 apr, 15:03, Daniel Roseman wrote: > On Apr 4, 1:44 pm, Robert wrote: > > > Hi, > > > I get OperationalError: (1364, "Field, 'user_id' doesn't have a > > default value") > > > As I understand, the

Re: Model inheritance foreign key user

2010-04-04 Thread Thierry Chich
You are right but it would not change his problem. If 2 or more classes inherit from a class with a foreignkey or a manytomany, there will be a conflict in the related name Le 4 avr. 2010 à 14:11, Daniel Roseman a écrit : On Apr 3, 10:37 pm, Fredrik wrote: What I want is to "automat

Re: Hosting for Django sites

2010-04-04 Thread Justin Myers
I'm a fan of Webfaction's shared plans, and I've used them for three or four projects now. I've had no problems with their support, and they even did a pretty good job keeping everyone informed when they were affected by that big explosion at The Planet's datacenter a couple of years ago (http://te

decorators

2010-04-04 Thread CrabbyPete
I am using pyfacebook and when I run the debug server I get the following: C:\Python26\lib\site-packages\facebook\djangofb\__init__.py:185: DeprecationWarning: Calling the deprecated function 'new_wrapper' Downgrade to decorator 2.3 if you want to use this functionality return decorator.new_wrap

Re: Django-registration with django-profile

2010-04-04 Thread Alessandro Ronchi
2010/4/3 shacker : > Cool!  Would be nice to put your solution up on djangosnippets.org or > similar for the benefit of others. It's nothing new. I've copied the default backend for django-registration, changed the RegistrationForm and handled correctly the form with a view. It's simply a matter

Re: Geodjango tutorials?

2010-04-04 Thread Tyler Erickson
Another tutorial: http://linfiniti.com/2009/11/geodjango-tutorial/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+un

Re: Geodjango tutorials?

2010-04-04 Thread Nabil Servais
Le 3 avr. 2010 à 04:16, Benjamin Welton a écrit : > Hey All, > > Im wondering if anyone has some good links to geodjango tutorials (outside > of the main one featured on geodjango.org)? Specifically any related to > Google Map integration (since that subsection appears to be missing in the

Re: Is any thing for python like .jar files for java.

2010-04-04 Thread George Cox
On 9 Feb 2010, at 20:05, chiranjeevi muttoju wrote: > Is there any concept in python like .jar files in java. If anybody of you > know please reply me. This is not a Django question and could have been answered by some judicious use of Google. Have a look at http://docs.python.org/lib

RSS feeds of model instances by tag

2010-04-04 Thread Nick
I have a question about RSS feeds for objects by tag. I'm using this statement currently in a feed class items method, which accepts a tag as an 'obj' parameter: return Model.objects.filter(tags__icontains=obj.name).order_by('- pub_date')[:10] This statement works, but I get mixed results in my

Re: Is any thing for python like .jar files for java.

2010-04-04 Thread Ozgur Yılmaz
python egg's E.Ozgur Yilmaz Lead Technical Director www.ozgurfx.com On Sun, Apr 4, 2010 at 11:12 PM, George Cox wrote: > On 9 Feb 2010, at 20:05, chiranjeevi muttoju wrote: > > > Is there any concept in python like .jar files in java. If anybody of you > know please reply me. > > This is not a

Re: How to use CommaSeperatedIntegerList with CheckboxSelectMultiple

2010-04-04 Thread Bill Freeman
Perchance are you somehow passing a list of list? When the validator strips off the outer list, it would get a list instead of a string, which would match the error message (that's the only reason I suggest it). Otherwise, pdb is your friend. I particularly like running the dev server under emac

Re: Hosting for Django sites

2010-04-04 Thread Nick Lacey
Matt wrote: > plus im uk based so phone wouldn't really help. Speaking of being UK based .. for the project all I'm working on, *all* the users will be in the UK, so I'm not sure about performance issues caused by servers in the US. Do I need to worry about the host not being based in Europe?

django + tagging + multilingual + postgresql: Programming error exception

2010-04-04 Thread pgsn
Hi. I'm getting the following error message when i try to navigate by tags: from tagging.views import tagged_object_list info_dict = { 'queryset_or_model': Article.objects.filter(enabled=True), 'paginate_by': paginate_parm, } url(r'^tag/(?P[^/]+)/$', tagged_object_list, info_dict, name='

Re: django + tagging + multilingual + postgresql: Programming error exception

2010-04-04 Thread pgsn
Wow, I just tried to run it on mysql instead of postgresql, and everything worked fine. Is this a postgresql bug? I really wouldn't like to switch to mysql. On Apr 5, 5:59 am, pgsn wrote: > Hi. I'm getting the following error message when i try to navigate by > tags: > > from tagging.views import

error about django and mssql

2010-04-04 Thread CCC
hi,now I use django-mssql and sqlserver2008, but I found that it always appear some errors when I do some command,for example:python manage.py syncdb the error likes coding error is blow: raise OperationalError(e, "Error opening connection: " + connection_string) ngo.db.backends.sqlserver_ado.dbapi

error about django and mssql

2010-04-04 Thread CCC
hi,now I use django-mssql and sqlserver2008, but I found that it always appear some errors when I do some command,for example:python manage.py syncdb the error likes coding error is blow: raise OperationalError(e, "Error opening connection: " + connection_string) ngo.db.backends.sqlserver_ado.dbapi

error about django and mssql

2010-04-04 Thread CCC
hi,now I use django-mssql and sqlserver2008, but I found that it always appear some errors when I do some command,for example:python manage.py syncdb the error likes coding error is blow: raise OperationalError(e, "Error opening connection: " + connection_string) ngo.db.backends.sqlserver_ado.dbapi

ORM: get, filter and DoesNotExist

2010-04-04 Thread zweb
after some debugging, just found out that filter method does not throw DoesNotExist while get does. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this grou

Re: Hosting for Django sites

2010-04-04 Thread Michael
On Mon, Apr 5, 2010 at 12:33 PM, Nick Lacey wrote: > Matt wrote: > >>  plus im uk based so  phone wouldn't really help. > > Speaking of being UK based .. for the project all I'm working on, > *all* the users will be in the UK, so I'm not sure about performance > issues caused by servers in the US.

Re: ORM: get, filter and DoesNotExist

2010-04-04 Thread Russell Keith-Magee
On Mon, Apr 5, 2010 at 11:33 AM, zweb wrote: > after some debugging, just found out that > filter method does not throw DoesNotExist while get does. get() returns a single object. If a single object does not exist, you get a DoesNotExist exception. This is documented: http://docs.djangoproject.c

Re: Is any thing for python like .jar files for java.

2010-04-04 Thread Anand Agarwal
I think you mean python egg. -Anand www.bootstraptoday.com On Wed, Feb 10, 2010 at 1:35 AM, chiranjeevi muttoju wrote: > Hi all, > Is there any concept in python like .jar files in java. If anybody of you > know please reply me. > > -- > Thanks and regards, > chiranjeevi.muttoju > > -- > You rec

Re: Is any thing for python like .jar files for java.

2010-04-04 Thread ankit rai
you can use deb file for ur python project On Mon, Apr 5, 2010 at 11:48 AM, Anand Agarwal wrote: > I think you mean python egg. > > -Anand > www.bootstraptoday.com > > On Wed, Feb 10, 2010 at 1:35 AM, chiranjeevi muttoju < > chiru.bt...@gmail.com> wrote: > >> Hi all, >> Is there any concept in p