inline formset validation error

2011-02-13 Thread Sarang
I have an inline formset that has max_num=3 and extra=3. The form is displayed correctly, however, is_valid() on the formset returns a False with error: [{}, {'tag': [u'This field is required.']}, {'tag': [u'This field is required.']}] The first form has no error as the user has set some value

Re: _id cannot be null

2011-02-13 Thread keeper
hi np, it appears I found the solution, just needed to call save() on foreignkey before inserting new row into database: uid = user_list.objects.get(user_id=request.session['uid']); uid.save() Is this a correct way of creating new row which has 1-2 foreignkeys ? On Feb 12, 4:03 pm, webzy wrote:

_id cannot be null

2011-02-13 Thread keeper
np, it appears I found the solution, just needed to call save() on foreignkey before inserting new row into database: uid = user_list.objects.get(user_id=request.session['uid']); uid.save() Is this a correct way ? Thank you -- You received this message because you are subscribed to the Google

Re: Code Review As a Service

2011-02-13 Thread Cal Leeming [Simplicity Media Ltd]
Just for the record, I would advice anyone getting into this business to have this as part of a portfolio of services, rather than just a single service on its own. This area of work usually comes 'hand in hand' with other development services (with rare exceptions), and would be difficult to estab

Re: Looking for IDE + FTP

2011-02-13 Thread Cal Leeming [Simplicity Media Ltd]
Aptana looks nice, PYCharm looks a bit ugly :/ On Sat, Feb 12, 2011 at 5:10 PM, Dylan McCurry wrote: > I personally use Coda and love it. Built in ftp, terminal, css > editor, and code editor. > > On Feb 8, 3:30 pm, Karen McNeil wrote: > > I have three Django sites that I've been working on rec

Re: Customize flatpage

2011-02-13 Thread Andres Lucena
El vie, 11-02-2011 a las 12:35 -0800, galago escribió: > I found that > link: http://linfiniti.com/2011/01/bending-django-flatpages-to-your-will. I > want to make some customization in flatpage. Where should I put this extra > module and form? > I want to add 2 fields to custom flatpage. > You

Re: Customize flatpage

2011-02-13 Thread galago
Should I alternate original flatpage midddleware? If I won't do that, my new fields can be unseen? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group

Re: Looking for IDE + FTP

2011-02-13 Thread Axel Bock
"looks"? tried them yourself? :) for me it looks like aptana tried to focus on ruby/rails, while pycharm definitely focuses on python/django. -Axel. 2011/2/13 Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> > Aptana looks nice, PYCharm looks a bit ugly :/ > > On Sat,

Re: Looking for IDE + FTP

2011-02-13 Thread Ori Livneh
Karen, Windows lets you mount FTP and WebDAV shares. Linux additionally has SSHFS. (Less likely to be useful, but also worth mentioning, are SMB and NFS.) These are all good ways to have a remote folder behave as though it were a folder or a drive on your local computer, which allows you to use pr

Django ORM queryset problem

2011-02-13 Thread ezorro
Hi django users! I have two simple models: Person and Address. class Person(models.Model): first_name = models.CharField(max_length=64, blank=True, default='') last_name = models.CharField(max_length=64, blank=True, default='') class Address(models.Model): person = models

Re: Django + GWT

2011-02-13 Thread Brian Bouterse
We've built several GWT integrated Django applications where I work. My #1 tip would be to spend a lot of time in the Chrome developer tools. Secondly, use GWT as a front-end only since the Java integration is designed to create server side servlets to pair with the client side-UI GWT code. You'

Re: Looking for IDE + FTP

2011-02-13 Thread Praveen Krishna R
*+1 Notepad++ * On Sun, Feb 13, 2011 at 2:46 PM, Ori Livneh wrote: > Karen, > > Windows lets you mount FTP and WebDAV shares. Linux additionally has SSHFS. > (Less likely to be useful, but also worth mentioning, are SMB and NFS.) > These are all good ways to have a remote folder behave as though

Re: Django ORM queryset problem

