On Apr 8, 5:15 am, UnclaimedBaggage <baynej...@gmail.com> wrote:
> Hi folks,
>
[..]
> Any
> suggestions on the following would be very appreciated:
>
> #1.) For usability's sake, I'd like to have foreign key models
> embedded in the same admin form as the model they're referencing. For
> example, if there's a "products" model with a one-to-many relationship
> to "product options", I'd like to add "product options" from within
> the "product" admin form. (Eg javascript adds another field each time
> all existing "product option" fields are filled out...or something).
> Anything that will help (or hurt)  me in trying to add this sort of
> functionality? Is this commonly done?

Yes. See InlineModelAdmin objects.
http://docs.djangoproject.com/en/1.1/ref/contrib/admin/#inlinemodeladmin-objects

>
> #2.) Adding javascript to individual admin forms. Simple?

Yes, see model admin media:
http://docs.djangoproject.com/en/1.1/ref/contrib/admin/#modeladmin-media-definitions

>
> #3.) Customising the HTML (not CSS) output of django-admin. For
> example, putting a thumbnailed image next to each product in the
> Admin-->Products table list. Simple?

I suspect this can be done in a variety of ways. One way may be to
define a method on a model to return the HTML for the thumbnail image
and using it in the list_display admin option.

>
> #4.) A lot of what I do is basic (but custom) e-commerce & CMS stuff.
> Django's CMS potential looks very solid, although I'm wondering if
> tacking on basic e-commerce features to django-admin could be a little
> cumbersome. Features such as basic order reports/stats etc don't seem
> to fit too freely into the django-admin approach.

You can create your own admin views to do arbitrary things.

>  I'll also need to
> auto-create thumbnails from model.ImageField inputs. Easily doable?

With the PIL library, yes. There are also third party snippets and
apps to help with this.

>
> #5.) 'Convenience' form fields in admin forms. For example, a select
> box that lets you choose a parent category, which in turn presents a
> 'child category' select box, etc...or tree-structured checkboxes. I'm
> comfortable writing up the javascript, but from a quick inspection
> django-admin didn't seem to like the inclusion of select fields that
> weren't intended to interact with the model. Was this just my clumsy
> newbieness or is this going to be a problem?

Not really sure what you mean, but you can supply your own forms,
templates, and custom javascript to the admin.

I think you'll find the admin pretty customizable for small and
moderately complex websites. If the complexity is very high you'll
likely have to write your own admin views.

The docs for the admin app are here:
http://docs.djangoproject.com/en/1.1/ref/contrib/admin/#module-django.contrib.admin

Regards,
BN

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to