Edit inline in newforms-admin branch (ATTN: Joseph Kocherans)

9 views
Skip to first unread message

Adrian Holovaty

unread,
Mar 25, 2007, 5:59:06 PM3/25/07
to django-d...@googlegroups.com
Now that we have 0.96 out the door, I'd love to wrap up the
newforms-admin branch, which is mostly missing edit-inline support but
works well for other cases.

Joseph Kocherans was working on edit-inline support, but I haven't
seen anything checked in or heard from him about any developments.
Joseph, are you around, and what's the status? I can happily take over
if you're not in a position to do the implementation.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com

Joseph Kocherhans

unread,
Mar 26, 2007, 11:13:52 AM3/26/07
to django-d...@googlegroups.com
On 3/25/07, Adrian Holovaty <holo...@gmail.com> wrote:
>
> Now that we have 0.96 out the door, I'd love to wrap up the
> newforms-admin branch, which is mostly missing edit-inline support but
> works well for other cases.
>
> Joseph Kocherans was working on edit-inline support, but I haven't
> seen anything checked in or heard from him about any developments.
> Joseph, are you around, and what's the status? I can happily take over
> if you're not in a position to do the implementation.

Oh, I didn't know that you had it in a stable state yet. I'm sorry, I
totally missed the checkin where you got most of this done. :) I have
non model-specifc edit-inline stuff working, but there are a couple of
tests for corner cases I need to write for it. It has hooks for
handling deletion and ordering as well. I'll get it checked in
tomorrow anyhow so you can take a look.

Joseph

Joseph Kocherhans

unread,
Mar 26, 2007, 11:28:36 PM3/26/07
to django-d...@googlegroups.com
On 3/25/07, Adrian Holovaty <holo...@gmail.com> wrote:
>
> Now that we have 0.96 out the door, I'd love to wrap up the
> newforms-admin branch, which is mostly missing edit-inline support but
> works well for other cases.
>
> Joseph Kocherans was working on edit-inline support, but I haven't
> seen anything checked in or heard from him about any developments.
> Joseph, are you around, and what's the status? I can happily take over
> if you're not in a position to do the implementation.

Hey Adrian. Looking at the newforms-admin branch tonight, I can't seem
to get some things working. I was wondering if you would clarify the
scope of what is finished at this point. Is the AdminSite stuff we
discussed at PyCon supposed to be the main way of doing things now?
After about 5 minutes I haven't been able to figure out what to put in
my urlconfs to get it called, and for some reason, the existing admin
index view (django.contrib.admin.views.main.index) is not finding any
models (the actual change list add and edit pages all work fine if I
type in the url) Not asking for debug advice here, just trying to
figure out what *should* be working.

Joseph

Joseph Kocherhans

unread,
Mar 27, 2007, 12:19:56 AM3/27/07
to django-d...@googlegroups.com
On 3/26/07, Joseph Kocherhans <jkoch...@gmail.com> wrote:
>
> Hey Adrian. Looking at the newforms-admin branch tonight, I can't seem
> to get some things working.

Gah. Nevermind. Only the index page is working of AdminSite, and it's
root method acts like a view that takes url as a param. Doesn't
explain my problems with django.contrib.admin.views.main.index, but
that's a different issue.

Anyhow, it seems like kind of a waste of time to implement edit_inline
using the soon to be extinct syntax. Any reason not to try to finish
up the AdminSite stuff on the newforms-admin branch other than the
fact that the branch should have been merged a couple of months ago?
Maybe I'm missing a 3rd option?

Joseph

Adrian Holovaty

unread,
Apr 7, 2007, 12:10:03 AM4/7/07
to django-d...@googlegroups.com

As of [4944], the newforms-admin admin site should be working properly
-- you're right that I hadn't finished the AdminSite stuff. (Sorry for
the miscommunication!) It's working pretty well now. To activate the
admin site, do this:

