Re: Foreign key with tons of items

2008-10-27 Thread gearheart
maybe limit_choices_to is what you're looking for i had similar problem and solved with ajax autocomplete widget. On Oct 27, 1:47 pm, paolofdr <[EMAIL PROTECTED]> wrote: > Hello everybody, > I have a similar problem: a too long drop-down menu inside an inline > element in the admin page. > Is it

Re: denormalized data in single field

2008-09-23 Thread gearheart
yes, i think i'll do that but the for every entity that has location i need to override form and save method. i think there should be more django-style solution On 23 сент, 23:39, akonsu <[EMAIL PROTECTED]> wrote: > hello, > > you can override the model's save() method. > > konstantin > > On Se

Re: Custom form/formset for edit inline

2008-10-13 Thread gearheart
hi, fieldsets is not a form's attribute you should put them in ImageInline V. On Oct 12, 10:27 pm, Emil <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to figure out how to use a custom form for when editing > objects inline in the admin. The case is something like this: > I have Images that hav

Re: Formset - How to avoid required field errors in extra forms

2008-10-14 Thread gearheart
hi form is being cleaned only if it's values are different from initial values, so debug. btw, you can't do form.field['..'].initial = '..' initial must be dictionary, not list V. On Oct 14, 12:34 am, Federico H <[EMAIL PROTECTED]> wrote: > Hi, > I'm using a formset with hidden fields in the f

Re: current user

2008-10-14 Thread gearheart
http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser lingrlongr wrote: > What's the best way to always set a User foreign key to the current > user using the admin site? For example: > > # models.py > class MyModel(models.Model): > my_data = models.CharField(max_length=50) > us