ImageField always invalid

2008-10-15 Thread Gollum
Here's my simple form: class AvatarForm(forms.Form): """Form for uploading avatars""" avatar = forms.ImageField() and here's the view that processes it: def avatar(request): """View to process avatar uploads""" import pdb; pdb.set_trace() if request.metho

Re: Dumping objects in templates

2008-02-08 Thread Gollum
Thanks a lot! I know how to add tags, so I guess I'll start working on my own debug tools lib, but its still feels rather strange that I ought to do it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" g

Dumping objects in templates

2008-02-08 Thread Gollum
Hi, all! Is there any way to dump the whole object to html, for usual debugging purposes. All I want is to see some objects whole structure, all field values, child sets, etc. that are available for template. I'm kind of new to python and django, but I have some cakePHP experience and debug() func

newforms: emptying fields after failed validation

2008-02-25 Thread Gollum
I use form.clean() method to validate two fields of my form and I want those fields to be empty when the form is shown again. The problem is I don't know how to set fields from clean() method. Setting cleaned_data['field1'] = '' and returning cleaned_data from clean() method doesn't seem to work.

Re: newforms: emptying fields after failed validation

2008-04-02 Thread Gollum
Still, does anybody know how to actually change fields value after failed validation. I really only need to clear my password fields only when the passwords do not validate, not on any invalid field. --~--~-~--~~~---~--~~ You received this message because you are su

Many-to-many relationship on self - inherited model

2008-05-12 Thread Gollum
I've inherited django.contrib.auth.User model class MyUser(User): friends = models.ManyToManyField("self", symmetrical = False, related_name = 'f_set') objects = UserManager() class Admin: pass Other fields were removed for simplicity. Now I run shell and

Re: Many-to-many relationship on self - inherited model

2008-05-13 Thread Gollum
Please, someone, I need help very much! --~--~-~--~~~---~--~~ 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 ema

Inheriting auth.models User

2008-05-21 Thread Gollum
Since this http://groups.google.com/group/django-users/browse_thread/thread/171886a67b8ed839/11564423d7a7680d?lnk=gst&q=gollum#11564423d7a7680d went unnoticed... Did anybody at all try to inherit from auth.models User and what worked (or di