"""
from django.conf.urls.defaults import *
from django.contrib import admin

urlpatterns = patterns('',
('^admin/(.*)', admin.site.root),
)
"""

The next step is to get edit_inline working, with the new syntax we've
talked about. Joseph -- I saw you checked in a
django.newforms.formsets module in the newforms-admin branch. How do
you envision that interacting with edit_inline?

Joseph Kocherhans

unread,
Apr 7, 2007, 12:42:31 AM4/7/07
to django-d...@googlegroups.com
On 4/6/07, Adrian Holovaty <holo...@gmail.com> wrote:
>
> As of [4944], the newforms-admin admin site should be working properly
> -- you're right that I hadn't finished the AdminSite stuff. (Sorry for
> the miscommunication!) It's working pretty well now. To activate the
> admin site, do this:
>
> """
> from django.conf.urls.defaults import *
> from django.contrib import admin
>
> urlpatterns = patterns('',
> ('^admin/(.*)', admin.site.root),
> )
> """

Yay!

> The next step is to get edit_inline working, with the new syntax we've
> talked about. Joseph -- I saw you checked in a
> django.newforms.formsets module in the newforms-admin branch. How do
> you envision that interacting with edit_inline?

Here's an incredibly high-level and naive overview of how the views will work:

Create 1 form for the parent object, and a FormSet (with deletion
enabled) to manage the child objects.

If the forms are all valid, create/save the parent object, loop
thorugh formset.clean_data (and formset.deleted_data) creating,
updating, or deleting child objects as necessary using the id from the
parent object we already saved. Bye-bye core!

I'm sure there's some nastiness there that will become apparent when I
get down to the actual code, but I doubt it will be anything
impossible to deal with.

I've got some much better code/tests for FormSet on the way, including
code that deals with displaying more than one extra blank form. I've
just been busy as hell trying to get marketplace launched, and then
fighting a fever for the past few days. I've already covered a lot of
ground tonight though, and planning on more tomorrow.

I'm obviously glossing over a lot of details. If there are any you're
particularly worried about, let me know.

Joseph

Adrian Holovaty

unread,
Apr 7, 2007, 1:13:05 AM4/7/07
to django-d...@googlegroups.com
On 4/6/07, Adrian Holovaty <holo...@gmail.com> wrote:
> As of [4944], the newforms-admin admin site should be working properly
> -- you're right that I hadn't finished the AdminSite stuff. (Sorry for
> the miscommunication!) It's working pretty well now. To activate the
> admin site, do this:

I've documented a bunch of the changes here:

http://code.djangoproject.com/wiki/NewformsAdminBranch

Baptiste

unread,
Apr 7, 2007, 6:10:32 PM4/7/07
to Django developers
Hi,

I don't know how that was before, but with your commits of today, I
can't access the list of some models (some others still work), because
of the error : 'NoneType' object has no attribute 'manager' (/django/
contrib/admin/filterspecs.py in __init__, line 161). I think it is an
issue in my models since they are not all broken, but maybe that would
be interesting to display errors messages understandable by humans to
help debugging... Maybe also it is not specific to the newforms-admin
branche, but I didn't want to launch a specific thread for that ;-)

Great work anyway, go on.

Baptiste.

On 7 avr, 07:13, "Adrian Holovaty" <holov...@gmail.com> wrote:

Adrian Holovaty

unread,
Apr 8, 2007, 1:07:43 PM4/8/07
to django-d...@googlegroups.com
On 4/7/07, Baptiste <baptist...@gmail.com> wrote:
> I don't know how that was before, but with your commits of today, I
> can't access the list of some models (some others still work), because
> of the error : 'NoneType' object has no attribute 'manager' (/django/
> contrib/admin/filterspecs.py in __init__, line 161). I think it is an
> issue in my models since they are not all broken, but maybe that would
> be interesting to display errors messages understandable by humans to
> help debugging...

Hi Baptiste,