2011-02-13 Thread Daniel Roseman
On Sunday, February 13, 2011 12:48:25 PM UTC, ezorro wrote: > > Hi django users! > > I have two simple models: Person and Address. > > class Person(models.Model): > first_name = models.CharField(max_length=64, blank=True, default='') > last_name = models.CharField(max_length=64, blank=True, def

Newbie Question

2011-02-13 Thread meni
I'm planning new web App. Short description of my app: I have hierarchy of: Company then under it the company subsidiary and each subsidiary as few clients each client has few sites and in each site I have few Apps. Company-> subsidiary1-> ClientX |

Re: Newbie Question

2011-02-13 Thread Cal Leeming [Simplicity Media Ltd]
Hey, I did this *exact* same thing for a requirement of one of our clients. We used an inherited permissions model, but it will require you to make substantial changes to the authentication system, and doesn't just work "out of the box". Best thing to do is to write it up from scratch, then monke

Newbie Question

2011-02-13 Thread zedkil
Hi all, I'm not sure if its the right place to ask, so if it not can someone direct me to the right place. I'm newbie to django I'm planning new web App and I've some question since I'm not sure if what i'm planning is possible at all. Short description of my app: I have hierarchy of: Company

Re: Newbie Question

2011-02-13 Thread Cal Leeming [Simplicity Media Ltd]
-repost- Hey, I did this *exact* same thing for a requirement of one of our clients. We used an inherited permissions model, but it will require you to make substantial changes to the authentication system, and doesn't just work "out of the box". Best thing to do is to write it up from scratch, t

Re: Looking for IDE + FTP

2011-02-13 Thread Mike Ramirez
On Sunday, February 13, 2011 03:46:15 am Ori Livneh wrote: > Karen, > > Windows lets you mount FTP and WebDAV shares. Linux additionally has SSHFS. > (Less likely to be useful, but also worth mentioning, are SMB and NFS.) SSHFS is fine in the real world, it's only problem is that it reports inco

Re: Newbie Question

2011-02-13 Thread zedkil
Could you elaborate please ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more o

Re: Django ORM queryset problem

2011-02-13 Thread ezorro
It works. Seems that I never understood the power of these Q objects. Thank you! ez On Feb 13, 3:12 pm, Daniel Roseman wrote: > On Sunday, February 13, 2011 12:48:25 PM UTC, ezorro wrote: > > > Hi django users! > > > I have two simple models: Person and Address. > > > class Person(models.Model):

Override Method on DB get / filter / all

2011-02-13 Thread BW
I know you can override the save() method in a model, but is it possible to do it when you try to get a row or rows from a db? I have data like this '\xFF\x00\x00\x00\xFE'... that I need to store in a MySQL db. When I was trying to save it I was getting an error. Now I override the __save__ met

Re: Newbie Question

2011-02-13 Thread Cal Leeming [Simplicity Media Ltd]
Okay er, there's a group model, where a group can belong to a parent group, and then the permissions for the children are inherited from the parent object, with the permissions specified on the child object being the overrides. I am looking to re-write this soon, so I will ask the client if they w

Caught exception bug --

2011-02-13 Thread marco giardina
hello all, django 1.2.4 with oracle_xe vrs. and debian filesystem -- i received the following error when search data on a table manytomay: Caught an exception while rendering: ORA-00932: inconsistent datatypes: expected - got NCLOB

Re: Override Method on DB get / filter / all

2011-02-13 Thread Shawn Milochik
You can make a custom manager. http://docs.djangoproject.com/en/dev/topics/db/managers/#custom-managers-and-model-inheritance You probably don't realize it from normal use, but the 'objects' property you're using on your models is an instance of models.Manager, not an internal part of the models.

Re: inline formset validation error

2011-02-13 Thread Shawn Milochik
You can iterate through the forms in your formset and call is_valid() (and optionally save()) on them based on your needs. Since your definition of "left blank" and "invalid" could vary based on what you're doing, it's better that you make those decisions explicit. If Django tried to decide for yo

Re: Google App Engine supports Django 1.2!

2011-02-13 Thread Darrel Herbst
No, it does not support the datastore. Now you do not have to distribute your own zipfile of Django 1.2.5. The word 'supports' does not refer to Django integration with the GAE api's, but rather that this new version is available on the server. Django 1.2.5 was added so that you can load it v

Re: Login, Password Recovery, etc

2011-02-13 Thread Andres Lucena
El vie, 11-02-2011 a las 21:06 -0500, Mike Seidle escribió: > Quick question - is there an application or examples of completely > implemented > user authentication templates? It's getting old trying to devine how to set > up templates for password recovery and registration. Seems to me that th

Re: Customize flatpage

2011-02-13 Thread Andres Lucena
El dom, 13-02-2011 a las 04:02 -0800, galago escribió: > Should I alternate original flatpage midddleware? > If I won't do that, my new fields can be unseen? No, you don't have to change the middleware. AFAIK the middleware [0] the only thing it does is capture the 404 and try to get the flatpag

foreign key help

2011-02-13 Thread Bobby Roberts
class Disposition (models.Model): id = models.AutoField (primary_key=True) name = models.CharField (max_length=50, blank=False, db_index=True) active = models.IntegerField(blank=False, choices=active_choices) order = models.IntegerField(blank=True, default=0) class D

Re: foreign key help

2011-02-13 Thread Tom Evans
On Sun, Feb 13, 2011 at 7:54 PM, Bobby Roberts wrote: > class Disposition (models.Model): >        id = models.AutoField (primary_key=True) >        name = models.CharField (max_length=50, blank=False, > db_index=True) >        active = models.IntegerField(blank=False, > choices=active_choices) >

Re: foreign key help

2011-02-13 Thread Tom Evans
On Sun, Feb 13, 2011 at 8:04 PM, Tom Evans wrote: > Your Disposition object has now __unicode__ method, which is how the 'has *no* __unicode__ method' Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Location for generating temporary files

2011-02-13 Thread vivek_12315
Hello all, while coding for views in django, i feel the need of generating files, more like logs. But i want all those logs to be generated in a specific directory. So, can I use my settings.py file for defining such a location of dir. and in views files' i can refer to that settings value some h

Re: Login, Password Recovery, etc

2011-02-13 Thread indymike
Andres - Thank you. This is EXACTLY what I was looking for. Five stars to you. On Feb 13, 2:10 pm, Andres Lucena wrote: > El vie, 11-02-2011 a las 21:06 -0500, Mike Seidle escribió: > > > Quick question - is there an application or examples of completely > > implemented > > user authentication

Re: Location for generating temporary files

2011-02-13 Thread Mike Dewhirst
On 14/02/2011 9:37am, vivek_12315 wrote: Hello all, while coding for views in django, i feel the need of generating files, more like logs. But i want all those logs to be generated in a specific directory. So, can I use my settings.py file for defining such a location of dir. and in views files

Caught KeyError while rendering: u'objects_name'

2011-02-13 Thread Bobby Roberts
when i try to delete one of the TractorRecord objects in this model, i get this message: Caught KeyError while rendering: u'objects_name' any idea what that means? Django 1.2.3 (mod_wsgi 3.2/Python 2.6) # this holds possible dispositions for Tractoruees class Disposition (models.Model):

Re: Location for generating temporary files

2011-02-13 Thread Mike Ramirez
On Sunday, February 13, 2011 02:37:07 pm vivek_12315 wrote: > Hello all, > > while coding for views in django, i feel the need of generating files, > more like logs. But i want all those logs to be generated in a > specific directory. > > So, can I use my settings.py file for defining such a loca

Re: Caught KeyError while rendering: u'objects_name'

2011-02-13 Thread Bobby Roberts
i'm also using the grappelli skin for admin On Feb 13, 5:52 pm, Bobby Roberts wrote: > when i try to delete one of the TractorRecord objects in this model, i > get this message: > > Caught KeyError while rendering: u'objects_name' > > any idea what that means? > > Django 1.2.3 (mod_wsgi 3.2/Pytho

Re: Caught KeyError while rendering: u'objects_name'

2011-02-13 Thread Ivo Brodien
Hi, when the admin is deleting an object it gathers a list (calling all unicode methods) of other foreign key objects and displays them as a warning that they will also be deleted. I think the error occurs in: > class Disposition (models.Model): > [] >def __unicode__(self): >

Re: Caught KeyError while rendering: u'objects_name'

2011-02-13 Thread Bobby Roberts
returning foo resulted in the same error. On Feb 13, 6:29 pm, Ivo Brodien wrote: > Hi, > > when the admin is deleting an object it gathers a list (calling all unicode > methods) of other foreign key objects and displays them as a warning that > they will also be deleted. > I think the error

url as argument in a view

2011-02-13 Thread ecasbas
Hi I was looking to solve this 'newbie' problem but I am unable to find a correct solution. I am trying to pass a url as an argument. The url regex in the urls file is ok, but when I try execute the program I get this error message: rescan() takes exactly 1 argument (3 given) where: in views.p

Is there a Django application similar to Drupal's Organic Groups module?

2011-02-13 Thread mubbers
Basically I am looking for the following: - Groups can be created by users of the site. - Users can apply to join a group. - Every group has a group administrator which can approve or reject applications to join a group. Also, they can remove members from a group. - Content can be created which is

Django Mutlisite Setup

2011-02-13 Thread Jason Drane
Forgive me if this question offends you more advanced users. I am begun down the road of learning Django. I am curious if it is possible to place Django in the root of my server and reference it to each of multiple sites in development, similar to php, python, etc. -- You received this message b

Re: Django Mutlisite Setup

2011-02-13 Thread Shawn Milochik
It doesn't work that way with Django. You run each Django project on a different port, and your Web server (nginx, apache, whatever) forwards incoming traffic to the correct port. Your Python code (all Django is Python) should never be accessible via your Web server. Your Django app will run as a

Re: Django Mutlisite Setup

2011-02-13 Thread Mike Dewhirst
On 14/02/2011 2:08pm, Jason Drane wrote: Forgive me if this question offends you more advanced users. I am begun down the road of learning Django. I am curious if it is possible to place Django in the root of my server and reference it to each of multiple sites in development, similar to php, py

Re: Django Mutlisite Setup

2011-02-13 Thread Ethan Yandow
I am offended On Sun, Feb 13, 2011 at 10:20 PM, Mike Dewhirst wrote: > On 14/02/2011 2:08pm, Jason Drane wrote: > >> Forgive me if this question offends you more advanced users. I am >> begun down the road of learning Django. I am curious if it is possible >> to place Django in the root of my se

Re: Django Mutlisite Setup

2011-02-13 Thread Eric Chamberlain
On Feb 13, 2011, at 7:08 PM, Jason Drane wrote: > Forgive me if this question offends you more advanced users. I am > begun down the road of learning Django. I am curious if it is possible > to place Django in the root of my server and reference it to each of > multiple sites in development, sim

Re: Google App Engine supports Django 1.2!

2011-02-13 Thread Sarang
Thanks for the clarification. Yes, I am using django-nonrel which installed 1.3.0 alpha 1 for me. Regards, Sarang -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscrib

Re: Django Mutlisite Setup

2011-02-13 Thread Brian Bouterse
virtualenv is great and I use it religiously. I do want to point out though that while virtualenv does solve package isolation for multiple, independent django projects, care needs to be taken for security. If this care isn't taken, for example, should a single site's security be compromised, ess

Re: Override Method on DB get / filter / all

2011-02-13 Thread Jani Tiainen
On Sunday 13 February 2011 18:18:39 BW wrote: > I know you can override the save() method in a model, but is it > possible to do it when you try to get a row or rows from a db? I have > data like this '\xFF\x00\x00\x00\xFE'... that I need to store in a > MySQL db. > > When I was trying to save i