Could you open a ticket for this, with an example of your models? I
agree that a better error message would be a good thing, but I'd like
to find the exact problem in your models (or bug in the newforms-admin
branch) in order to figure out whether to display the message.

Baptiste

unread,
Apr 9, 2007, 6:24:25 AM4/9/07
to Django developers
I have found from where was the error coming.
More details on http://code.djangoproject.com/ticket/3973.

Thanks
Baptiste

On 8 avr, 19:07, "Adrian Holovaty" <holov...@gmail.com> wrote:

Jari Pennanen

unread,
May 5, 2007, 5:19:35 PM5/5/07
to Django developers
Modularity of edit inline? Any better?

Currently:
models.ForeignKey(Other, edit_inline=models.TABULAR, parameters...)
obiviously is a big waste of OO abilities,

instead something like, the OO way:
models.ForeignKey(Other, edit_inline=models.TabularInline(parameters))
were much better. (I know it is defined elsewhere in upcoming
implementation, but the example I saw did not implement subclassing
which I think is neccessity to create it customizable, and also the
parameters is way more clear this way)

One could implement own edit inlines just by subclassing from
TabularInline/StackedInline, or from where TabularInline subclassed
itself. Currently I see no easy or sensible way to create own edit
inlines.

On 26 maalis, 00:59, "Adrian Holovaty" <holov...@gmail.com> wrote:
> Now that we have 0.96 out the door, I'd love to wrap up the

> newforms-admin branch, which is mostly missingedit-inlinesupport but


> works well for other cases.
>

> Joseph Kocherans was working onedit-inlinesupport, but I haven't

Mike Axiak

unread,
May 9, 2007, 6:20:39 PM5/9/07
to Django developers
I have created a ticket specifically for newforms-admin and
edit_inline (#4255).

I'd like to bounce ideas around in there, if people would be willing
to talk. I would partially be willing to do some implementation, but
don't want to write code other people have.

http://code.djangoproject.com/ticket/4255

Cheers,
Mike Axiak

Russell Keith-Magee

unread,
May 9, 2007, 7:51:33 PM5/9/07
to django-d...@googlegroups.com
On 5/10/07, Mike Axiak <mca...@gmail.com> wrote:
>
> I have created a ticket specifically for newforms-admin and
> edit_inline (#4255).
>
> I'd like to bounce ideas around in there, if people would be willing
> to talk. I would partially be willing to do some implementation, but
> don't want to write code other people have.
>
> http://code.djangoproject.com/ticket/4255

Some of the code has already been committed. Look at FormSet in
django.newforms.formsets in the newforms-admin branch.

Yours,
Russ Magee %-)

Malcolm Tredinnick

unread,
May 10, 2007, 2:10:44 AM5/10/07
to django-d...@googlegroups.com
On Wed, 2007-05-09 at 22:20 +0000, Mike Axiak wrote:
> I have created a ticket specifically for newforms-admin and
> edit_inline (#4255).
>
> I'd like to bounce ideas around in there, if people would be willing
> to talk. I would partially be willing to do some implementation, but
> don't want to write code other people have.
>
> http://code.djangoproject.com/ticket/4255

I really don't understand the idea behind these kinds of tickets
(they've happened before and a few are still open for no good reason
that I can see). You read this list, Mike. Hopefully you noticed that
Adrian and Joseph K have mentioned they worked out a plan at PyCon this
year and Joseph started committing some code as a result of that,
although it's possible you have forgotten until just now.

Opening a ticket is either some subtle form of "please hurry up", which
is uncalled for, or just another open ticket that achieves nothing
except adding to the number of open tickets. Discussion will happen on
the list, not in the ticket. It's not like we don't know that feature is
missing from newforms-admin. So what value does it add?

Okay, one of the guys involved with implementing that code could respond
to your requests, but it happens from time to time that in the enormous
level of e-mail on this list, combined with the business of daily life,
things get overlooked for a little while. I do know that Adrian
periodically goes through his django-dev email and responds to relevant
threads. So a little patience is appropriate here.

Please close it off.

Thanks,
Malcolm


Joseph Kocherhans

unread,
May 10, 2007, 7:24:34 PM5/10/07
to django-d...@googlegroups.com
On 5/5/07, Jari Pennanen <jari.p...@gmail.com> wrote:
>
> Modularity of edit inline? Any better?
>
> Currently:
> models.ForeignKey(Other, edit_inline=models.TABULAR, parameters...)
> obiviously is a big waste of OO abilities,
>
> instead something like, the OO way:
> models.ForeignKey(Other, edit_inline=models.TabularInline(parameters))
> were much better. (I know it is defined elsewhere in upcoming
> implementation, but the example I saw did not implement subclassing
> which I think is neccessity to create it customizable, and also the
> parameters is way more clear this way)
>
> One could implement own edit inlines just by subclassing from
> TabularInline/StackedInline, or from where TabularInline subclassed
> itself. Currently I see no easy or sensible way to create own edit
> inlines.

That's the general idea of what we came up with at PyCon. I'm still
working on the underlying machinery (basically formset_for_model and
formset_for_instances) though. TabularInline/StackedInline (or
whatever they end up being) will be mostly configuration, however,
they are an incredibly small part of the overall implementation and
will be one of the last things I work on. I imagine they will have
some methods to customize them a little via subclassing, but I'm not
going to speculate further until I get there.

Joseph

Joseph Kocherhans

unread,
May 10, 2007, 7:28:44 PM5/10/07
to django-d...@googlegroups.com

Oops. Actually let me clarify that a bit. The edit_inline definition
will definitely *not* be an argument to ForeignKey, but rather an
argument to either AdminSite.register or ModelAdmin (most likely the
latter). Passing configuration data into ModelAdmin still hasn't been
finalized, so I can't really tell you exactly what it will look like,
but the main point is that edit_inline definitions will happen
completely *outside* of the model.

Joseph

Adrian Holovaty

unread,
May 13, 2007, 9:54:33 PM5/13/07
to Django developers
On May 10, 6:28 pm, "Joseph Kocherhans" <jkocherh...@gmail.com> wrote:
> Oops. Actually let me clarify that a bit. The edit_inline definition
> will definitely *not* be an argument to ForeignKey, but rather an
> argument to either AdminSite.register or ModelAdmin (most likely the
> latter). Passing configuration data into ModelAdmin still hasn't been
> finalized, so I can't really tell you exactly what it will look like,
> but the main point is that edit_inline definitions will happen
> completely *outside* of the model.

Hey Joseph,

What's your ETA on these changes? I finally have some free time this
week, and I'd like to work toward getting this branch finalized. If
you don't have time to hack on this, let me know where you left off.

Joseph Kocherhans

unread,
May 14, 2007, 12:59:42 PM5/14/07
to django-d...@googlegroups.com
On 5/13/07, Adrian Holovaty <holo...@gmail.com> wrote:
>
> What's your ETA on these changes? I finally have some free time this
> week, and I'd like to work toward getting this branch finalized. If
> you don't have time to hack on this, let me know where you left off.

I'm still working on the formset-model integration stuff. After that
it's mostly configuration classes and template changes. I'll have time
to work on it this week, but I don't expect I'd be able to finish it.
There's also still some ugliness in the FormSet constructor, but it
works. If you think you'll have a lot of time, and you want to take
over, my feelings won't be hurt, but I'll keep working on it until I
hear otherwise.

Joseph

P.S. What's your status on the other stuff in that branch? I know that
site.register doesn't handle kwargs for ModelAdmin yet, and I think
there are a couple of other loose ends, but I figured you just hadn't
gotten that far yet. I can file tickets as I come across stuff like
that if you like, but I don't want to harass you with unneccessary
info.

Honza Král

unread,
Jun 7, 2007, 5:39:48 PM6/7/07
to django-d...@googlegroups.com
Hello,
what is the current status of newforms-admin? We just started
developing a major project with it and we will need the edit_inline
functionality. Is there any chance this will be supported in next few
weeks?

Since we really need newforms-admin for this project, my employer
agreed to pay me to work on the newforms-admin if necessary, so if
there is anything I can do to help I will be glad if you can point me
to some code (I understand you have some draft version) that I could
try and finish. Or, if no code is available, if you could describe
your vision of the feature and then I could try my best to fulfill
it... ;)

Thanks very much in advance...
Honza


--
Honza Král
E-Mail: Honza...@gmail.com
ICQ#: 107471613
Phone: +420 606 678585

Adrian Holovaty

unread,
Jun 7, 2007, 5:45:03 PM6/7/07
to django-d...@googlegroups.com
On 6/7/07, Honza Král <honza...@gmail.com> wrote:
> Since we really need newforms-admin for this project, my employer
> agreed to pay me to work on the newforms-admin if necessary, so if
> there is anything I can do to help I will be glad if you can point me
> to some code (I understand you have some draft version) that I could
> try and finish. Or, if no code is available, if you could describe
> your vision of the feature and then I could try my best to fulfill
> it... ;)

Basically, edit_inline is the main thing left. Joseph Kocherhans has
been working on it off-and-on for the past few months. It seems like
he's a bit too busy to devote a lot of time to this, so, Honza, your
help would be much appreciated.

Let's give Joseph some time to comment before going further...

Joseph Kocherhans

unread,
Jun 8, 2007, 3:30:31 AM6/8/07
to django-d...@googlegroups.com

I'm most of the way there. Basically just template stuff and a little
bit of ModelAdmin code is left. I got stuck a few times keeping this
stuff usable outside the admin, and at multiple levels. I think it was
worth the effort, but time will tell. Expect to see a working version
checked in next week. Maybe sooner. And huzzah! core=True is no longer
necessary.

Joseph

Honza Král

unread,
Jun 8, 2007, 4:12:46 AM6/8/07
to django-d...@googlegroups.com

Great news, thanks !

> Joseph

simonbun

unread,
Jun 8, 2007, 7:05:31 AM6/8/07
to Django developers
Good stuff! Can't wait to start using newforms-admin outside of my
sandbox...
Thanks for the work!

regards,
Simon

On Jun 8, 9:30 am, "Joseph Kocherhans" <jkocherh...@gmail.com> wrote:
> On 6/7/07, Adrian Holovaty <holov...@gmail.com> wrote:

Masida

unread,
Jun 8, 2007, 5:15:07 PM6/8/07
to Django developers
Is anyone working on FileField/ImageField support for the admin in
newforms-admin?
This isn't currently working (even with the latest patch from ticket
#3297).
If nobody is working on it right now, I'll have a look at it and come
up with a patch...
(I'm actually using the newforms-admin branch for a project right
now.)
Ciao,
- Matthias

Russell Keith-Magee

unread,
Jun 8, 2007, 7:39:35 PM6/8/07
to django-d...@googlegroups.com
On 6/9/07, Masida <mas...@gmail.com> wrote:
>
> Is anyone working on FileField/ImageField support for the admin in
> newforms-admin?
> This isn't currently working (even with the latest patch from ticket
> #3297).

I uploaded a patch yesterday to add FileField/ImageField support in
the general case; however, that patch will require some minor changes
to newforms-admin (the way that request data is passed to the form).

I'm about to jump on a plane and disappear, so I won't get a chance to
look at this for a few weeks.

Yours,
Russ Magee %-)

Masida

unread,
Jun 9, 2007, 5:16:06 AM6/9/07
to Django developers
I've seen your patch (in fact i'm already test driving it ;-)

Will have a look at implementing it for the admin interface and will
try to make a patch.

Thanks Russ!

Greetings,
- Matthias

On Jun 9, 1:39 am, "Russell Keith-Magee" <freakboy3...@gmail.com>
wrote:

Adrian Holovaty

unread,
Jun 9, 2007, 3:04:14 PM6/9/07
to django-d...@googlegroups.com
On 6/8/07, Joseph Kocherhans <jkoch...@gmail.com> wrote:
> I'm most of the way there. Basically just template stuff and a little
> bit of ModelAdmin code is left. I got stuck a few times keeping this
> stuff usable outside the admin, and at multiple levels. I think it was
> worth the effort, but time will tell. Expect to see a working version
> checked in next week. Maybe sooner. And huzzah! core=True is no longer
> necessary.

This is great news. Looking forward to it!

Joseph Kocherhans

unread,
Jun 14, 2007, 11:58:30 PM6/14/07
to django-d...@googlegroups.com
On 6/9/07, Adrian Holovaty <holo...@gmail.com> wrote:
>
> On 6/8/07, Joseph Kocherhans <jkoch...@gmail.com> wrote:
> > I'm most of the way there. Basically just template stuff and a little
> > bit of ModelAdmin code is left. I got stuck a few times keeping this
> > stuff usable outside the admin, and at multiple levels. I think it was
> > worth the effort, but time will tell. Expect to see a working version
> > checked in next week. Maybe sooner. And huzzah! core=True is no longer
> > necessary.
>
> This is great news. Looking forward to it!

I just checked in a bunch of changes.
http://code.djangoproject.com/changeset/5473

The templates still need some work, ok... a lot of work. I need to
write some more tests, and I'm going to rework some of the internals,
but things are pretty much functional.

Feel free to start filing bugs and asking questions, but please ask
them in a new thread. And to answer many people's first question, no,
you cannot have inlines inside of inlines. If you want that, you're on
your own, and good luck ;) The second question, no, inline file
uploads don't work right now, but I plan on making that happen at some
point.

Joseph

------------------------------------------------
from django.db import models
from django.contrib.admin import site, ModelAdmin, StackedInline, TabularInline

class Poll(models.Model):
question = models.CharField(maxlength=255)

def __str__(self):
return self.question

class Choice(models.Model):
poll = models.ForeignKey(Poll)

choice = models.CharField(maxlength=255)
votes = models.IntegerField()

def __str__(self):
return self.choice

class PollAdmin(ModelAdmin):
inlines = [TabularInline(Choice, extra=2)]

class ChoiceAdmin(ModelAdmin):
list_display = ['choice', 'poll', 'votes']

site.register(Poll, PollAdmin)
site.register(Choice, ChoiceAdmin)

Jacob Kaplan-Moss

unread,
Jun 15, 2007, 5:22:32 AM6/15/07
to django-d...@googlegroups.com
On 6/14/07, Joseph Kocherhans <jkoch...@gmail.com> wrote:
> I just checked in a bunch of changes.
> http://code.djangoproject.com/changeset/5473

Sweet -- that's *great* news :)

Looking forward to kicking the tires,

Jacob

Jason Davies

unread,
Jun 15, 2007, 5:29:57 AM6/15/07
to Django developers
On Jun 15, 4:58 am, "Joseph Kocherhans" <jkocherh...@gmail.com> wrote:

> I just checked in a bunch of changes.http://code.djangoproject.com/changeset/5473

Excellent :-)

Jason

mattim...@gmail.com

unread,
Jun 20, 2007, 12:29:13 AM6/20/07
to Django developers

On Jun 15, 1:58 pm, "Joseph Kocherhans" <jkocherh...@gmail.com> wrote:
> On 6/9/07, Adrian Holovaty <holov...@gmail.com> wrote:


>
>
>
> > On 6/8/07, Joseph Kocherhans <jkocherh...@gmail.com> wrote:
> > > I'm most of the way there. Basically just template stuff and a little
> > > bit of ModelAdmin code is left. I got stuck a few times keeping this
> > > stuff usable outside the admin, and at multiple levels. I think it was
> > > worth the effort, but time will tell. Expect to see a working version
> > > checked in next week. Maybe sooner. And huzzah! core=True is no longer
> > > necessary.
>
> > This is great news. Looking forward to it!
>

> I just checked in a bunch of changes.http://code.djangoproject.com/changeset/5473


Hi, I've been trying this out as the new inline functionality in
newforms-admin branch but I've found one problem: raw_id_admin fields
aren't rendered correctly in inline fields. They are still rendered as
select widgets.

Is this a known issue that is being worked on?

regards

matthew

--
http://wadofstuff.blogspot.com

Joseph Kocherhans

unread,
Jun 20, 2007, 12:45:47 AM6/20/07
to django-d...@googlegroups.com
On 6/19/07, mattim...@gmail.com <mattim...@gmail.com> wrote:
>
> Hi, I've been trying this out as the new inline functionality in
> newforms-admin branch but I've found one problem: raw_id_admin fields
> aren't rendered correctly in inline fields. They are still rendered as
> select widgets.
>
> Is this a known issue that is being worked on?

Yep. None of the javascript stuff really works right now. The calendar
and picker widgets for date and time fields, for instance, are broken.
The configuration will be different for raw_id fields as well. For
example:

class MyModelAdmin(models.ModelAdmin):
inlines = [StackedInline(MyModel, raw_id_fields=('field1', 'field2'))]

That code doesn't work yet, but that will probably be how to do it.
Christian Metts is helping me out with some template changes to make
things look nicer now that each object has a deletion checkbox. Once I
get his work integrated, I'll start on stuff like raw_id fields. If
you want to file a ticket against newforms-admin, that would be great.
Thanks for testing it out.

Joseph

Russell Keith-Magee

unread,
Jun 26, 2007, 11:34:59 PM6/26/07
to django-d...@googlegroups.com
On 6/20/07, Joseph Kocherhans <jkoch...@gmail.com> wrote:
>
> Yep. None of the javascript stuff really works right now. The calendar
> and picker widgets for date and time fields, for instance, are broken.

Sounds like a good opportunity to plug ticket #4418 - widget level
support for specifying media (javascript/css) requirements.

I haven't gone back to retrofit this into newforms-admin (or even had
a chance to look at the new edit-inline stuff), but I'd be interested
on any feedback on how the edit-inline changes would affect this
approach.

Yours,
Russ Magee %-)

Joseph Kocherhans

unread,
Jun 27, 2007, 11:23:08 AM6/27/07
to django-d...@googlegroups.com

Thanks for bringing this up Russ. The problem at the moment is that
the admin doesn't look at any of the inlines when figuring out what
javascript to load, so if your inlines have date fields, the js
doesn't get loaded unless the parent has a date field. I don't think
#4418 causes any problems for the new edit inline stuff. In fact it
makes it easier. I was going to have to solve the duplicate problem,
but I forgot about #4418. I think the widgets for each inline model
just need to be included with the widgets from them main form when
combining each widget.media together.

Joseph

Russell Keith-Magee

unread,
Jun 27, 2007, 10:05:02 PM6/27/07
to django-d...@googlegroups.com
On 6/27/07, Joseph Kocherhans <jkoch...@gmail.com> wrote:
>
> Thanks for bringing this up Russ. The problem at the moment is that
> the admin doesn't look at any of the inlines when figuring out what
> javascript to load, so if your inlines have date fields, the js
> doesn't get loaded unless the parent has a date field. I don't think
> #4418 causes any problems for the new edit inline stuff. In fact it
> makes it easier. I was going to have to solve the duplicate problem,
> but I forgot about #4418. I think the widgets for each inline model
> just need to be included with the widgets from them main form when
> combining each widget.media together.

Thats pretty much what I figured. I'm starting to get a handle on my
backlog of mail and news, so I should be able to take a look at the
new edit inline stuff in the next day or so, get the existing #4418
patch up to date with trunk, and have a look at newforms-admin
integration.

Yours,
Russ %-)

Reply all
Reply to author
Forward
0 new messages